git clone https://github.com/j3soon/ros2-essentials.git
cd ros2-essentials/cartographer_ws/docker
docker compose pull
docker compose up -d --build
-
Attach to the container
docker attach ros2-cartographer-ws cd /home/ros2-essentials/cartographer_ws
-
Open the turtlebot simulation in
tmux
export TURTLEBOT3_MODEL=burger ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
-
Run the SLAM node in new window of
tmux
ros2 launch turtlebot3_cartographer cartographer.launch.py is_sim:=True
-
Run the control tool in new window of
tmux
rqt_robot_steering
docker attach ros2-cartographer-ws
cd /home/ros2-essentials/cartographer_ws
rosdep update
rosdep install --from-paths src --ignore-src --rosdistro humble -y
colcon build
After the build process, make sure to source the
install/setup.bash
file.
Otherwise, ROS2 will not locate the executable files. You can open a new terminal to accomplish this.
-
multi_lidar_desp package: Description of a robot with multiple LiDARs.
-
multi_lidar_gazebo package: Gazebo simulation of the robot with robot state publisher.
ros2 launch multi_lidar_gazebo multi_lidar_gazebo.launch.py
-
Run the cartographer SLAM node in new window of
tmux
ros2 launch cartographer_demo cartographer_demo.launch.py is_sim:=True
-
Run the control tool in new window of
tmux
rqt_robot_steering