I just watched a tutotrial on how to control the odrive from as Raspberry Pi. I noticed that the motor doesn’t rum very smooth at low speeds, even though a 8096 steps encoder is used. Why is that the case? Is he using wrong parameters or is it just an inherent limitation of the motor?
It’s both. Cheap motors have high cogging torque. You can compensate for this by using higher position & velocity gains, or by trying out the “anticogging” feature.
def speed(vel):
dir = math.copysign(1,vel)
vel = min(od.axis0.controller.config.vel_limit, abs(vel))
od.axis0.trap_traj.config.vel_limit = vel
od.axis0.controller.move_incremental(dir*math.inf, False)
Set any speed:
speed(1/60) # one turn per minute (example)
speed(0) # stops the motor
Why this works is a mystery to me. But it does the job. My motor is a Cubemars GL40-KV210 with a factory installed AMS-AS5048A encoder, rated speed=2200 rpm.