Adding Custom Mavlink Message

Would anyone be willing to help me get a custom mavlink message working? Seems like in previous attempts, it has been suggested to use NAMED_VALUE_FLOAT. I am trying to add a message POSITION_TARGET_LOCAL_NED_TOTAL based off the POSITION_TARGET_LOCAL_NED message.

I understand there might be ways to do this in a hacky way, but I really want to do this correctly, because we will want to add new messages in the future.

My current setup is a blueROV running navigator with a pixhawk, my topside windows PC and a Jetson Nano connected to the Pixhawk through the telem2 port.

I am already able to interact with mavlink messages between the Jetson Nano and Pixhawk using MAVSDK in c++. I have been trying to rebuild the pixhawk firmware, MAVSDK on the Jetson and QGC on my topside computer to add my new message with no success. They all build, just no message showing up.

Anyone want to help me tackle this? I can’t find a good tutorial online, so I think it could help the community quite a bit to make a good reference

1 Like

Hi @cmarq,

It might be worth taking a look at the MAVLink contributing docs, and potentially joining their dev calls.

That said, that’s intended for adding messages to the MAVLink specification, so there may be limited help that can be provided through those channels for implementations in specific softwares (in which case you may need to go via the relevant channels for each software in question, if there are implementation issues).

Sorry, just to clarify, are you using two flight controllers at the same time (e.g. a Pixhawk AND a Navigator), or was your “navigator” supposed to be referring to the ArduSub firmware or something?

How are you checking for this? Like, have you checked the autopilot logs, and the control station software logs, to see whether the message is appearing there?

Hi Eliot,

apologies for the confusion. I am running the ardusub with a pixhawk, not navigator.

Where would the relevant logs be located to help me debug this? That sounds like a good way to debug this that I have not explored yet

  • The autopilot should have .bin logs onboard (which you can retrieve using QGC) that I believe record anything it gets sent, but it’s possible they only record its internal state (I’m not certain)
  • QGC generates .tlog telemetry log files that provide a record of all the MAVLink communications it receives
  • I haven’t used MAVSDK, but there may be a way to get it to record the messages, perhaps as a debug compilation flag or a command line argument passed in to your program

Hii @cmarq …

Are you created you custom mavlink message successfully??

I’m trying to create a custom mavlink message… Could you please help me to create the custom mavlink mesages??

Hi,

I was able to add the custom message successfully, but I could not get it to show up on qgroundcontrol. I have a jetson nano, pixhawk and topside PC trying to all communicate over mavlink and I was not able to make them all play nice together. I ended up just reusing an existing message as a carrier for my information even though the message attributes don’t necessarily match my needs

I really wish someone would put together a comprehensive tutorial on this, I just don’t currently have the time to really dig into it and do that. I just need it to work so I can finish out my research and graduate

2 Likes

If you don’t mine could you please help me with the steps you followed for custom message creation??

When i try to add custom messages i followed MAVLink Messaging | PX4 User Guide (main) this documentation and when i try to build the headers I’m getting errors and headers are not generating in the px4…