Run gazebo classic simulation with Turtlebot 3 with ROS 2 foxy in a local docker container.
Simple simulation for testing purposes.
- Check out all submodules with this repository (
git submodule init && git submodule update -r
) - Install docker. Make sure you have the right version for your graphic-card installed (e.g. docker-nvidia2 for NVIDIA graphics cards)!
- Install
terminator
using your systems package manager (e.g.sudo apt install terminator
).
There's no further configuration needed, but you might want to take a look at these:
- To run in an isolated environment the container use their own docker network called
turtlebot
. If you want to access it from the host network you might want to change tonetwork-mode: host
and remove theturtlebot
-network entries. - Configure ROS_DOMAIN_ID (default 30) and TURTLEBOT3_MODEL (default burger) if you like to run multiple robots.
After you installed docker and terminator you can directly call the ./run.bash
-script, it starts the robot in the basic Turtlebot environment as well as everything that is needed for autonomous navigation and rviz2.
Note that you don't need to run the build script, the image is pushed to docker hub, just run docker-compose pull
!
If you want to rebuild the docker-container and do not want to use the provided container from docker hub you can force a rebuild it by running ./build.bash
in the subfolder.
If you like to run custom ROS commands you can do so by going into the remote-pc
-folder and execute ./turtlebot.bash YOUR_ROS_COMMAND
like so:
cd remote-pc
./turtlebot.bash ros2 topic list
When you close the terminator-window docker-compose down
will be executed in the remote_pc
and simulated_turtlebot
subfolders to stop all remaining docker instances. Note that this might also stop other docker container you are running!
Please use the issue tracker to submit bug reports and feature requests. Please use merge requests as described here to add/adapt functionality.
This code is distributed under the 3-clause BSD license.
Andreas Bresser, [email protected]