Andino Gazebo Simulation
June 18, 2025 ยท View on GitHub
:clipboard: Description
This package provides a simulation environment for Andino in Gazebo Fortress relying on ros_gz to integrate it with ROS 2.
:clamp: Platforms
- ROS 2: Humble Hawksbill
- OS:
- Ubuntu 22.04 Jammy Jellyfish
- Gazebo:
- Fortress
:inbox_tray: Installation
From binaries
- Meet prerequisites: ROS 2 Humble installation
- Install
andino_gzpackagesudo apt install ros-humble-andino-gz - You can jump directly to Usage section and start using it.
From source using a containerized environment
- Clone this repository
git clone git@github.com:ekumenlabs/andino_gz.git
- Set up docker environment: Refer to docker readme
Once the container is running and dependencies have been installed you can proceed to package building.
:package: Build
The package contains some dependencies that must be installed in order to build it:
rosdep install --from-paths src -i -y
Then build the package and source the install workspace. To do so run the following commands:
colcon build
source install/setup.bash
:rocket: Usage
Andino simulation
Once the package is built and sourced, you can start a simulation.
ros2 launch andino_gz andino_gz.launch.py
Note: You can use world_name flag to indicate other world to use. (For example: populated_office.sdf(default), office.sdf, depot.sdf, empty.sdf)
By default the ros bridge and rviz are initialized. In case you prefer to disable any of those you can do it via its flags:
ros2 launch andino_gz andino_gz.launch.py ros_bridge:=False rviz:=False
To see a complete list of available arguments for the launch file do:
ros2 launch andino_gz andino_gz.launch.py --show-args
Using a different world:
ros2 launch andino_gz andino_gz.launch.py world_name:=depot.sdf
Make sure to review the required topics using ign topics and ros2 topic CLI tools.
Also, consider using looking at the translation entries under andino_gz/config/bridge_config.yaml.
:robot::robot::robot: Multi robot simulation
This simulation also supports multi-robot simulation.
ros2 launch andino_gz andino_gz.launch.py robots:="
andino1={x: 0.0, y: -1.0, z: 0.1, yaw: 0.};
andino2={x: -0.4, y: -0.9, z: 0.1, yaw: 0.};
andino3={x: -0.4, y: -1.1, z: 0.1, yaw: 0.};
andino4={x: -0.8, y: -0.8, z: 0.1, yaw: 0.};
andino5={x: -0.8, y: -1.2, z: 0.1, yaw: 0.};
andino6={x: -0.8, y: -1.0, z: 0.1, yaw: 0.};"
- Note1: You can add as many Andino as you want.
- Note2: If enabling Nav2(Using
nav2:=True) try first with 2 robots and see how they perform in your system before using more robots.
The launch file is in charge of:
- Start Gazebo simulator with a defined world (See '--world_name' flag)
- Spawn as many robots as commanded.
- Launch ros bridge for each robot.
- Launch Rviz visualization for each robot.
The simulation allows you to spawn as many robots as you want via the --robots flags.
For that, you can pass the information of the robots in some YAML format via ROS2 cli:
<robot_name>={x: 0.0, y: 0.0, yaw: 0.0, roll: 0.0, pitch: 0.0, yaw: 0.0};
- Note1: A ROS Namespace is pushed for each robot so all the topics and nodes are called the same with a difference of a
<robot_name>prefix. - Note2: For RViz2 to work with the ROS namespace that is pushed, one has to ensure that no absolute topics are being used.
:compass: Navigation
-
Run the simulation passing the
nav2flag.ros2 launch andino_gz andino_gz.launch.py nav2:=TrueAs before, you can launch as many robots as you want, for example launching two:
ros2 launch andino_gz andino_gz.launch.py nav2:=True robots:="andino1={x: 0.0, y: 0.0, z: 0.1, yaw: 0.};andino2={x: 0.0, y: 1.0, z: 0.1, yaw: 0.};"Once Gazebo window pops up, play the simulation using the gui.
Important!:
- When using
nav2flag, themapmust match the selectedworld. For example:- For
office.sdfandpopulated_office.sdfworlds, the map need to beoffice:ros2 launch andino_gz andino_gz.launch.py nav2:=True world_name:=office.sdf map:=office - For
depot.sdfworld, the map need to bedepot:
Typically, as this is the default world-map, there is no need to indicate them.ros2 launch andino_gz andino_gz.launch.py nav2:=True world_name:=depot.sdf map:=depot
- For
- When using
-
An RViz window will be spawned for each robot so it can be controlled independently. Use
2D Pose Estimateto pass a hint to AMCL where is the initial point. Note you have to do it per robot, namely, per RViz window.
-
Send the desired goal using Nav2 Goal
:world_map: SLAM
-
Run simulation with ros bridge and RViz.
ros2 launch andino_gz andino_gz.launch.py -
Run slam toolbox
ros2 launch andino_gz slam_toolbox_online_async.launch.pyConfiguration can be forwarded to the
slam_toolbox_node. By default, the configuration parameters are obtained from andino's configuration file. In case a custom file is wanted to be passed, simply use the launch file argument for indicating the path to a new file.ros2 launch andino_gz slam_toolbox_online_async.launch.py slams_param_file:=<my_path> -
Visualize in RViz: Add
mappanel to RViz and see how the map is being generated.
:raised_hands: Contributing
Issues or PRs are always welcome! Please refer to CONTRIBUTING doc.
Code development
Note that a Docker folder is provided for easy setting up the workspace.