Acro Mode - RC Override Commands Not Working

Hi all, I’m trying to send the RC_OVERRIDE command in acro mode in order to rotate the boat’s heading (send 1700 pwm to the yaw override). Acro mode seems to work fine, however, the rc override commands are not having any effect. My setup is:

Pixhawk 1
Ardurover 4.3

Thanks in advance for any advice!

Here is the relevant code snippet:

from pymavlink import mavutil
import time

device_file = '/dev/serial/by-id/usb-ArduPilot_Pixhawk1_2B0019000151313138353431-if00'
master = mavutil.mavlink_connection(device_file)

def send_acro_mode_command():
    global master
    mode_id = master.mode_mapping()["ACRO"]
    master.mav.set_mode_send(master.target_system,
                             mavutil.mavlink.MAV_MODE_FLAG_CUSTOM_MODE_ENABLED,
                             mode_id)


def send_arm_command():
    global master
    master.mav.command_long_send(master.target_system,
                                 master.target_component,
                                 mavutil.mavlink.MAV_CMD_COMPONENT_ARM_DISARM,
                                 1, 1, 0, 0, 0, 0, 0, 0)



send_manual_acro_command()
send_arm_command()

while True:
    cmd = [1700 1500 1500 1500] 
    print(cmd)
    master.mav.rc_channels_override_send(
        master.target_system, master.target_component, *cmd)
    time.sleep(0.1)

Hi @TMJ,

I’m yet to do any direct MAVLink testing with ArduRover, but note that our Pymavlink examples were written for ArduSub, which has a specific set of RC input and output mappings that may not be applicable to Rover.

I’d recommend

  1. looking through the ArduRover RC parameter options
  2. potentially trying the MANUAL_CONTROL message
  3. asking on the general ArduPilot forum for additional insight

I’ll also add this to my list of things to look into, but I’m not sure when I’ll be able to get to it at this stage because a lot of my time is currently dedicated to documenting the recent and upcoming software releases.

Thanks for the response Eliot. I just found the problem: the mavlink message sysid does not match the sysid_mygcs. The latter is configurable in the parameter file. It is set to 255 just like in the ardusub firmware. I’m not sure where the mavlink message sysid is being set.

My temporary workaround is to comment out lines 3474-3476 in GCS_Common.cpp, compile and reflash. Now rc override commands work.

1 Like