-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
[Bug] Jerky motor movement, especially on low speeds ? #366
Comments
Thanks for taking the time to investigate and report this! I think we’ll have to improve the default settings a bit to make this better, especially for this motor type. There are several settings that affect this, so I’ll have a look at trying to find the right balance, without making performance worse for other applications. |
Thank you for your fast reply. If possible it would be very very nice to get a bit more smoother motor movement :) Thank you |
This reduces sensitivity to high inertial loads like free-spinning wheels. See also: pybricks/support#366
Under some conditions (pybricks/support#366), motor performance is improved by lowering the observer feedback gain. This makes the estimated speed signal respond less aggressively to motor position updates by relying a bit more on the model than the sensor. But this has averse affects for other cases, such as under high loads. Since the model is not aware of loads, high feedback duty cycle signals make it drift away from the real motor. Here, we'd rather have higher gains. This commit introduces three observer gains for small, medium, and high estimation errors, which provides the right balance for a broader spectrum of applications. All gains are stored in a single parameter to save space on the hubs.
This should be a bit better now. Would you mind trying this with the latest build? |
Hi Laurens, sounds great. I will try it now :) |
Works great. The movement is much smoother now. 👍 |
Thanks for testing so quickly. I'll close this one then. Feel free to open new issues for motor aspects when you run into them. |
Reduces stutter on motors with freely moving encoders in the shafts. See pybricks/support#366
VID_20230306_150618.mp4 |
Some more work has been done here. Should be even better now, see above. |
Hey @laurensvalk 👋🏻 I tried it and seems to work very well, great job 🥳 |
Describe the bug
I'm not sure if this is a "Bug" but I discovered a jerky motor movement on Technic Hub and on Spike/Inventor Hub. It looks Like that the motors are not linear turning, they frequently stutter. If I'm using Motor class only or drive base makes no difference. I discovered that also on higher speeds but on lower speeds you can see it much better.
I testet the original lego firmwares to check if this is a normal behavior but with the original firmwares the problem does not exists. I made two videos, one with the lego firmware and one with the latest Pybricks Firmware.
To reproduce
Steps to reproduce the behavior:
just create a motor instance in code and let them turn.
Expected behavior
same fluently linear turning like the original firmware
Screenshots
I created two videos, one with original fw and one with pybricks fw. I hope you can see what I mean.
Original.FW.mp4
Pybricks.FW.mp4
The text was updated successfully, but these errors were encountered: