It looks like the encoder setpoint does not zero when endstop is pressed.
Settings:
odrv0.config.gpio7_mode = 0
odrv0.axis1.min_endstop.config.gpio_num = 7
odrv0.axis1.min_endstop.config.is_active_high = True
odrv0.axis1.min_endstop.config.debounce_ms = 200
odrv0.axis1.min_endstop.config.enabled = True
odrv0.axis1.min_endstop.config.offset = -3
odrv0.axis1.controller.config.homing_speed = -2
I saw some people working with the Devel branch, this seems like a lot of work to get into.
Is it possible to get a regular firmware download with this updated?
It should work on master
. Actually it sets the position to offset
not zero.
I’m still having this issue with an ODrive Pro (firmware v0.6.10) and an AMT21 encoder. The homing sequence is initiated, it turns until the homing switch is hit but doesn’t update the setpoint and moves back to the position where the motor started (perceived 0). I noticed that the encoder calibration that runs before the homing sets axis.commutation_mapper.config.offset_valid
to True
. Not sure if this would affect it but I can’t change the order of the startup behavior anyway.
Hi - answered this on the Discord, I’ll paste the answer below for posterity:
You need to set absolute_setpoints to True, it’ll automatically move to the zero position after homing, so if you don’t have absolute setpoints then it won’t update the actual setpoint and it’ll move back to the original zero position.
1 Like