Cartographer¶
🐳 Start Container¶
Make sure your system meets the system requirements and have followed the setup instructions before using this workspace.
Run the following commands in a Ubuntu desktop environment. If you are using a remote server, make sure you're using a terminal within a remote desktop session (e.g., VNC) instead of SSH (i.e., don't use ssh -X
or ssh -Y
).
cd ~/ros2-essentials/cartographer_ws/docker
docker compose build
xhost +local:docker
docker compose up -d
# The initial build will take a while, please wait patiently.
If your user's UID is
1000
, you may replace thedocker compose build
command withdocker compose pull
.
The commands in the following sections assume that you are inside the Docker container:
If the initial build somehow failed, run:
Once you have finished testing, you can stop and remove the container with:
Simple Test With Turtlebot3¶
-
Attach to the container
- Open the turtlebot simulation intmux
- Run the SLAM node in new window oftmux
- Run the control tool in new window oftmux
Building Packages¶
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 - Single Robot SLAM test¶
Simulation¶
- multi_lidar_desp package: Description of a robot with multiple LiDARs.
-
multi_lidar_gazebo package: Gazebo simulation of the robot with robot state publisher.
Run the SLAM node¶
- Run the cartographer SLAM node in new window of
tmux
- Run the control tool in new window of
tmux