How to get Vehicle State from C++ script?

Hello everyone.

I am looking for hardware to measure the state of a vehicle (position, attitude, velocity, etc.), put the data in a byte array and send it via udp wifi.

My question is: How can I access the vehicle state data from C++ script? I checked the examples (, but the scripts take the raw sensor and not the processed data (state). Do I need ROS or DroneKit or something, to get direct access to the vehicle state? If so, I’ve got the same question - how to access it from C++ script? Can you point me to an example or something.

Edit: It can also be Python instead of C++, if thats available.

Thank you in advance.
Best regards

Hi @Hans_S,

I suppose ROS will be useful for your application.

You can start with ROS guide for Navio2 in our docs. I think rostopic tool should help you with getting data.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.