Sending RC messages via mavlink and mavros

#1

We create an autopilot system from scratch. For our purposes, we considered that the best option was for our autopilot to send rc as it is done when controlling with the transmitter. I think mavlink has a realization of this. Among all the messages I found, 6 different messages can play the role of rc. I just don’t know which of these messages I should use and how to compose it. I also use ros for communication. As an intermediate tool there is a mavros. It also has all these messages. My questions: Which message is correct? How to compose it? Which variable is responsible for which joystick? And how to make the plane obey these particular commands, how to set it up for this? How to make it via mavros?

#2

Have you looked at the MAVLink reference?
https://mavlink.io/en/messages/common.html

I would consider https://mavlink.io/en/messages/common.html#RC_CHANNELS_SCALED or https://mavlink.io/en/messages/common.html#RC_CHANNELS_RAW.

#3

Yes, I certainly read this page. So I personally found the following messages: RC_CHANNELS_SCALED, RC_CHANNELS_RAW, RC_CHANNELS, MANUAL_CONTROL, RC_CHANNELS_OVERRIDE. And my question is still valid which one is the right one to use?

#4

The one that applies best to your use case.

If you have a ground station you could use MANUAL_CONTROL because it already describes which channel is which.