I am trying to have certain motors progressively slow down so I can brake them without there being jerking involved. How can I do this?
You can use something called Motion Profiling which is a built in feature of the OKAPI Library thatâs included with PROS. If you havenât used OKAPI before I would suggest following the Getting Started and Clawbot tutorials here first. You can find additional information about the options for the Chassis Controller in the Chassis Controller Builder tutorial at the previous link as well. Then read through the 2D Motion Profiling tutorial to add Motion Profiling to your Chassis Controller. Hope this helps.
I wouldnât try motion profiling as it seems you are a beginner. Try finding out what âPIDâ is. Hereâs a doc to get you started.
Write out, in words, what you think the motors should do. One way to think about it is to think in terms of âtime intervalsâ. So:
- At Time Interval 1, power the motor at 100
- At Time Interval 2, stop the motor
Figure out how to convert the above to a program you can run. Observe what happens when you run the program and refine your theory. Likely, this first iteration wonât be what you want. So refine it:
- At Time Interval 1, power the motor at 100
- At Time Interval 2, power the motor at 50
- At Time Interval 3, stop the motor
And so on. You may need to change the power levels, and size of the step. You may need to change the amount of time between steps.