If you prefer ROS2, a ROS2 version of this driver is also available.
You should be using ROS noetic. ROS melodic can also be used but may require modifications to build correctly.
You must install the Boston Dynamics SDK on any machine that will run the driver.
pip3 install bosdyn-client bosdyn-mission bosdyn-api bosdyn-core
Go to the source directory of your ROS workspace and clone this repository with
git clone https://github.com/NMIS-Automation/Spot_ROS.git
Then, initialise the submodule for the wrapper we use to interact with the Boston Dynamics SDK
cd Spot_ROS
git submodule init
git submodule update
Then, install the python package containing the wrapper
pip3 install -e spot_wrapper
Build the ROS packages
cd ../..
catkin build
Finally, remember to source your workspace.
To test functionality, it's easiest to connect to the robot via wifi. For actual operation it is recommended to connect to the robot directly through payload ports for higher bandwidth.
Connect to the robot's wifi network, usually found at SSID spot-BD-xxxxxxxx
. The password for the network is found in the robot's battery compartment.
Once connected, verify that you can ping the robot with ping 192.168.80.3
.
Run the driver with the username and password for the robot, again found in the battery compartment for the Spot which is working I have put this information by defualt in the launch file.
roslaunch spot_driver driver.launch
but if you are using the other Spot you have to put this manually.
roslaunch spot_driver driver.launch username:=user password:=[your-password] hostname:=192.168.80.3
You can then view and control the robot from the rviz interface by running
roslaunch spot_viz view_robot.launch
To map the area and localization you can use the rtab_map package. A launch file created for this purpos and you can modify the camera input based on your requirements.
roslaunch spot_driver rtab_map.launch
More detaild documentation about rtab_map package can be found here
More detailed documentation can be found here