Routing packets

I am routing the same packets from QGC to 3 PX4 instances for mission synchronization. It was designed a software to decode and code again the packets with the same mavlink ID to avoid conflicts between the three instances. All the PX4 have the same home_position but for the second and third pilots gives the same error because of the waypoints distance from home. Qgc_2
The first pilot (instance 0) works fine and receives the correct waypoint:
qgc_1

Does anyone suspects why the QGC is sending different waypoints to the other two pilots?

@stalone, Are you sure you uploaded the mission to all 3 PX4 instances? Once multiple vehicles are connected to QGC, it switch to multi-vehicle mode where it displays a drop down box with a list of all vehicles. Probably you might have to upload the mission to each individual UAV.

1 Like

That’s the point. I’m trying to fool the QGC giving just one source system(autopilot) in the mavlink messages.


And when QGC answers I decode again to change the target system to the autopilot number.

I’m doing something wrong. Right after uploading the mission when I start it, this happens for the other two autopilots. Just the first one is receiving the correct waypoints.

The autopilots react to the start mission commands from QGC because they (except the first one) start to print these messages for each time I try to start mission:

So the problem must be with the waypoints it receives from the mission upload. Can you tell me how the uploaded file is transferred (the Mavlink_Messages ID correspondent to the mission so I can catch them with my interface program, code to the three pilots and redirect them ).

Solved! I have studied command protocol in mavlink here: Mission Protocol · MAVLink Developer Guide
I missed some functions to decode and made some misunderstandings with mission_request and mission_request_int and between mission_item and mission_item_int. It is possible to control more than one vehicle with just one window but all the messages should be decoded and coded again with a singe mavlink ID using a middle software.
228918837_417750462950046_3030363668402874663_n

Cool. Also make sure to check out mavlink-router - GitHub - mavlink-router/mavlink-router: Route mavlink packets between endpoints

1 Like