AntiCogging for S1

I keep getting a anticogging_calibration error when I follow the Anticogging guide.

I’m running a M8325s motor and AMT212 encoder.

When I call odrv0.axis0.requested_state = AxisState.ANTICOGGING_CALIBRATION the S1 instantly faults.

Am I missing something with the encoder setup? The Position Reference Frame is not something I have a good understanding of.

Also, when issuing the odrv0.axis0.pos_estimate = odrv0.rs485_group0.raw command I get an attribute error: ‘anonymous_interface_10555315329256’ object has no attribute 'rs485_group0.

Hi! A few questions:

  1. What ODrive firmware version are you using? It’ll show when the ODrive is connected over ODrivetool (e.g. 0.6.10, 0.6.9, etc)
  2. What does the ODrive fault with after you start ANTICOGGING_CALIBRATION? You can use dump_errors(odrv0) to show this.

Note it’s rs485_encoder_group0, not rs485_group0 – issue in our docs, apologies, fixed now (will update in a few minutes). That being said, the Absolute Encoder Reference Frame will automatically initialize pos_estimate to the AMT21 angle, so all you have to do is this: Controller — ODrive Documentation 0.6.11 documentation

Oh, cool! Thanks for the quick update. Using 0.6.10. I’ll make that change in my command later today and see what happens.

Great, please let me know how it goes!

Well, this time it went through without errors, but at the last command:
odrv0.axis0.requested_state = AxisState.ANTICOGGING_CALIBRATION
The light remained green, but the motor did not turn or even try to turn. I could hear the whine as if the the motor was going to do something, but nothing happened for several minutes.

Inputting these commands into odrivetool gets laborious. I need a break. More later…

Hmm, have you tuned the vel_gain before? And what values did you set for anticogging.max_torque, anticogging.calib_start_vel, anticogging.calib_end_vel, and anticogging.coarse_integrator_gain?