Mavlink Ports for Multiple drones using Gazebo and ROS

I want to have multiple drones with depth cameras and obstacle avoidance. So, I am combining the multi_vehicle_simulation, and PX4-Avoidance repositories, however, after doing everything I am getting the following warning on the screen and for the second drone, the obstacle avoidance does not work:

This is while I can see point clouds for both drones and everything seems fine in the aspect of the topics and publishing data.
From the picture, I can see that the last generated ports for both drones are the same:
INFO [mavlink] mode: Onboard, data rate: 4000000 B/s on udp port 14559 remote port 14541

How can I fix this? Where these ports can be edited?

The ports I have defined are based on the former mentioned repository launch files and for the second drone I have used the same ones plus one:

@JulianOes Sorry I am mentioning you here, but I saw you were talking about Mavlink problems in other posts, so I was wondering if you could give me a hint here as well. I appreciate it so much.

Do you mean these?

Thank you so much for your reply. No, actually these are not the ones I looked for. There is another one which is a Mavlink start for the gazebo model with obstacle avoidance and uses other ports (14541 and 14559) for my case, and I had to change them inside the model file.

1 Like