Skip to content

Spot Driver Available Interfaces

Katie Hughes edited this page Nov 19, 2024 · 17 revisions

This page is meant to serve as an overview of what actions, services, and topics are exposed through the spot_driver.

General Interfaces

Actions

/robot_command

This action is a thin layer on top of Boston Dynamics' RobotCommand. This action is a "sledgehammer", almost anything you want to do with the robot can be achieved via the robot command action -- walking, posing the body, manipulation, gripping, etc. The caveat is the request has a lot of fields and can be difficult to fill out manually. The request field is generated from the protobuf via the bosdyn_msgs package (run ros2 interface show spot_msgs/action/RobotCommand to see just how complex it is!).

The easiest way to fill out this request properly is to first generate the protobuf using BD's robot command builder tool, then convert it to the desired ROS message using a conversion function from the bosdyn_msgs package.

from bosdyn_msgs.conversions import convert
from bosdyn_msgs.msg import RobotCommand
...
proto_robot_command = ... # generate this using BD's protos
ros_robot_command = RobotCommand()
convert(proto_robot_command, ros_robot_command)
# then you can use this to fill out the action request

If a robot command action is sent while another robot command action is executing, the currently executing command will be cancelled, and the latest requested command will begin to execute.

The Spot SDK internally cannot handle long trajectories. The action server implemented in this driver will handle trajectory batching so that very long trajectories can be executed on robot. See the batch_trajectory example for a trajectory that could not be executed by the base spot-sdk but can be executed through the robot command action client.

/manipulation

This action is a thin wrapper on BD's ManipulationApiRequest. Similarly to the robot command action, this action's request is autogenerated from BD protobufs, and it is easiest to fill it in using the conversion functions.

/navigate_to

This is a graph nav action to command the robot to navigate to a specific waypoint ID.

/trajectory

This requests the robot to move to a desired target pose. As implemented, the target pose specified must be in the "body" frame. Run ros2 interface show spot_msgs/action/Trajectory for more information on how to fill out this request.


Services

/arm_carry

Trigger service to move the arm to the "carry" position

/arm_stow

Trigger service to stow the arm

/arm_unstow

Trigger service to unstow the arm to the "ready" position

/claim

Trigger service to claim the robot to claim the robot (for example, will take control from the tablet)

/clear_behavior_fault

Clear a behavior fault on the robot. The request requires the ID of the behavior fault which can be determined via the /status/behavior_faults topic.

/close_gripper

Trigger service to close the claw gripper

/dock

Dock the robot. The service requires the dock_id which is a number printed on the fiducial at the dock.

/estop/gentle

E-stop the robot gently -- attempting to sit down first before powering the motors off

/estop/hard

E-stop the robot by immediately cutting all power

/estop/release

Release the E-stop so that the robot can be operated again

/get_gripper_camera_parameters

Get various parameters of the camera in the gripper (resolution, image size, brightness, etc).

/get_inverse_kinematic_solutions

Query the robot for inverse kinematics solutions. Example on how this service works here with documentation here.

/graph_nav_clear_graph

Clear graph nav graph

/graph_nav_get_localization_pose

Get the pose according to graph nav localization

/graph_nav_set_localization

Set the graph nav localization method (fiducial or waypoint)

/graph_nav_upload_graph

Upload a graph nav graph

/list_graph

List graph nav waypoint IDs

/list_world_objects

Lists the current world objects that Spot is keeping track of

/locomotion_mode

Set the gait of the robot to one of the following Locomotion Modes.

/max_velocity

Modifies the mobility parameters to limit the maximum velocity that the robot can move during motion commands (this affects trajectory commands)

/open_gripper

Trigger to open the gripper

/override_grasp_or_carry

Service to force Spot to override the grasp or carry state of the gripper/arm

/power_off

Trigger service to power the motors off

/power_on

Trigger service to power the motors on

/release

Trigger to return the lease on the body

/robot_command

This is the same request interface as the robot command action, but implemented as a service. It can be useful if you don't care about the feedback the action provides and just want to send the command as quickly as possible.

/rollover

Trigger service to roll the robot over so that the battery can be removed from underneath it

/self_right

Trigger service to self right the robot

/set_gripper_camera_parameters

Set various parameters of the camera in the gripper (resolution, image size, brightness, etc).

/sit

Trigger service to make the robot sit down

/spot_check

Trigger to run the spot check service

/stair_mode

Set a boolean to indicate if the robot should be in stair mode

/stand

Trigger service to make the robot stand up

/stop

Trigger service to make the robot stop executing a command

/take_lease

Trigger service to take the lease of the robot

/undock

Trigger service to undock the robot


Topics

/arm_joint_commands

Publish to this topic to command the joint angles of the arm. The type of the message is sensor_msgs/msg/JointState. It should contain the names [arm_sh0, arm_sh1, arm_el0, arm_el1, arm_wr0, arm_wr1, arm_f1x] and desired positions for each element. (Velocity and effort components of the joint state message are not used!)

/body_pose

Publish to this topic to command the robot's body to move to a desired pose relative to the nominal standing pose without moving its feet. Only the z component of the position component is used. The orientation component will attempt to twist the body.

/cmd_vel

Publish to this topic to command the robot to walk at a given velocity. Only the x and y components of the linear twist are used, and only the z component of the angular twist is used.

/manipulation_state

Reports on if the gripper is open/closed, if the arm is stowed/unstowed, if the arm is carrying anything, and the velocity of the end effector in different frames.

/odometry

Gives the position and velocity of the robot in either the odom or vision frame

/odometry/twist

Gives the velocity of the robot in either the odom or vision frame

/status/battery_states

Reports the status of the battery, including current charge.

/status/behavior_faults

Reports on a list of faults that the robot is currently experiencing. (Ideally this list is empty).

/status/end_effector_force

Reports on the estimated force at the end effector

/status/estop

Reports on the estops that are currently active on the robot.

/status/feedback

Reports on whether the robot is sitting, standing, or moving.

/status/feet

Reports on the location of each foot with respect to the body frame, as well as if each foot is in contact with the floor.

/status/leases

Reports on the status of each lease on the robot, including who owns them.

/status/metrics

Reports on how long the robot has been on and how far it has traveled since then.

/status/mobility_params

Reports on current mobility parameters for the robot -- including if it is in stair mode, and what kind of gait is set.

/status/power_states

Indicates what kind of power state the motors are in (powered, powering on/off, etc)

/status/system_faults

Reports on if there are any active system faults on the robot

/status/wifi

Reports on the wifi connection of the robot


Choreography Interfaces

Actions

/execute_dance


Services

/get_choreography_status

determine if your robot is licensed for choreography

/list_all_dances

List dances that can be performed

/list_all_moves

List moves that can be performed

/recorded_state_to_animation

/start_recording_state

Start recording the state of the robot to later play back as choreography

/stop_dance

Trigger service to stop execution of a dance

/stop_recording_state

Stop recording the state of the robot to later play back as choreography

/upload_animation

/upload_sequence


Spot Cam Interfaces

Services

/delete_logpoint

delete a logpoint

/delete_sound

delete a sound

/get_led_brightness

get the current brightness of the LED

/get_logpoint_status

get the status of a logpoint

/get_ptz_position

get the current position of the PTZ camera

/get_volume

get the current volume used for playing sounds

/initialize_lens

/list_cameras

/list_logpoints

list current logpoints

/list_ptz

/list_sounds

list the available sounds

/load_sound

Load a sound that can later be played

/play_sound

Play a sound

/retrieve_logpoint

/set_led_brightness

set brightness of Spot Cam's LEDs

/set_ptz_position

set Spot Cam to point at a certain pan-tilt-zoom

/set_volume

set the volume of Spot Cam

/store_logpoint

/tag_logpoint

Clone this wiki locally