Docking¶
A client for the docking service.
-
class
bosdyn.client.docking.
DockingClient
[source]¶ Bases:
bosdyn.client.common.BaseClient
A client for the docking service to help issue DockingCommand and get state. Clients are expected to issue a single DockingCommand and then periodically check the status of its execution. This service requires ownership over the robot, in the form of a lease and timesync.
-
default_service_name
= 'docking'¶
-
service_type
= 'bosdyn.api.docking.DockingService'¶
-
docking_command
(station_id, clock_identifier, end_time, prep_pose_behavior=None, lease=None, **kwargs)[source]¶ Issue a DockingCommandRequest to the robot.
- Parameters
station_id – The ID of the docking station to dock at.
clock_identifier – Identifier provided by the time sync service.
end_time – Expiry time of the command in robot time.
prep_pose_behavior – [optional] How and if to use the pre-dock pose.
lease – [optional] Leave empty to have the lease filled in by the LeaseWallet
- Returns
DockingCommand ID
- Raises
ResponseError – The command was unable to be completed. See error for details.
-
docking_command_async
(station_id, clock_identifier, end_time, prep_pose_behavior=None, lease=None, **kwargs)[source]¶ Async version of docking_command().
-
docking_command_full
(station_id, clock_identifier, end_time, prep_pose_behavior=None, lease=None, **kwargs)[source]¶ Identical to docking_command(), except will return the full DockingCommandResponse.
-
docking_command_full_async
(station_id, clock_identifier, end_time, prep_pose_behavior=None, lease=None, **kwargs)[source]¶ Identical to docking_command_async(), except will return the full DockingCommandResponse.
-
docking_command_feedback_full
(command_id, end_time=None, **kwargs)[source]¶ Check the status of a previously issued docking command.
- Parameters
command_id – The ID returned from a previous docking_command call.
- Raises
RpcError – problem communicating with the robot
- Returns
DockingCommandFeedbackResponse
-
docking_command_feedback_full_async
(command_id, end_time=None, **kwargs)[source]¶ Async version of docking_command_feedback_full().
-
docking_command_feedback
(command_id, **kwargs)[source]¶ Check the status of a previously issued docking command.
- Parameters
command_id – The ID returned from a previous docking_command call.
- Returns
Status of type DockingCommandFeedbackResponse.Status
-
docking_command_feedback_async
(command_id, **kwargs)[source]¶ Async version of docking_command_feedback().
-
get_docking_config
(**kwargs)[source]¶ Get the docking config stored on the robot.
- Returns
List of docking configs of type ConfigRange
-
-
bosdyn.client.docking.
blocking_dock_robot
(robot, dock_id, num_retries=4, timeout=30)[source]¶ Blocking helper that takes control of the robot and docks it.
- Parameters
robot – The instance of the robot to control.
dock_id – The ID of the dock to dock at.
num_retries – Optional, number of attempts.
- Returns
The number of retries required
- Raises
CommandFailedError – The robot was unable to be docked. See error for details.
-
bosdyn.client.docking.
blocking_go_to_prep_pose
(robot, dock_id, timeout=20)[source]¶ Blocking helper that takes control of the robot and takes it to the prep pose only.
- Parameters
robot – The instance of the robot to control.
dock_id – The ID of the dock to use.
- Returns
None
- Raises
CommandFailedError – The robot was unable to go to the prep pose. See error for details.
-
bosdyn.client.docking.
blocking_undock
(robot, timeout=20)[source]¶ Blocking helper that undocks the robot from the currently docked dock.
- Parameters
robot – The instance of the robot to control.
- Returns
None
- Raises
CommandFailedError – The robot was unable to undock. See error for details.