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

**URL:** <https://discourse.openrobotics.org/t/gsoc-2026-scalable-multi-robot-simulation-in-ros-2-and-gazebo/59454>\
**Category:** Projects\
**Tags:** ros2, gazebo\
**Created:** [November 2, 2026, 4:19pm UTC](https://discourse.openrobotics.org/t/gsoc-2026-scalable-multi-robot-simulation-in-ros-2-and-gazebo/59454 "2026-11-02T16:19:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![C88-YQ](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/c88-yq/32/33696_2.png) [@C88-YQ](https://discourse.openrobotics.org/u/C88-YQ)\
**Post date:** [November 2, 2026, 4:19pm UTC](https://discourse.openrobotics.org/t/gsoc-2026-scalable-multi-robot-simulation-in-ros-2-and-gazebo/59454/1 "2026-11-02T16:19:28Z")

</div>

**Organization:** Open Robotics

**Contributor:** Jiayi Cai ([@C88-YQ](https://github.com/C88-YQ))

**Mentor:** Addisu Taddese ([@azeey](https://github.com/azeey))

**Community Meeting Talk** : [Talk video](https://discourse.openrobotics.org/t/community-meeting-scalable-multi-robot-simulation-in-ros-2-and-gazebo/58728); [Talk slides](https://drive.google.com/file/d/1OE7A9P7ik2KODszhehTak1SLIAJcTmdY/view?usp=sharing)

## 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.

 ![Model namespace support](https://us1.discourse-cdn.com/flex022/uploads/ros/original/3X/7/a/7aa4e07b1ee024239cd22b5ffe6b77f9bd66679d.jpeg)

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.

 ![Automated birdge](https://us1.discourse-cdn.com/flex022/uploads/ros/original/3X/8/b/8b9c2c705781f08831bac5a94e0d59e0f9518fbf.jpeg)

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:

```yaml
# 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:**

- [Model Namespace](https://github.com/gazebosim/docs/pull/719) — How to configure and use model namespaces.
- [Automated Bridge](https://github.com/gazebosim/docs/pull/721) — How to enable and configure automated bridging.
- [Multi-Robot Tutorial](https://github.com/gazebosim/docs/pull/722) — How to use both features together in multi-robot simulations.

**Demos:**

- [Multi-Robot Demo](https://github.com/gazebosim/ros_gz/pull/978) — Demonstrates model namespaces and automated bridging with multiple robots.
- [Warehouse Demo](https://github.com/azeey/gsoc2026_multirobot/tree/main/warehouse) — 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](https://github.com/gazebosim/sdformat/pull/1663) | Add support for namespace attribute on \<model\> | ✅ Merged |
| [gz-sim #3777](https://github.com/gazebosim/gz-sim/pull/3777) | Add namespace component | ✅ Merged |
| [gz-sim #3872](https://github.com/gazebosim/gz-sim/pull/3872) | Display namespace in gui | ✅ Merged |
| [gz-sim #3897](https://github.com/gazebosim/gz-sim/pull/3897) | Add helper functions for namespaced topic resolution and unit test setup | ✅ Merged |
| [gz-sim #3871](https://github.com/gazebosim/gz-sim/pull/3871) | Support entity\_namespace in user commands entity creation | ✅ Merged |
| [gz-msgs #595](https://github.com/gazebosim/gz-msgs/pull/595) | Add EntityFactoryWithNs | ✅ Merged |
| [gz-msgs #612](https://github.com/gazebosim/gz-msgs/pull/612) | Add entity\_namespace to EntityFactory | ✅ Merged |
| [gz-msgs #616](https://github.com/gazebosim/gz-msgs/pull/616) | Deprecate EntityFactoryWithNs and EntityFactoryWithNs\_V | ✅ Merged |
| [gz-sim #4057](https://github.com/gazebosim/gz-sim/pull/4057) | UserCommands: Deprecate EntityFactoryWithNs and EntityFactoryWithNs\_V | 🔄 Under review |
| [ros\_gz #925](https://github.com/gazebosim/ros_gz/pull/925) | Add entity\_namespace support for spawned entities | ✅ Merged |
| [ros\_gz #1005](https://github.com/gazebosim/ros_gz/pull/1005) | Replace EntityFactoryWithNs with EntityFactory for entity creation | 🔄 Under review |
| [gz-sim #3878](https://github.com/gazebosim/gz-sim/pull/3878) | Add namespace support to DiffDrive | ✅ Merged |
| [gz-sim #4004](https://github.com/gazebosim/gz-sim/pull/4004) | DiffDrive: Add support for custom enable topic | ✅ Merged |
| [gz-sim #4067](https://github.com/gazebosim/gz-sim/pull/4067) | Document namespace support in DiffDrive parameters | ✅ Merged |
| [gz-sim #4066](https://github.com/gazebosim/gz-sim/pull/4066) | MecanumDrive: Add namespace support | 🔄 Under review |
| [gz-sim #4136](https://github.com/gazebosim/gz-sim/pull/4136) | AckermannSteering: Add namespace support | 🔄 Under review |
| [gz-sim #4141](https://github.com/gazebosim/gz-sim/pull/4141) | TrackedVehicle & TrackController: Add namespace support | 🔄 Under review |
| [gz-sim #4147](https://github.com/gazebosim/gz-sim/pull/4147) | JointController & JointPositionController: Add namespace support | 🔄 Under review |
| [gz-sim #4164](https://github.com/gazebosim/gz-sim/pull/4164) | ApplyJointForce: Add custom topic support and namespace support | 🔄 Under review |
| [gz-sim #4166](https://github.com/gazebosim/gz-sim/pull/4166) | DriveToPoseController: Add custom topic support and namespace support | 🔄 Under review |
| [gz-sim #4041](https://github.com/gazebosim/gz-sim/pull/4041) | Add namespace support to rendering sensor | 🔄 Under review |
| [gz-sim #4050](https://github.com/gazebosim/gz-sim/pull/4050) | Add namespace support to sensor plugins | 🔄 Under review |
| [gz-sim #4052](https://github.com/gazebosim/gz-sim/pull/4052) | Add namespace support to sensor plugins | 🔄 Under review |
| [docs #719](https://github.com/gazebosim/docs/pull/719) | Document namespace support | 🔄 Under review |
| Automated Bridge | [gz-transport #967](https://github.com/gazebosim/gz-transport/pull/967) | Add Node::AllTopicInfo | ✅ Merged |
| [ros\_gz #923](https://github.com/gazebosim/ros_gz/pull/923) | Support automated bridging | 🔄 Under review |
| [docs #721](https://github.com/gazebosim/docs/pull/721) | Document automated bridge | 🔄 Under review |
| Demo | [ros\_gz #978](https://github.com/gazebosim/ros_gz/pull/978) | Add multi-robot namespace and automated bridge demo | 🔄 Under review |
| [docs #722](https://github.com/gazebosim/docs/pull/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.

---

<div class="post-metadata">

**Author:** ![azeey](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/azeey/32/6795_2.png) [@azeey](https://discourse.openrobotics.org/u/azeey)\
**Post date:** [November 2, 2026, 5:34pm UTC](https://discourse.openrobotics.org/t/gsoc-2026-scalable-multi-robot-simulation-in-ros-2-and-gazebo/59454/2 "2026-11-02T17:34:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![peci1](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/peci1/32/10145_2.png) [@peci1](https://discourse.openrobotics.org/u/peci1)\
**Post date:** [November 2, 2026, 11:41pm UTC](https://discourse.openrobotics.org/t/gsoc-2026-scalable-multi-robot-simulation-in-ros-2-and-gazebo/59454/3 "2026-11-02T23:41:23Z")

</div>

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