-
-
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] DriveBase acting weird with high values? #729
Comments
Thanks for reporting. Can you add the firmware version used for this experiment? from pybricks import version
print(version) |
Yes sure: ('primehub', '3.2.0b3', 'v3.2.0b3-67-gcaffa8a6 on 2022-09-14') EDIT: I also tried a pair of Lego Technic 88014 XL Motor's. They work without any problems. I Also will try the small Spike Motors but it seems the Problem is limited to the Large Spike Motors |
Could this be the same as #664 ? I thought I had fixed it but apparently not. |
So Problem also does NOT occur with the normal Spike Motors, I have it only with the Large ones. It seems, this can be the Problem :D EDIT: If you just do: motor.run(1000) then you also can reproduce it, it starts accelerating fast for a second and then keeps running on a much slower speed |
I can reproduce this, but it is separate from #664. In #664, there is strictly an issue about the pre-computed trajectory. The reference position jumps, but the PID controller still does as it's told: it goes to the bad trajectory. But in this issue we have e.g:
So there is something wrong with the PID controller here. |
Possibly the same cause. Run until stalled no longer works: from pybricks.pupdevices import Motor
from pybricks.parameters import Port
steer = Motor(Port.A)
left_end = steer.run_until_stalled(200) VID_20220929_165503.mp4 |
The intermediate result could overflow for a large value of (kp * err). See pybricks/support#729
The intermediate result could overflow for a large value of (kp * err). See pybricks/support#729
This build fixes the stall issue shown above. It may or may not also fix the issue you saw. |
This is absolutely Insane!!! Your fix work very well, it's like driving the robot on rails! |
Sounds like you’ve discovered the full potential of the recent drive base updates we’ve been working on 😄 |
Out of curiosity, since you’re the probably one of the first to try the new drive base, what is it that you like in particular? The new features or mainly the precision and performance? |
Run until stalled is now fixed as well, so I think we can close this. Firmware link: https://github.com/pybricks/pybricks-micropython/actions/runs/3273918813 |
Describe the bug
I have a Spike prime with two large motors equipped. The DriveBase is starting acting weird after I set a high speed value or a high turn rate or both at the same time. For example: if I just add a speed value of 500 the robot accelerate very fast for a second and then drives slow ?!. If I add a high turn rate it's the same behavior, it starts turning fast for a second and then it drives/turns slow and sometimes it stops and starts turning in the wrong/opposite direction ?!. If I set a speed value of 300 and a turn rate of 45 (or values below) then everything seems to working correct.
As additional Question: If I set an acceleration value in the settings this does not affect the
drive()
method. it would be nice if I can also set the acceleration value as a setting for thedrive()
method. the default value is a bit slow for me.To reproduce
This little Code snippet is enough to reproduce the behavior, sometimes it needs to restart a few times to trigger it.
Expected behavior
Drive as expected with high speed and correct turn rate
The text was updated successfully, but these errors were encountered: