# Trouble with ROS 2 offboard control for multi-vehicle simulation

**URL:** <https://discuss.px4.io/t/trouble-with-ros-2-offboard-control-for-multi-vehicle-simulation/47049>\
**Category:** PX4 Autopilot\
**Created:** [August 18, 2025, 2:16am UTC](https://discuss.px4.io/t/trouble-with-ros-2-offboard-control-for-multi-vehicle-simulation/47049 "2025-08-18T02:16:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tylero](https://discuss.px4.io/user_avatar/discuss.px4.io/tylero/32/19998_2.png) [@tylero](https://discuss.px4.io/u/tylero)\
**Post date:** [August 18, 2025, 2:16am UTC](https://discuss.px4.io/t/trouble-with-ros-2-offboard-control-for-multi-vehicle-simulation/47049/1 "2025-08-18T02:16:54Z")

</div>

Hello everyone,

I’m currently working on a multi-vehicle simulation (drones + rovers) using Gazebo Garden, Ubuntu 22.04, and ROS 2 Humble. My goal is to control multiple vehicles (at least 5 of each) in offboard mode.

I’m starting with a two-vehicle setup to test the basics, but I’ve run into a communication issue. Here is my current launch process:

1. Start the Micro XRCE-DDS Agent:

2. Run a simple ROS 2 listener node.

3. Launch QGroundControl.

4. Launch the first vehicle using the standard make command:

5. launch the second vehicle with a unique instance ID

After these steps, when I check `ros2 topic list`, I can see topics for both the default vehicle (`/fmu/*`) and the namespaced vehicle (`/px4_1/fmu/*`).

### The Problem

I can successfully send offboard commands to the first vehicle launched with the `make` command. Whether I publish directly to the `/fmu/in/offboard_control_mode` topic or use the example `ros2 run px4_ros_com offboard_control`, it works perfectly.

However, the second vehicle (`px4_1`) does not respond to any ROS 2 commands. I’ve tried targeting its specific topics, but there seems to be no connection.

I also attempted the method described in the [official PX4 documentation for multi-vehicle simulation](https://docs.px4.io/main/en/sim_gazebo_gz/multi_vehicle_simulation.html), which involves setting namespaces in three separate terminals (`px4_1`, `px4_2`, etc.). When I follow that guide, I lose all ROS 2 communication with the vehicles entirely.

I have searched through the forums for similar issues but haven’t found a definitive solution that works for this Gazebo Garden and ROS 2 Humble environment.

Could someone please provide some guidance or point me to a working example? I am looking for the correct procedure to establish ROS 2 topic communication with two or more vehicles so they can be independently controlled in offboard mode.

Thank you in advance for your help!

---

<div class="post-metadata">

**Author:** ![youyas](https://discuss.px4.io/letter_avatar_proxy/v4/letter/y/e9c0ed/32.png) [@youyas](https://discuss.px4.io/u/youyas)\
**Post date:** [September 16, 2025, 5:43pm UTC](https://discuss.px4.io/t/trouble-with-ros-2-offboard-control-for-multi-vehicle-simulation/47049/2 "2025-09-16T17:43:25Z")

</div>

Hello,  
Have you been able to resolve this? I am encountering the same problem.

---

<div class="post-metadata">

**Author:** ![system](https://discuss.px4.io/uploads/default/original/3X/7/3/73ce918bdcd64854de904f0c8d9ab70ca9723f2a.png) [@system](https://discuss.px4.io/u/system)\
**Post date:** [December 15, 2025, 5:43pm UTC](https://discuss.px4.io/t/trouble-with-ros-2-offboard-control-for-multi-vehicle-simulation/47049/3 "2025-12-15T17:43:29Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
