How to get ROS up & running on Spot

The Robot Report

In September 2020, Clearpath Robotics released a ROS package for Boston Dynamics’ Spot quadruped. The idea was to allow robotics researchers to leverage ROS capabilities out-of-the-box, as well as open-source libraries, tools and the greater ROS community to accelerate their robotics development.

Spot comes with a dedicated computer, power and communication interfaces and a flexible payload mounting system that allow developers to integrate a variety of ROS-supported sensors and components.

For robotics developers who want to install ROS on Spot, Clearpath has compiled user documentation that covers platform configuration, driver setup, and start-up. You can check out the full documentation here, but below are instructions for getting the ROS driver for Spot up and running. You can also refer to this Spot SDK Quickstart for even further detailed debugging steps.

Verify the URDF
To verify that the spot_viz and spot_description packages are sourced properly, you can run: rosrun spot_viz view_model.launch

This will load RVIZ with the robot description visible. It should also show any additions you may have added to the robot’s URDF.

Configure Your Networking
There are multiple ways you can set up networking on your ROS computer. This guide will cover two different common ways to do this:

/etc/network/interfaces
The first way is by editing /etc/network/interfaces. Below is a section that will create a bridge between all of your network ports and assign a static address of 192.168.131.1. This is a common setup for Clearpath’s robots. Make sure to put your ROS computer into the same subnet that you set for the Spot platform.

Network Manager
If you are using Ubuntu and it has a desktop environment, it will likely have Network Manager installed. To create a new network connection, click the networking icon in the top right if your screen and choose Edit Connections.

You will see all of the other network connections you’ve setup in the past. Click Add on the right to create a new network connection for the robot.

Select Ethernet as the connection type since we are connecting directly to the platform. Give the connection a name.

Set the connection method to manual. This will give it a static address. Under the IPV4 config, choose a static address for the ROS computer. Ensure to put your ROS computer into the same subnet that you set for the Spot platform.

Running the driver – roslaunch spot_driver driver.launch
When launching the ROS driver, there are some options you may need to configure for your setup. They are:

View the robot

Once the robot is connected, you should be able to visualize its odometry, joint positions, camera streams, etc. using RVIZ. To view these streams, run: roslaunch spot_viz view_robot.launch

Remember you will need to source your workspace before running this command. Once RVIZ is loaded, you should see something similar to this:

ROS on Spot

Taking control of the robot
To control Spot, you need to maintain control of the eStop and body lease, power on the drive motors, and command the robot to stand.

Body and eStop control
A body lease gives the holder the ability to command Spot to make actions in the world. The eStop gives the robot a way to guarantee that the commanding system is maintaining contact with the robot. There are two ways to claim a body lease and eStop using this driver.

  • 1. Automatically when the driver starts by enabling the auto_claim variable
  • 2. By calling the claim service after the driver is started

You cannot claim a lease on the robot if something else already has a lease. This is for security reasons. Check the status/leases topic for information on current leases.

Enable motor power
Motor power needs to be enabled once you have a Lease on the body. This can be done in two ways:

  • 1. Automatically when the driver starts by enabling the auto_power_on variable
  • 2. By calling the power_on service after the driver is started

Stand the robot up
Once the motors are powered, stand the robot up so it is able to move through the world. This can be done in two ways:

  • 1. Automatically when the driver starts by enabling the auto_stand variable
  • 2. By calling the stand service after the driver is started

Controlling the velocity
Warning: Spot will attempt to avoid any obstacles it detects with its cameras, but no vision or actuation system is perfect. Make sure to only move the robot in a safe area and in a controlled manner.

ROS topics
To control Spot, you can send a Twist ROS message to command a velocity. To test this, open a new terminal and source your ROS installation. Then, run this command in your terminal.

ROS on Spot

That command will have spot rotate on the spot at 0.3 radians/second. Note the -r at the end of the command. That has ROS resend the message over again. If you don’t resend the message, the driver will assume a timeout and stop commanding motion of the robot.

Interactive market
Inside of RVIZ, grab the red arrow that is around Spot’s body and pull it forward or backwards to have Spot walk. If you rotate the blue circle around the body, Spot will turn. This is a very simple, but inaccurate to move Spot.

Controlling the body
The angle of the body relative to the feet is also controllable through a ROS topic, but there is no interactive marker yet. To control the body position through a terminal, send the following command:

ROS on Spot

Note that the -r is not needed for this command. This sets the position the body should be in until changed.

Monitoring the platform

Topic Type Description
status/metrics Metrics General metrics for the system like distance walked
status/leases LeaseArray A list of what leases are held on the system
odometry/twist TwistWithCovarianceStamped Estimated odometry of the platform
status/feet FootStateArray Status and position of each foot
status/estop EStopStateArray Status of the eStop system
status/wifi WiFiState Status of the wifi system
status/battery_states BatteryStateArray Information for the battery and all cells in the system
status/behavior_faults BehaviorFaultState A listing of behavior faults in the system
status/system_faults SystemFaultState A listing of system faults in the system
status/feedback Feedback Feedback from the Spot robot

The post How to get ROS up & running on Spot appeared first on The Robot Report.


Source: therobotreport

Leave a Reply