Skip to content

How to decelerate slowly #1013

Answered by laurensvalk
Xylar52 asked this question in Q&A
Mar 28, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

brake makes it stop even faster than stop, which just coasts the motor. These motors stop almost instantly because of friction.

It sounds like you want slower deceleration?

You can adjust the motor acceleration and deceleration as follows:

example_motor.control.limits(acceleration=(2000, 500))
example_motor.run_angle(1000, 360*4)

In this case, it accelerates at 2000 deg/s^2 and decelerates slowly at 500 deg/s^2.

If you do this for both motors and then create the drivebase, it will use those settings as well.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Xylar52
Comment options

@laurensvalk
Comment options

Answer selected by laurensvalk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants