[GSoC 2026] Scalable Multi-Robot Simulation in ROS 2 and Gazebo

Organization: Open Robotics

Contributor: Jiayi Cai (@C88-YQ)

Mentor: Addisu Taddese (@azeey)

Community Meeting Talk: Talk video; Talk slides

Project Overview

Multi-robot simulation is widely used in robotics research and development, including warehouse automation, robot swarms, and multi-robot coordination.

However, setting up a multi-robot simulation in ROS 2 and Gazebo can require a lot of repetitive configuration.

There are two main challenges:

  1. Communication isolation: When multiple robots share the same SDF model, they may also share the same topic and service names, leading to conflicts. Users often need to create separate SDF files or use templates to configure different names for each robot.
  2. ROS-Gazebo bridge configuration: Each robot usually requires several topic and service bridges. As the number of robots increases, manually maintaining these configurations becomes more difficult.

The goal of this GSoC project was to simplify multi-robot simulation by introducing two main features:

  • Model namespace support: Allow multiple robots to share the same SDF model while keeping their communication interfaces separate.
  • Automated ROS-Gazebo bridging: Automatically discover and create bridges for matching ROS 2 and Gazebo topics and services, reducing manual configuration.

These features aim to make multi-robot simulations easier to set up, maintain, and scale.

Main Work

1. Model Namespace Support

The first major part of the project was introducing model namespace support across SDFormat, Gazebo Sim, and ROS-Gazebo integration.

With this feature, users can assign a namespace to a model, allowing supported Gazebo plugins to use it when resolving topic and service names.

Namespaces can be configured directly in SDF files using the <model> namespace attribute or the <include> namespace element. They can also be specified when spawning models at runtime.

For nested models, namespaces are resolved by searching from the current model up through its parents, combining relative namespaces until an absolute namespace is found. The resolved namespace is then used as a prefix for default and relative topic and service names, while absolute names remain unchanged.

Backward compatibility is preserved, so models without a namespace continue to use their existing topic and service naming behavior.

This feature provides a consistent approach for handling topic and service names across Gazebo plugins. It also allows multiple robots to share the same SDF model while keeping their communication interfaces separate, making multi-robot simulations much easier to set up and maintain.

Namespace support has been added to DiffDrive and extended to other drive plugins and sensors, with several PRs still under review.

2. Automated ROS-Gazebo Bridge

Previously, users needed to manually configure the names, message types, and communication directions of their bridges. This becomes repetitive when working with many robots that have similar communication interfaces.

The new automated bridge can discover matching topics and services on the ROS 2 and Gazebo sides and create the corresponding bridges. As illustrated below, the process consists of three main steps: discovering available interfaces, matching them based on their names and compatible message types, and creating the required bridges.

The feature is optional and can be enabled using the automated_bridge.enable parameter. It also provides two optional configuration parameters:

  • include_patterns: Select which topics and services should be considered.
  • exclude_patterns: Exclude specific topics and services from automated bridging.

For example, the following configuration enables automated bridging for interfaces under /robot1 while excluding camera-related topics:

# example
ros_gz_bridge:
  ros__parameters:
    automated_bridge:
      enable: true
      include_patterns:
        - "/robot1.*"
      exclude_patterns:
        - ".*camera.*"

The automated bridge continuously checks for new interfaces, allowing it to discover topics and services created after the simulation starts.

It also supports using manual and automated bridge configurations together. Within the same bridge instance, manually configured bridges take priority, and automated bridging handles the remaining interfaces.

To evaluate the overhead of continuous discovery and matching, I tested the automated bridge with a simulation containing 12 robots, 124 Gazebo topics, and 94 Gazebo services, along with a separate ROS 2 node providing 115 topics and 44 services. With actual bridge creation disabled during this test, average CPU usage increased from 2.44% to 3.32%, while memory usage remained nearly unchanged. This suggests that the discovery and matching process adds relatively little overhead in the tested setup.

3. Documentation and Demos

Three documentation updates and two demos were prepared to demonstrate the new features and help users get started.

Documentation:

Demos:

  • Multi-Robot Demo β€” Demonstrates model namespaces and automated bridging with multiple robots.
  • Warehouse Demo β€” Demonstrates independent control of four Mecanum-wheel robots sharing the same SDF model.

Project Status and Pull Requests

The project involved changes across several repositories, including sdformat, gz-msgs, gz-sim, gz-transport, ros_gz, and Gazebo documentation. As of 1st November 2026, the core namespace infrastructure and several related features have been merged, while some plugin integrations, automated bridging, demos, and documentation are still under review.

The following table lists all PRs for the project:

Feature PR Title Status
Namespace Support sdformat #1663 Add support for namespace attribute on <model> βœ… Merged
gz-sim #3777 Add namespace component βœ… Merged
gz-sim #3872 Display namespace in gui βœ… Merged
gz-sim #3897 Add helper functions for namespaced topic resolution and unit test setup βœ… Merged
gz-sim #3871 Support entity_namespace in user commands entity creation βœ… Merged
gz-msgs #595 Add EntityFactoryWithNs βœ… Merged
gz-msgs #612 Add entity_namespace to EntityFactory βœ… Merged
gz-msgs #616 Deprecate EntityFactoryWithNs and EntityFactoryWithNs_V βœ… Merged
gz-sim #4057 UserCommands: Deprecate EntityFactoryWithNs and EntityFactoryWithNs_V πŸ”„ Under review
ros_gz #925 Add entity_namespace support for spawned entities βœ… Merged
ros_gz #1005 Replace EntityFactoryWithNs with EntityFactory for entity creation πŸ”„ Under review
gz-sim #3878 Add namespace support to DiffDrive βœ… Merged
gz-sim #4004 DiffDrive: Add support for custom enable topic βœ… Merged
gz-sim #4067 Document namespace support in DiffDrive parameters βœ… Merged
gz-sim #4066 MecanumDrive: Add namespace support πŸ”„ Under review
gz-sim #4136 AckermannSteering: Add namespace support πŸ”„ Under review
gz-sim #4141 TrackedVehicle & TrackController: Add namespace support πŸ”„ Under review
gz-sim #4147 JointController & JointPositionController: Add namespace support πŸ”„ Under review
gz-sim #4164 ApplyJointForce: Add custom topic support and namespace support πŸ”„ Under review
gz-sim #4166 DriveToPoseController: Add custom topic support and namespace support πŸ”„ Under review
gz-sim #4041 Add namespace support to rendering sensor πŸ”„ Under review
gz-sim #4050 Add namespace support to sensor plugins πŸ”„ Under review
gz-sim #4052 Add namespace support to sensor plugins πŸ”„ Under review
docs #719 Document namespace support πŸ”„ Under review
Automated Bridge gz-transport #967 Add Node::AllTopicInfo βœ… Merged
ros_gz #923 Support automated bridging πŸ”„ Under review
docs #721 Document automated bridge πŸ”„ Under review
Demo ros_gz #978 Add multi-robot namespace and automated bridge demo πŸ”„ Under review
docs #722 Add multi-robot tutorial with namespaces and automated bridging πŸ”„ Under review

Future Work

1. Extending Namespace Support

Namespace support will continue to be extended to the remaining Gazebo plugins and sensors. Some PRs are already under review, and additional issues have been prepared for community contributors.

2. Handling TF Frame IDs

Although namespaces can separate TF topics for different robots, the frame IDs inside TF messages may still conflict.

Two possible approaches are to maintain independent TF trees for each robot or rewrite frame IDs on the ROS 2 side before combining them. Future work will explore supporting namespace-based frame ID prefixes directly in Gazebo.

3. Further Improvements to Automated Bridging

The discovery and direction inference logic developed for automated bridging could also be used to simplify manual bridge configuration, reducing the need to specify message types and bridge directions manually.

Acknowledgments

Sincere thanks to my mentor, Addisu Taddese, for his excellent guidance and support throughout the project, and to the Gazebo and Open Robotics community members for their valuable feedback, reviews, and suggestions.

Working on this project has been a great learning experience, especially in open-source development and collaboration. I’m grateful to Google Summer of Code and Open Robotics for this opportunity and look forward to continuing my contributions to Gazebo.

7 Likes

It has been an absolute pleasure mentoring you over the last few months. You have been extremely well organized, thorough in your research and implementation and very effective in your communication. The complexity of the project has grown beyond what I anticipated, but you have risen to the occasion. Thank you for all you wonderful contributions to Gazebo, including those that lie outside of the focus of this GSoC project!

Now that we have this foundation for simplifying multi-robot simulation in Gazebo and ROS 2, it is my hope that we’ll continue building on it. I invite the community to engage with us in completing the items listed in the Future Works section.

1 Like

This is an awesome and important job you’ve done!

1 Like