Getting Started with Spot

The aim of this assignment is to get you started with our Boston Dynamics Spot robots so you can collect perceptual data from the robot on your laptop. Robot stacks involve many different tools and libraries so try to take each step step-by-step and verify it works before moving on to the next step.

You will undoubtedly run into problems trying to get all this stuff working. Feel free to use AI or ask a friend or ask us for help. As an experiment, we are going to try using Github Issues for you to ask questions about this project (instead of EdStem or Canvas), so please post any technical problems or questions there.

  • First we want to bootstrap you in networking, since that's the most likely source of problems. Complete the three exercises here. Do not worry about any of the handin instructions, just do the content in any linux/unix shell.
  • Next you need to install the spot_ros2 driver on your machine. Follow the instructions in the spot_ros2 repository to run the spot_ros2 driver via docker. (If you have an Ubuntu 22.04 install you can try installing directly; most of you won't and will need to use docker. You can run and start the driver even if you are not connected to Spot. Verify you can see an error message about not finding Spot to connect to.
  • Docker containers don't let you edit the local filesystem by default, so any changes you make to files will be erased when the container restarts. Mount a directory in your local filesystem so you can make changes that persist into the container. Do this by stopping the container and restart it with flags to mount a local development directory from your computer into the container following these instructions. Verify that if you make a change to that directory in the interactive shell inside Docker, that it shows up in your local file system.
  • Now we want to write a basic "hello world" ROS program. Follow the Python ROS 2 publisher/subscriber tutorial in a new workspace and package in the local mounted directory.</a>. Demonstrate that you can publish a message with the publisher and receive it with the subscriber. (You will need two interactive shells within the container, one for the publisher and one for the subscriber.) Verify you can send a message in one interactive shell and receive it in the other.
  • Now we want to write a basic "hello world" for ROS bags, which allow you to record and reply messages coming to and from the robot. Follow the ros2bag Tutorial, but record the message from your publisher, above. Then stop the publisher, and play back the bag to the subscriber. Verify you see the message from the bag on the subscriber node.
  • Now we will record and reply a log from the real robot. Download the Spot rosbags into the local directory and replay it back with ros2 bag play. (Thanks to Ivy for recording them!) (Some examples are here and use ros2 topiic list/ros2 topic echo to see the data.) Verify ros2 topic list shows a bunch of spot topics. Verify there are image topics and use ros2 topic echo to see the headers streaming from those topics and ros2 topic hz to see the frame rate.
  • Now we will visualize image data from cameras on the robot (in the log). Install https://docs.ros.org/en/humble/Tutorials/Intermediate/RViz/RViz-User-Guide/RViz-User-Guide.html and folow the tutorial. View the camera stream from the rosbag via RViz. Verify you can see camera images from the ros bag.
  • In class on Thursday we will turn on a Spot and you can try connecting to the real robot! Verify you can see live-streamed data from the robot in RViz.
  • Extra credit: write a program to command Spot to open and close its gripper using Spot ROS2.