RC_CHANNELS_OVERRIDE and flying with joystick

I'm trying to control an APM using Mavlink and a joystick.

I understand that the Mavlink message I need to send for this is RC_CHANNELS_OVERRIDE. Some of the fields in this message are obscure to me.

I notice that Mission Planner sets SystemID=255 and ComponentID=190 in the packet header, and in the body of the message itself sets target_system=220 and target_component=5.

Where do these numbers come from? Are they important? Are they constants? Do they change with APM configuration? Mavlink documentation says precious little about these.

Ari.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Developer

    Can you help me out with how you are actually encoding the packet and sending it over the serial stream? A tiny bit of example code would be very helpful :)

    I'm using Arduino BTW.

  • Have you made any progress with your project? I am trying something similar but I'm having a little trouble. I can arm and throttle my helicopter no problem. The problem is when I try to override more than one channel at a time. The copter seems to run at almost full speed only. have you experienced anything similar?

  • ComponentID=190 seems to match MAV_COMP_ID_MISSIONPLANNER member of the MAV_COMPONENT enumeration in XML.


    Ari.

  • My parsing code was inconsistent with MAVLink encoding. I was reading fields in the order that they appear in the XML, while in reality, MAVLink reorders them based on field width. So I was parsing the high and low bytes of chan1_raw into the target system and target component, and then parsing chan2_raw into chan1_raw and so forth. With this reordering, I get target_system=1 and target_component=1, which makes a lot more sense.

    Ari.

This reply was deleted.

Activity

DIY Robocars via Twitter
RT @_JonMyer: 🚨Attention DeepRacer's including #UndergroundDeepRacer🚨 Check our our LIVE stream that including @IAM_dbro Take a few moments…
Aug 5
DIY Drones via Twitter
RT @MarvelmindMaxim: Extreme precision for 60 swarming robots. #marvelmind #autonomousrobotics #robotics #swarmrobotics #rtls #ips #indoor…
Aug 3
DIY Drones via Twitter
RT @MarvelmindMaxim: Precise (±2cm) tracking for racing boats and autonomous boats. Works outdoor and indoor. #autonomous #AutonomousVehic…
Aug 3
DIY Drones via Twitter
RT @MarvelmindMaxim: Helping PixHawk folks to fly autonomous quadcopters using PX4 and ArduPilot. https://marvelmind.com/drones/ Equally suitab…
Aug 3
DIY Robocars via Twitter
RT @chr1sa: The @DIYRobocars @donkey_car virtual AI car race is starting in 15 minutes! Watch it live on Twitch https://www.twitch.tv/mossmann3333 htt…
Aug 1
DIY Robocars via Twitter
RT @chr1sa: Don't miss our monthly @DIYRobocars @donkey_car virtual AI car race tomorrow at 10:00am PT live on Twitch. Head-to-head racing…
Jul 31
DIY Robocars via Twitter
RT @sparkfun: Our completed tutorial on building an @NVIDIA Jetson Nano-powered @Sphero RVR gets your bot up and running via teleoperation…
Jul 30
DIY Robocars via Twitter
RT @SmallpixelCar: Freeway test https://t.co/4V5tV9lhIP
Jul 29
DIY Robocars via Twitter
Very small autonomous cars racing, thanks to an overhead camera: https://control.ee.ethz.ch/research/team-projects/autonomous-rc-car-racing.html
Jul 29
DIY Robocars via Twitter
Jul 29
DIY Robocars via Twitter
Jul 29
DIY Robocars via Twitter
RT @chr1sa: Don't miss our virtual AI car race this Saturday! Real developers + virtual cars =🏎️🏎️🏎️ Head-to-head battles with thrills, sp…
Jul 28
DIY Robocars via Twitter
Jul 27
DIY Robocars via Twitter
RT @usashirou1: Jetson nano by Isaac Kaya #jetson https://t.co/Mu1N0CyQkN
Jul 23
DIY Robocars via Twitter
RT @GPUsolution: JetRacer mady by Iflytek company #JetsonNANO #Nvidia https://t.co/MimTymIwge
Jul 23
DIY Robocars via Twitter
RT @openmvcam: I love this: Mega or Mini? Image Classification on the 1MB OpenMV Cam H7 by Ish Ot Jr. in OpenMV, Edge Impulse, Internet of…
Jul 23
More…