I’m trying to write autonomous code for our practice robot.
It’s very simple and all it does is moving forward and shooting.
The problem is that it doesn’t have an encoder and when we try to set the chassis’ motors to constant power for a certain time the stop is too abrupt.
How can we make the robot drive forward and stop gradually like a PID encoder drive does?
Decrease the drive power in steps.
To expand on the previous post, make it an equation that approves (and reaches) 0. You could start at 100 power forward, and every .25 seconds, drop 50 motor power. You get the idea.
Do you have your speed controllers set to coast or brake?
If they are on coast then the robot should gracefully come to a stop, unless you have a lot of drivetrain drag.