Anti-cogging issues on the latest firmware

I have been having a terrible time getting anticogging to work using all the same settings as I have previously used without issue since the firmware upgrade.

When I run the anticogging routine it goes very slowly and never seems to finish - I have a bit of vibration and some movement initially but then nothing.
I have upped the pos / vel integrator gains e.g.

   odrv0.axis1.controller.config.pos_gain = 15 * 10
   odrv0.axis1.controller.config.vel_integrator_gain  = (0.5 * 10 * 0.32/2 )*10

I’ve also tried increasing the motor calibration and voltage e.g:

    odrv0.axis0.motor.config.calibration_current=20
    odrv0.axis1.motor.config.resistance_calib_max_voltage = 6

I’ve also removed all possible loads from the motor. I’m using the Odrive Robotics D5065 270KV motors with the 3.6 so pretty vanilla setup.

I feel like I’m losing my mind - I created a youtube video on antocogging a couple of years ago so I feel like I had this down pretty well but it’s not working for me. Any thoughts from the hivemind would be greatly appreciated.

1 Like

Hi Andy,

What was the previous firmware you were upgrading from? The pos/vel gain units changed in 0.5.1, so that may be the source of the issues.

1 Like

You sure your torque_limit and current_limit is high enough? also your vel_limit, as it might interfere if it’s vibrating

It’s absolutely possible that it’s too low if the units have changed. Do you have a suggestion of appropriate values to try with this motor by chance?

Is this a bare D5065? No output load or anything? What encoder?

Its a bare D5065 motor, AMT102-V capacitive encoder. All from the odrive robotics store so its pretty standard

if it helps, the exact code I’m using to set the motor up is here: Implementing Anti-Cogging on the ODrive Robotics Controller - andyvickers.net

It gets weirder … if I set odrv0.axis0.controller.config.vel_integrator_gain = 4 and rest my hand very lightly on the motor, it stops vibrating and starts doing the anti-cogging routine. I have no earthly idea why that would be.