Cartographer¶
ROS2 Cartographer. (Only installed by default for the template workspace.)
To enable Cartographer, set the CARTOGRAPHER argument to YES in the compose.yaml file of your desired workspace (e.g., husky_ws/docker/compose.yaml). After making these changes, rebuild the Docker image.
TODO: Remove duplicate content from the template workspace below.
🐳 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/template_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 buildcommand 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/template_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.bashfile.
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