This repository contains a humble with turtlebot3 and Gazebo.
git clone https://github.com/suchetanrs/MultiRobotSLAM
cd MultiRobotSLAM
cd MultiRobotSLAM
sudo chmod +x docker_install.sh
./docker_install.sh
- Build the image:
sudo docker build -t ros2-base:22.04 .
- Add
xhost +
to your.bashrc
to support correct x11-forwarding usingecho "xhost +" >> ~/.bashrc
source ~/.bashrc
- You can see the built images on your machine by running
sudo docker images
.
cd MultiRobotSLAM
(ignore if you are already in the folder)sudo docker compose run ros2-base
- This should take you inside the container. Once you are inside, run the command
xeyes
and a pair of eyes should pop-up. If they do, x11 forwarding has correctly been setup on your computer.
Launch the container using steps in (4).
source /opt/ros/humble/setup.bash
cd /root/ros2_ws/
colcon build --symlink-install
source install/setup.bash
Launch the container using steps in (4). If you are inside the container, run the following:
ros2 launch gazebo_ros gazebo.launch.py
Since this is the first time, it will take a while to load gazebo. Please be patient. It will load well from the second time.
Remember to source /opt/ros/humble/setup.bash as well as ros2_ws/install/setup.bash