-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drifting in Position Mode #688
Comments
Did #680 fix this issue? |
TLDR; No. The config combination step/dir + circular range is still broken. It won't get fixed. Instead, the config combination step/dir + linear range was fixed and used as a workaround. Long answerNo, #680 was not related to this issue. Pardon me for digging deep in my memories about this issue, haven't thought about it since May 5. @madcowswe and I had a separate debugging session about this issue. We found a discrepancy between counters two counters: This issue was never fixed as far as I remember. I also found this commit on ODrive's main branch: c5017f4, which says: Under the Additional Context I also mention an issue where the motor remained still although I told it to move via a |
Doesn't sound right. Only way that happens is if you're using an absolute encoder. |
Describe the bug
The motor doesn't keep its position as it should.
To Reproduce
$ ~/repos/ODrive/tools/odrivetool
In [1]: odrv0.erase_configuration()
In [2]: exit
$ ~/repos/ODrive/tools/odrivetool restore-config odrive-config-AB.json
, where odrive-config-AB.json is linked here$ ~/repos/ODrive/tools/odrivetool
In [1]: odrv0.config.brake_resistance = your_measured_value
pos_estimate
. For me it was 0.0057.pos_setpoint
from 0.899 to 99.83.pos_setpoint
from 99.83 to 0.899 as expected.pos_estimate
again. For me it was 0.03457.Expected behavior
I expected the
pos_estimate
to be the same as before (0.0057) after I steppedpos_setpoint
back to its original value.Instead, the motor has drifted away from it's initial position by ca 1.65 degrees, according to the new
pos_estimate
(0.03457).The drift in
pos_estimate
is also observed in physical reality. During a real 3d-print with Hangprinter, similar drift happens several times per second, and the print quickly go haywire. When using 0.5.1 this doesn't happen.I think the drift happens as the moment when we're crossing down through
pos_setpoint = 0
Desktop (please complete the following information):
Additional context
I was asked on Discord if this happens even if I disconnect the step signal and hard-wire it to GND or 3.3V.
I failed at testing this, since I don't know any other way to move the motor than with the step/dir signals.
The ODrive in the current (linked) configuration doesn't respond properly to
input_pos
changes.I tried
In [56]: odrv0.axis1.controller.input_pos = 0.1
... but motor remained still, and
odrv0.axis1.controller.input_pos
kept its old value.Signal noise on the step/dir signals is not the problem since the machine has been running long prints with 0.5.1 showing no drift. With v0.5.5 (devel) substantial drift is visible within a few seconds of starting a print.
The text was updated successfully, but these errors were encountered: