Rover manual control via python script

I have been trying to control my rover with a python script using pymavlink. I have raspberry pi 3 acting as a bridge between the pixhawk and my PC as described here.

This is the script I run on my PC:

from pymavlink import mavutil


autopilot = mavutil.mavlink_connection('udpin:')


mavlink = mavutil.mavlink


autopilot.mav.command_long_send(autopilot.target_system, autopilot.target_component,
                        mavlink.MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE, 255,
                        0, 0, 0, 0, 0, 0, 0)

From the console output of the raspberry pi, running mavproxy, I get the following output:

Got MAVLink msg: COMMAND_ACK {command : 176, result : 0}
Got MAVLink msg: COMMAND_ACK {command : 70, result : 3}

My script was able to change modes but unable to control the rover. The problem is probably in mav message. I would be grateful for any help.


you need to arm the rover to be able to use rc_override

It is armed (from what I can tell) . I am able to move it via my RC controller. I made it that it is armed by default in by setting the appropriate parameter flags.
I think the problem is in the structure of the mavlink message I am sending.

I managed to make my rover move. The problem was as I suspected with the mavlink messge:

autopilot.mav.rc_channels_override_send(autopilot.target_system, autopilot.target_component, 0, 1000, 1000, 0, 0, 0, 0, 0)

This was the correct command.