Is there a better way to track a MOGO?

This is my first time working with vision, please don’t be too harsh :slight_smile: Comments, improvements? I am not making use of the angle property from the vision sensor, it always reported 0 when I checked it, and the documentation didn’t explain what it was. Is there a way to make the robot move faster? When I tried increasing the driving and turning speeds, it would overshoot and then overcorrect and keep doing that forever. Is there a way to follow a MOGO more smoothly, specifically without splitting turning and driving forward into two separate blocks while not doing a custom drivetrain?

A PID where the sensor is the vision sensor horizontal position (of the largest object, assuming its larger than a threshold) and the desired value is the middle of the screen (whatever number that is).

I’m also wondering if there’s a way to parameterize the input to “take a snapshot” block to avoid duplicating the same code for red/blue/yellow MOGOs?