Hello! I am trying to create a gazebo simulation with multiple drones that I want to fly to different positions in a gazebo world to simulate a surveying task. However, I have been struggling to load and control multiple drones in a gazebo world. I am using the PX4-Autopilot firmware, gazebo-classic 11 and ROS2 foxy running on ubuntu 20.04, and I am using the XRCE-DDS bridge for the client-agent communication. I am able to load one iris model in a gazebo world by running make px4_sitl gazebo-classic under the PX4-Autopilot directory, and I can control it by starting an XRCE-DDS agent and running some example nodes in the px4_ros_com package found on GitHub - PX4/px4_ros_com: ROS2/ROS interface with PX4 through a Fast-RTPS bridge (ex: I can run the offboard_control node successfully). I can also load multiple drones (px4 iris models) in a gazebo world by running ./Tools/simulation/gazebo-classic/sitl_multiple_run.sh -t px4_sitl_rtps m iris n 2 under the PX4-Autopilot directory, however I canât figure out how to interface them with ros2 in order to control them. These are a few questions I have about this:
How can I control multiple iris models using ros2 nodes after loading them in a gazebo world using the aforementioned ./Tools/simulation/gazebo-classic/sitl_multiple_run.sh t px4_sitl_rtps m iris n 2 command? How can I load multiple px4 iris models in a custom gazebo-classic world? Do I need to start multiple micro-XRCE agents in order to control multiple drones in a Gazebo-classic simulation using ros2 nodes? Any help about these questions would be greatly appreciated, even if itâs directing me to the right resources/documentations. I am relatively new to using ROS2 with gazebo for px4 drones simulations, so I know these questions might be trivial, but I am kinda stuck and any help would very useful. Thank you!