I'm just starting up with modifying px4 firmware to add an additional three measurements to my EKF measurement model. These measurements are the vehicle's local position w.r.t some reference point in NED coordinate frame. These measurements are gathered from an onboard camera recognising ArUco codes (like QR codes) placed at known locations around a room. The images are processed and the vehicle's position w.r.t these tags is estimated.
I've packed these measurements into a mavlink message (LOCAL_POSITION_NED (#32)) message and am sending it to my Pixracer via serial connection.
My question is this: how do I subscribe to this message coming in? Do I need to create a custom uOrb message? I'd like to modify the EKF to make use of these three additional position measurements.
Would I add something like orb_subscribe(ORB_ID(custom_orb_message)) in the ekf::ekf constructor and then an orb_check( ) in the ekf::run() function?
A big hurdle for me right now is subscribing to this mavlink message and unpacking it into position measurements.
Any help on this matter would be greatly appreciated.
EDIT: I've updated the mavlink_receiver.h and mavlink_receiver.cpp to receive mavlink_position_local_ned message type. Can I use the topic to publish this mavlink message?