0

I am new with DroneApi. I would to know how i can read a custom message using the DroneApi. I created a personal mavlink message that send me the value of a sensor. I would to know how i can read this new message using the DroneApi. Thank you.

Edit from comments: I followed this guide dev.ardupilot.com/wiki/apmcopter-code-overview/…. After being added my custom message my apm send each second the value of sensor by mavlink message. Now i would to read this message using a python script with DroneApi but i don't know how. Sorry for my english.

rroche
  • 1,262
  • 1
  • 13
  • 29
  • Can you show us what you have tried so far? – Voidpaw May 18 '15 at 15:16
  • 1
    I followed this guide http://dev.ardupilot.com/wiki/apmcopter-code-overview/code-overview-adding-a-new-mavlink-message/. After being added my custom message my apm send each second the value of sensor by mavlink message. Now i would to read this message using a python script with DroneApi but i don't know how. Sorry for my english. – Enzo Buono May 18 '15 at 15:26

1 Answers1

0

This is not currently supported - see Issue #169.

Commands are sent from DroneKit-Python using Vehicle.send_mavlink() (and the message_factory). There are a few examples of sending messages in the guide. For this to work the command has to be supported in the vehicle’s GCS_MAVLink.cpp file (otherwise the message will be recieved but the vehicle won't know what to do with it).

The problem is that you can send the message and the autopilot will respond. However in DroneKit there is no support yet for getting a specific response to the sent message back and handling it.

Your only option at the moment is to hook all messages and see if you can extract the one that is of interest to you. I have not tried this!

Hamish Willee
  • 372
  • 1
  • 3
  • 11