In the years that I have done vex, I have had a hard time writing accurate auton code that is very reliable and can score high points in skills. I have always relied on programs like “drive_for(FORWARD, 200, MM, wait=True)” and most of the time relied on me changing the values to find the correct value for it to go where I want it to go. But with the new sensor that I was introduced to in VEX VRC like the vision sensor and the GPS sensor, I thought that this could change. I have been messing around with a vision sensor at home and I thought it would be a great sensor to put on the bot. But after a while, I was questioning if it is really useful for me to add that sensor to the robot. I was thinking of buying a GPS sensor to test it and potentially use it in my robot but it is expensive and if it doesn’t serve any purpose why use it? I wanted to ask if anyone has used vision and GPS sensors in their robot and if it has helped them rather than just using normal drive-forward commands.
Before using motor advanced sensors it’s probably best to learn how to use a PID to use the sensor you already have (internal motor encoders) more effectively. You can use the internal motor encoders to track distance and make the robot drive a distance. Here’s a good guide to PID:
introduction_to_pid_controllers_ed2.pdf (400.2 KB)
The vision sensor is a pretty noisy sensor with a relatively low update rates (~200ms). It’s very good at targeting large game elements with a distinct color that contrasts whatever the background is, but fails at effectively targeting dark, fast-moving, or small objects with holes in them. In terms of programming, it’s a bit harder to wrap your head around compared to other sensors, mainly because of the lacking documentation and help resources on vex’s side, but can still be pretty useful in some cases.
The GPS sensor is useful for skills but not much else. It provides visual odometry data to the robot, but will be ineffective on most competition fields, due to the requirement of GPS strips being installed. Most competitions will only bother to install the strips on portable fields used for skills, so the mileage will vary.
If you want consistent auton routines across the board, probably the bes thing you can look into is some basic control theory (PID Controllers for controlling position smoothly, acceleration control), using the inertial sensor for accurate turns, and position tracking (wheeled odometry). These are all concepts that you’ll probably want to know anyways to proplerly put the GPS/vision sensor to their full uses.
You can write very effective (i.e. win skills champion at your state level) code with just an inertial sensor and the motor encoders in your drive. EZ Template and JAR Template let you do this with no prior experience, and it’s what teams like 4082B use for autos and programming skills. Just something to look into.