-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started with the Spot Driver
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.
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?
-
docker exec
executes a process within a container -
The
-i
flag makes the process "interactive", keeping STDIN open -
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.
Within the container,
-
cd
to~/repo/robotdev/spot
-
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:
-
source setup.sh
and typingy
(you'll have to be connected to the robot Wi-Fi for this to work cd ros_ws
source devel/setup.bash
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