Thrusters not working with MAVLink (pymavlink), but work with rovpy – Jetson Nano + Pixhawk

Hi everyone,

We’re building an autonomous underwater ROV for a university competition.
Our setup includes:

  • Jetson Nano as the companion computer

  • Pixhawk flight controller running the latest ArduSub firmware

  • 6 thrusters, powered by a 12V battery

  • Communication via USB between Jetson Nano and Pixhawk

We’re currently developing the autonomous navigation system using pymavlink on Jetson Nano. Here’s the issue:

  • When we use the rovpy library (for manual testing), all thrusters spin correctly, so we know the hardware and ESCs are functional.

  • But when we use pymavlink and send rc_channels_override_send() commands in our autonomous code, we receive correct logs and no errors, the vehicle is armed, and messages are sent — but the motors do not spin.

Additional info:

  • Motor functions (SERVOx_FUNCTION) are properly set (e.g., 33–38 for thrusters).

  • We confirmed arming is successful, and heartbeat is received.

  • QGroundControl motor test from a separate PC works fine.

  • ArduSub has been freshly installed.

It seems pymavlink communication succeeds, but no physical response is observed from the motors during autonomous operation.

Has anyone faced this issue or have suggestions?
We’d really appreciate any advice. Thanks!

Hi @efed, welcome to the forum :slight_smile:

Some questions to clarify:

  1. Are you able to view the SERVO_OUTPUT_RAW messages, to see whether the autopilot is trying to command the correct outputs?
  2. Is there anything else that is sending control commands to the autopilot at the same time?
  3. Are you avoiding / have you disabled the relevant failsafes?
  4. Have you managed to get any pymavlink code to work as expected (e.g. can you command a servo or relay output?)

Hello, today we managed to partially get it working with Pymavlink. In our code, when PWM is set to 1900 on channel 2 and channel 3 in Pixhawk, motors 5 and 6 spin simultaneously. When PWM is set to other channels, all the other motors spin simultaneously. In some codes, when we give PWM individually, the motors don’t spin.
When we test the motors individually in QgroundControl, there are no problems. The motors spin individually. I’m sharing our sample code.
Code/Code.py at main · efedzts/Code

ArduPilot firmware doesn’t support individual motor output control outside of the dedicated motor test mode. The RC inputs correspond to motion axes, so channel 2 and 3 are roll and vertical control, in which case a standard BlueROV2 frame would activate motors 5 and 6 for inputs to either of those channels.

Hello, are you using BlueROV for autonomous control? I looked at your code and it seems to only support RC input, not single-unit control as described in the code. Do you plan to add speed control?

I ran tests by sending 1900 PWM to each RC channel individually and observed the following motor behavior:

Channel 1 PWM 1900 → motors 1, 2, 3, 4 spin
Channel 2 PWM 1900 → motors 5, 6 spin
Channel 3 PWM 1900 → motors 5, 6 spin
Channel 4 PWM 1900 → motors 1, 2, 3, 4 spin
Channel 5 PWM 1900 → motors 1, 2, 3, 4 spin
Channel 6 PWM 1900 → motors 1, 2, 3, 4 spin

I’m using rc_channels_override to send these values directly. I assume this behavior is due to how the ArduSub firmware maps RC channels to motion axes rather than to individual motors directly.

Could someone please confirm if this is the expected behavior?
Thanks in advance.

Hi @efed -

That’s correct - you’re simulating user controller input with those RC commands (remote control)…