Autonomous not reliable

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?

First, are you on v5?

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.

3 Likes

Yeh i’m on v5. So you’re saying that the encoders within the v5 motor are reliable?

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.

3 Likes

Oh ok, i’ll try it and we’ll see what happens, thanks. Also, what is “A simple slew rate + P loop drive function” ?

2 Likes

use gyro for turning

“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.

2 Likes

I would love to but I unfortunately don’t have a gyro. :frowning:

image

Does anyone know why it got discontinued? Was it because they’re making a v5 one?

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.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.