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)