AS4SR/general_info

Connect multiple instances of SITL to Gazebo

Closed this issue · 1 comments

Hello. I want to simulate two instances of SITL at the same time in a world in Gazebo. For that, each instance must be in different MAVProxy ports (5760 and 5770, for example).

I have installed the ardupilot-gazebo plugin and managed to make it work with only one UAV in the standard port (5760). However, if MAVProxy is not on port 5760, it does not work. When running
sim_vehicle.py -v ArduCopter -f gazebo-iris --console -I 1
MAVProxy connects to the master via 127.0.0.1:5770 (it sums 10 for every instance). In this situation, the Gazebo plugin is not able to detect the Ardupilot controller. The SITL keeps itself Waiting for heartbeat from tcp:127.0.0.1:5770.

How can I work it around and make Gazebo connect to two instances of SITL?