How to receive data from autopilot after sending COMMAND_LONG

I am trying to communicate between the FC and the Rasberry Pi 3. Currently, I’m using mavros_msgs/CommandLong.srv to send a COMMAND_LONG to do a REQUEST_MESSAGE for the GLOBAL_POSITION_INT. The autopilot has returned an ACK for me, but I have no idea about how to catch the data of GLOBAL_POSITION_INT from the autopilot. How do I receive/catch this data on mavros?
I have referred to some wiki pages:

  1. Requesting Data From The Autopilot — Dev documentation
  2. MAVLink Basics — Dev documentation
  3. Command Protocol · MAVLink Developer Guide
    None gives me an idea of how to catch the message I have requested.
    Please help,
    Thank you.

Hello. I firstly recommend you to read these pages:

  1. Python (mavgen) · MAVLink Developer Guide
  2. Pymavlink · GitBook

These pages can help you a lot.
If you need further help ask :grinning:

Edit: just noticed you are trying to do with mavros, so just create python code and then create ros link using it.

1 Like