How to decelerate slowly #1013
-
i can't seem to get the robot Spike Prime to brake instead of just stopping hard. I used the example code to see the difference between motor.stop and motor.brake and both just makes the robot stop instantly. And even if i succeded to make the robot brake, i don't how to make both motor brake at the same time while using drivebase, because drivebase doesn't have a brake function and it's stop function just makes the robot stop instantly
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
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. |
Beta Was this translation helpful? Give feedback.
brake
makes it stop even faster thanstop
, 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:
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.