Skip to content

Getting Started with the Spot Driver

Ryan Roche edited this page Feb 15, 2024 · 1 revision

1. Set up the robotdev Docker container (if you haven't already)

Follow the instructions in the readme for the robotdev repository.

Important

Make sure that you have the Spot submodule downloaded. Run git submodule update --init --recursive if you don't have it already

Warning

Remember that we're using ROS noetic, so use build.noetic.sh and run.noetic.sh

Note

Don't forget the --gui and --nvidia tags if you need them! The container takes a while to build and you wouldn't want to realize after you get everything set up that you don't have GPU support.

2. Open a bash shell session within the container

The run.noetic.sh script should drop you straight into a bash session within the container once it's done running.

If that somehow doesn't work, or you already have the container set up and need to get into it, run docker exec -it <container name> bash

What does that command do?
  1. docker exec executes a process within a container

  2. The -i flag makes the process "interactive", keeping STDIN open

  3. The -t flag allocates a pseudo-TTY to the process, allowing us to have multiple shell sessions concurrently in our container

Warning

Do not use docker attach or the terminal tab in Docker Desktop. ROS workflows require multiple terminal windows and that isn't possible when using docker attach or Docker Desktop terminal tab, as they all "attach" to the same TTY and therefore the same shell process

Tip

You will be running the docker exec -it <container> bash command A LOT when working with the ROS driver. Consider registering a short alias (I use dkb for "docker bash") in your host machine terminal for that command.

3. Connect to the spot robot's Wi-Fi network

4. Build the Spot ROS project

Within the container,

  1. cd to ~/repo/robotdev/spot

  2. Run hachi_driver.sh

Note

The hachi_driver.sh script is a convenience script I wrote to save time sourcing the setup scripts necessary to use the driver. You can replicate what it does yourself by performing the following commands:

  1. source setup.sh and typing y (you'll have to be connected to the robot Wi-Fi for this to work
  2. cd ros_ws
  3. source devel/setup.bash
  4. roslaunch hachi.launch

Tip

You can source setup.sh and type n if you aren't connected to the Spot Wi-Fi network. You won't be able to run the driver, but it'll at least put you into the Python venv that we use for Spot. You can also source devel/setup.bash and run any custom ROS nodes. You likely won't be able to do much without the Spot driver, but it's at least something