Running Gazebo-simulation with more than 10 drones


I’m running a multicopter simulation as SITL using MAVSDK and Gazebo. For each copter, I launch a separate instance of a software which connects to the copter via UDP port 14540 + i. Everything is working fine, until I want to increase the number of copters further than 10. Following the manual, the maximum port is 14549 and each additional copter will be bound to this port. While this would be working fine, if I have one running connection to control multiple copters, this seems to be an issue if I have a single UDP-connection for each copter. As soon as I’m trying to connect the second copter to the UDP port 14549, I get an error message stating that the Port is already in use, which of course is correct.
Is there a way to change the default udp port so that I have more available ports? Maybe something like 16000 upwards?

I would appreciate any help.


For the sake of documentation: if anybody in future runs in the same problem, I think I found the corresponding file. Its down there in /PX4-Autopilot/build/px4_sitl_default/etc/init.d-posix. Changing it seems to be working, but it may break something. No promises from my side.