2. Cartographer Workspace
This repository contains the codebase for setting up the Cartographer SLAM. In this project, we use the Cartographer SLAM to build a map of the environment and localize the robot within the map.
2.1. Building docker image
Clone the repository:
git clone https://github.com/YuZhong-Chen/LLM-Navigation.git
Build the docker image:
cd LLM-Navigation/cartographer_ws/docker docker compose pull docker compose up -d --build
2.2. Building the workspace
Attach to the container:
docker attach ros2-cartographer-ws
Install the dependencies and build the workspace:
cd /home/ros2-essentials/cartographer_ws rosdep update rosdep install --from-paths src --ignore-src --rosdistro humble -y colcon build
2.3. Simple test
Attach to the container:
docker attach ros2-cartographer-ws tmux
Run the simulation in tmux session:
export TURTLEBOT3_MODEL=burger ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
Open another tmux session and run the Cartographer SLAM:
source install/setup.bash ros2 launch cartographer_ros cartographer.launch.py
Open another tmux session to control the robot (Optional):
rqt_robot_steering
Note
For more details, please refer to the README.md
file in the repository.