This repository contains a Gazebo Ignition simulation that can be run with ROS 2, enabling the simulation of 3 to 6 wheeled omnidirectional robots. This setup is particularly useful for robotics research and simulation, allowing for the study and testing of complex robot behaviors and control strategies.
- Ubuntu 24.04
- ROS Jazzy
- Gazebo Harmonic
3 wheel omni robot version 2 (3w_v2) -> default
Please clone this repository to your ros2 workspace. The following assume your ros2 work space placed on your home directory with named ros2_ws
cd ~/ros2_ws/src
git clone git@github.com:YePeOn7/ros2_omni_robot_sim.git
Install dependency by running the following command
cd ~/ros2_ws/ros2_omni_robot_sim
sudo chmod +x install_dependency.sh
./install_dependency.sh
build the package by using the following command
colcon build
source install/setup.bash
Determine the robot Model by setting the environment variable of OMNI_ROBOT_MODEL with the robot model listed on Available Robot Model. For example, if you want to use model of 3 wheel omni robot version 2, you can set as follow:
export OMNI_ROBOT_MODEL=3w_v2
After that you can run several of the following simulations
ros2 launch ros2_omni_robot_sim gazebo_sim.launch.py
or you can specity the world as follow
ros2 launch ros2_omni_robot_sim gazebo_sim.launch.py world:=<world_name>
please refer to World Options Section for <world_name>
Start the SLAM by using the following command
ros2 launch ros2_omni_robot_sim slam_gazebo_sim.launch.py
# with specific world
ros2 launch ros2_omni_robot_sim slam_gazebo_sim.launch.py world:=<world_name>
please refer to World Options Section for <world_name>
Save the map by using the following command
cd ~/ros2_ws/ros2_omni_robot_sim/map # You can use other folder, however you need reconfigure the launch file to use your map
ros2 run nav2_map_server map_saver_cli -f <map_name>
Recommendation: It is advised to use the world name as the <map_name>
when saving your map. This ensures the map is automatically picked up by the launch file without additional configuration.
- For example: If your world is named
maze1
, name your mapmaze1
as well. - Saved files will be:
maze1.pgm
andmaze1.yaml
.
This consistency simplifies navigation setup and avoids manual path adjustments in your ROS 2 launch files.
Start the SLAM by using the following command
ros2 launch ros2_omni_robot_sim navigation_gazebo_sim.launch.py
# with specific world
ros2 launch ros2_omni_robot_sim navigation_gazebo_sim.launch.py world:=<world_name>
please refer to World Options Section for <world_name>
- maze1
- maze2 (default)