Confusion with MAVLink routing with multiple planes

Hello All,
I am using two instances of SITL (MAVProxy) and connecting two each with Dronekit. I set the outputs for each to read in a unique python script, but when I I upload the mission waypoint file for the second plane, BOTH PLANES NOW HAVE THE SAME WAYPOINT FILE. I tried to set a unique system ID for each plane and the corresponding target system, but when vehicle.command.upload is called, it communicates with both vehicles. How can I get around this?? please help!!

You have to change the NetID in the radios themselves. You can do this via MP on the SIK Radio page. I used to think the SYS_THISMAVID or whatever the parameter is controlled that. It doesn’t. If you have two different vehicles using Mavlink, most likely if you haven’t set the SIK NetID, they default to 25 on all of them. Imagine how that goes over?

Just make sure each individual set of radios has a different NetID.

Thanks for the reply. I am currently still running everything in a simulation (SITL) without any radios attached. It seems I can’t adjust the SIK radio settings. Is there another way to adjust the NetID?
Thanks

There are some fundamental issues with pymavlink and talking to multiple vehicles.

I addressed these as part of my avoidance simulation work. The changes to pymavlink are to introduce a “mavsystem” object which filters traffic to come from/go to a single vehicle: https://github.com/peterbarker/mavlink/blob/mavsystem-object/pymavlink/mavutil.py#L1625

The avoidance work is here: https://github.com/peterbarker/dronekit-python/tree/source-system-filtering/examples/avoidance

Telemetry radio network IDs are not relevant during this sort of simulation.

1 Like