Note that you don't need to run the build script, the image is pushed to dockerhub, just run docker-compose pull
!
Run turtlebot3 REMOTE-PC nodes for navigation and cartographer in a local docker container.
This allows you either to communicate with a robot that runs ROS 2-foxy while your PC runs another Linux operating system or if you want to test without a full ROS-installation on your PC.
We assume you like to run with a simulated robot in Gazebo and use the same network, take a look at ros2-turtlebot3-gazebo-docker repository.
- Install docker. Make sure you have the right version for your graphic-card installed (e.g. docker-nvidia2 for NVIDIA graphics cards)!
- Configure the network. If you are NOT using the Gazebo Simulation from ros2-turtlebot3-gazebo-docker but real hardware you probably want to set the network to
network_mode: host
and remove thenetworks
-entry in thedocker-compose.yml
file. - (optional) Configure ROS_DOMAIN_ID (default 30) and TURTLEBOT3_MODEL (default burger) according to your hardware
- (optional) If you do not like to use the simulated environment with the
turtlebot3_world
-map either- Create a map with the cartographer (see Mapping and navigation with real hardware) or if you already have a map
- Copy your map to the
map
-folder and change the path for themap:=
-parameter in thenavigation.bash
-file accordingly
If you have ROS 2 foxy installed on your turtlebot ssh to the robot and run:
export TURTLEBOT3_MODEL=burger
ros2 launch turtlebot3_bringup robot.launch.py
- run
cartographer.bash
- in a new window run
./teleop.bash
to control the robot with your keyboard. - after you are happy with it run
save_map.bash
in a second terminal. - stop the cartographer and run
navigation.bash
.
Note that you can run any command from your terminal by prefixing it with "./remote.bash", take a look at the other bash-scripts in this folder
See ros2-turtlebot3-gazebo-docker for the integration of a simulated ROS 2 turtlebot using the docker-container and scripts from this repo for the "Remote-PC".
Don't forget to run docker-compose down
when you are done.
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, andreas.bresser@dfki.de
Based on the official turtlebot 3 ROS 2 navigation tutorial: https://emanual.robotis.com/docs/en/platform/turtlebot3/slam/