ROS2 Humble workspace for simulating a TurtleBot4 and Hello Robot Stretch in a shared Gazebo environment.
- Ubuntu 22.04 LTS
- ROS2 Humble
- Ignition Fortress v6.x
source /opt/ros/humble/setup.bash
Or if using zsh:
source /opt/ros/humble/setup.zsh
sudo apt install ros-humble-turtlebot4-simulator ros-humble-irobot-create-nodes
sudo apt-get update && sudo apt-get install wget
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
sudo apt-get update && sudo apt-get install ignition-fortress
Verify installed:
ign gazebo --version
ros2 launch turtlebot4_ignition_bringup turtlebot4_ignition.launch.py slam:=true nav2:=true rviz:=true
cd $HOME
git clone https://github.com/fabu11/sntb4_ws.git
cd $HOME/sntb4_ws
colcon build --symlink-install --packages-up-to dual_robot
source $HOME/sntb4_ws/install/setup.sh
Or if using zsh:
source $HOME/sntb4_ws/install/setup.zsh
ros2 launch dual_robot dual_robot.launch.py
ros2 launch dual_robot dual_robot.launch.py --show-args
This project uses two launch files:
- stretch_spawn_only.launch.py
- dual_robot.launch.py
This launch file spawns in the Hello Robot stretch in any existing gazebo world. Dependent on stretch_gz_sim which can be found in the package stretch_ros2.
This launch file utilizes the Turtlebot4 debian packages to launch the Turtlebot4 and Gazebo at the same time. Once these are loaded, stretch_spawn_only.launch.py is used to spawn the stretch in the same world.
By default, the world is set to warehouse.sdf
- warehouse.sdf
- depot.sdf
- maze.sdf
This repository utilizes gazebo port made by Cardiff University. Their port was built for Gazebo Sim Harmonic. To utilize the simulation on Ignition Fortress, the URDF was ported.