Unable to Arm Drones in Multi-Vehicle SITL Setup with PX4 and MicroXRCEAgent

Issue: Unable to Arm Drones in Multi-Vehicle SITL Setup with PX4 and MicroXRCEAgent

Description:

I am running a multi-vehicle SITL simulation using the PX4 toolchain and Gazebo Classic with the following setup:

  1. Spawn Command:

    ./Tools/simulation/gazebo-classic/sitl_multiple_run.sh -m iris -n 4
    

    This successfully spawns 4 Iris drones in Gazebo.

  2. MicroXRCEAgent:
    I am running the MicroXRCEAgent to bridge DDS/RTPS communication:

    MicroXRCEAgent udp4 -p 8888
    

    This also starts without any errors.

  3. PX4-Autopilot
    I am running this to connect the PX4 with the gazebo
    PX4-Autopilot/build/px4_sitl_default/bin/px4
    but it is not connecting. It says INFO [simulator_mavlink] Waiting for simulator to accept connection on TCP port 4560 but does not find it.
    Issue:
    I am unsure of the correct procedure to arm the drones after they are spawned. Specifically:

  • Which topics and messages should be used for arming the drones and setting modes (e.g., OFFBOARD)?
  • Are there any prerequisites or additional steps required to ensure the drones can be armed successfully?

Additional Context:

  • The drones spawn correctly in the Gazebo simulation, and I can inspect topics and messages via ros2 topic list.
  • I need guidance on sending the appropriate messages to arm and control the drones.

I have been stuck on this issue for a very long time any insights or suggestions would be greatly appreciated!

I meet the same problem they can not arm by vehivle command

Hey, try referring to this Github repo we were able to arm the drones and take them off the ground.