Mavlink difference between px4 and ardupilot

Statement 1 why does someone have to write two versions of code on say there raspberry pi to support the same functions of two different firmwares that both run there own version of Mavlink, or have to make a highly complicated single version that supports both types of Mavlink that are also subject to change no?

So I have an my own raspberry pi that I have connected to Telem 1 port of say a cube orange.

The idea is to capture GPS and RC channel information, really just listening to these data parts streams or whatever you want to call them, to control other things connected to my raspberry pi.

I know that GPS fix types are different between PX4 and Ardupilot making the code have to work around these fix types in order to be able to log GPS information correctly.

And for some reason when using PX4 firmware I get a tone of packet loss for unknown reason yielding poor RC channel responds. does anyone know why this might be? my code works fine with ardupilot but really need it to work with PX4, I can’t believe there not directly cross compatible.

The baud rate is correct, for my embedded computer not sure what else to try, is there some configuration that I am missing on the PX4 end?

1 Like

Statement 1 why does someone have to write two versions of code on say there raspberry pi to support the same functions of two different firmwares that both run there own version of Mavlink, or have to make a highly complicated single version that supports both types of Mavlink that are also subject to change no?

Because the two stacks can choose what messages or parts of the messages they implement, and because some of the microservices implementations have subtle (or not so subtle) differences in implementation. A lot of work has been done to attempt to align the communities but without much success. Using a compatibility layer such as MAVSDK or ROS usually abstracts the differences, if that approach works for you.

The baud rate is correct, for my embedded computer not sure what else to try, is there some configuration that I am missing on the PX4 end?

Is your TELEM 1 port configured correctly on PX4? Generally you would use the TELEM2 port for this, configured as per: MAVLink Peripherals (GCS/OSD/Companion) | PX4 User Guide. The baud rate for a serial link can be much higher, but good to start with this as it is the default, and known to work out of the box for many common connections, including telem radios.

I don’t understand why we should use Telem 2 vs 1 what is the difference each can have mavlink running on it no?, Its working to a degree on Telem 3 serial port which is configured with mavlink instance 1, I need to check again, reverting changes that somewhat helped more on that later.