Axis 0 error when controlled by Ardupilot. Help!

Hello all,

I have a problem trying to control Odrive 3.6 (0.5.1-dev) from a Pixhawk ardupilot.
As soon as the AP is armed, axis 0 goes into error (see bellow).
This happens only if both servo signal wires are connected (GPIO 3 and 4, configured for PWM).
If only one wire is connected, the respective motor runs as it should (it works for axis0 as well as for axis1). It doesn’t matter which servo wire is connected to which GPIO, as long as it’s only one, that axis works just fine.
Servo signals from AP are good, no noise, 50Hz stable - I used this device with other ESCs and no problem.
It’s not a ground loop issue, as it happens even if Odrive is powered from a different source (with a dedicated signal GND wire from AP to Odrive)
If I replace the AP with an Arduino (2 servo outputs), the Odrive behaves normally, no issues.

I’ve checked everything and now I’m out of options.
Please help!

dump_errors(odrv0) output is bellow.

Why is this happening?

In [20]: dump_errors(odrv0)
axis0
  axis: Error(s):
    AXIS_ERROR_MOTOR_DISARMED
  motor: Error(s):
    MOTOR_ERROR_CONTROL_DEADLINE_MISSED
  fet_thermistor: no error
  motor_thermistor: no error
  encoder: no error
  controller: no error
axis1
  axis: no error
  motor: no error
  fet_thermistor: no error
  motor_thermistor: no error
  encoder: no error
  controller: no error

This bug should be fixed in the new firmware. See Firmware 0.5.2 Release Thread - #3 by tinker_inc for instructions on updating.

Solved. It works now, with FW 0.5.2.
I had some trouble updating from Windows, so I did it from Linux and it worked.

Thank you!

2 Likes

@robokid88 are you able to control ODrive from your Pixhawk? Did you use PWM? Did you use the I/O PWM OUT jumper on the PX4? I am able to control my ODrivePro with a regular R/C receiver so I know I have PWM configured properly on the Odrive side. But when I drive the PWM signal from Pixhawk CH1, it’s not working. Curious did you get this work?

1 Like