Accurate Autonomous

I am looking to making a more accurate autonomous. Right now we have the basic motor.startRotateFor(motorspeed, degrees);. Would the next step be encoders? IF so I am looking for actual C++ examples that can correct the wheels if one gets off-target or something. I have no idea how too do this and need actual examples as mention above.

me to as well, im using wait commands very inaccurate

by using motor.rotateFor you are actually using the build in motor encoders with the build in pid. it’s actually pretty accurate if you drive at like 50-60% speed and make sure your wheels don’t slip. you could improve the accuracy by writing your own pid loop. conner’s made some amazing tutorials that explain pid very well:

I’ve found the inertial sensor to be quite useful as well. sensors in general can be utilized to improve consistency. try using line trackers to recognize cubes in your intake and tray, and to line up with the goal zone. vision sensors can be used to aim at cubes for auton. ultrasonics can be used to line up with the field perimeters or other flat objects.

4 Likes

I would reccomend using PID control (easy w/ okapi/PROS), an inertial sensor, or odometry wheels, which are additional wheels which hug the ground with encoders to track absolute robot position.

5 Likes

If you want to have a more accurate auton I would recommend that you integrate a PID control such as the one in this tutorial VEXCode PID Tutorial

Thanks! Its just coding sensor can be very difficult and I dont know where to start how did yall learn. I learn with example and just study it.

1 Like

that’s basically how it’s done. if you can find good tutorials, that’s great, but I learn how to code most things just by looking at examples

Where do you find examples though. I seem to find it difficult to find actual examples the farther I go into code and the harder it gets. And last time I asked for a example on vexforum they said they cant give me a example or something. It would be nice instead of say just do this and that when I have no idea what there talking about. But anyway thx.

vexcode itself has lots and lots of examples.

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