We’re programming our autonomous and what we’ve found is that our robot never consistently turns the correct amount, it’s either too far or too little. We’re using the inbuilt encoders inside the v5 motors however we think that thats the reason why it isn’t turning consistently. We could use the optical shaft encoders however we only have 1 of them.
Does anyone know of another way of making the robot turn consistently in autonomous?
Second, one thing you need to understand about almost every robot is that the robot doesn’t turn around its geometric center. This is because it’s very hard to make a robot perfectly squared, friction, and mass distribution. Your robot will turn off center which will make turning inconsistent even if your code technically works.
With free spinning wheels, you could find the robot’s orientation easily with some basic math. Look into the pilons odometry documentation. They show how you can do this with encoders.
If you can minimize wheel slippage and slop, yes. They are theoretically very accurate but you have real world forces working against you (especially friction). A simple slew rate + P loop drive function will negate these factors significantly.
“Slew rate” makes sure the motors are not accelerating too quick. This sets a hard cap on acceleration which the motors will not pass. A P loop is a type of control loop that slows down the motor as it gets to its target. P loops alone work fine, but I would encourage you to look into PID loops which are much more accurate than a sole P loop.
Yea they’re making a new V5 one but there has yet to be a release date (unless im big dum and dont know they have a set release date). But if you’re like my team and dont have a gyro, you gotta wait till the V5 one comes out.