Manually controlling thruster output

I have seen this issue posted quite a lot without a fix. So hopefully I can find/create a fix with some help.

I want to be able to control the thrusters on blueROV directly. Preferably over mavlink. I have seen

  1. RC OVERRIDE which seems to only controls joystick input, not thruster directly

  2. Offboard mode where the documentation is very sparse and the one post I have found about it working said that it would stop working if the vehicle sat still and had to go change firmware for the PX4 code

Are there any better options? And if I wanted to create my own flight mode, how could I call motors directly?

Hi @cmarq,

This comment may also be worth a read.

ArduSub’s flight modes are set up around a motion-direction abstraction, where they specify thrust components for forward, lateral, roll, etc, and the underlying motors code handles the conversion into individual motor outputs. Having looked at the relevant motors code, you would presumably need to override output_armed_stabilizing (where the final thrust output for each motor is stored as a -1 to 1 float in the _thrust_rpyt_out array), but it may be quite involved to try to make that swappable via a flight mode, since that’s not how the other flight modes operate.