The Space ROS Space Robots Demo docker image uses the moveit2 docker image (openrobotics/moveit2:latest) as its base image. Build instructions for that image can be found in this README. The Dockerfile installs all of the prerequisite system dependencies along with the demos source code, then builds the Space ROS Space Robots Demo.
This is for Curiosity Mars rover and Canadarm demos.
The demo image builds on top of the spaceros and moveit2 images.
To build the docker image, first build both required images, then the space_robots demo image:
cd docker/spaceros
./build.sh
cd ../moveit2
./build.sh
cd ../space_robots
./build.shrun the following to allow GUI passthrough:
xhost +local:dockerThen run:
./run.shDepending on the host computer, you might need to remove the --gpus all flag in run.sh, which uses your GPUs.
Launch the demo:
ros2 launch mars_rover mars_rover.launch.pyOn the top left corner, click on the refresh button to show camera feed.
Open a new terminal and attach to the currently running container:
docker exec -it <container-name> bashMake sure packages are sourced:
source ~/spaceros/install/setup.bashsource ~/demos_ws/install/setup.bashDrive the rover forward
ros2 service call /move_forward std_srvs/srv/EmptyStop the rover
ros2 service call /move_stop std_srvs/srv/EmptyTurn left
ros2 service call /turn_left std_srvs/srv/EmptyTurn right
ros2 service call /turn_right std_srvs/srv/EmptyOpen the tool arm:
ros2 service call /open_arm std_srvs/srv/EmptyClose the tool arm:
ros2 service call /close_arm std_srvs/srv/EmptyOpen the mast (camera arm)
ros2 service call /mast_open std_srvs/srv/EmptyClose the mast (camera arm)
ros2 service call /mast_close std_srvs/srv/Emptyros2 launch canadarm canadarm.launch.py