Every message sent to/from the autopilot has a field called sysid containing the id of the system that sent it. ArduSub will only accept RC_OVERRIDE messages from systems with an id that matches the SYSID_MYGC parameter (default value is 255) stored on the autopilot. The default system ids are as follows:
ArduSub (autopilot): 1
QGroundControl: 255
Mavproxy running on bluerobotics companion: 200
Mavproxy without any arguments: 255
The reason we run mavproxy on the pi with a different system id than QGC is so that the autopilot can differentiate between mavproxy on the pi and QGC on the surface, and identify when communication with the surface computer has broken and execute a failsafe.
So you need to have mavproxy running with a system id that matches SYSID_MYGCS, you can run MAVProxy on the surface computer with the correct sysid, or delete the --source-system line highlighted in the link above.
When executing the command rc 6 1530, the thrusters will spin at full throttle even though the PWM value is nowhere near the max. Do you know what could be the issue here? Is this normal behaviour? Our goal is to directly and programatically control the motors; would there be another module that could do this better?
What mode are you in? Testing this sort of thing on the bench should be done in MANUAL mode, where stabilization is not performed on top of the inputs.
Hi @RUSub, look at what happens to the RC_INPUT message when you do this (watch RC_INPUT). The other channels go to zero. Try rc all 1500, before you do rc 6 1530.
Ah, that makes sense since mavproxy_rc.py initializes with self.override = [0]*16
Should I change it to [1500] * 16? Or should channel 3 start at 1100?
Using the command rc all 1500 will suffice, changing it to 1500 x 16 will amount to the same thing, you will need to build/reinstall mavproxy if you go that route.