Is there anyway to improve my auton

So currently as of now, I think one of the many reasons I didn’t make it to worlds is that my auton work 10% of the time. My auton worked on counts & it worked about 80% of the time at regular tournaments however it just stopped working for me at state.

Part of my Auton:
backwards(1095,150,150);
right(330,70,70);
shoots(1000,200);
Intake.spin(vex::directionType::fwd,100,vex::velocityUnits::pct);
forwards(250,150,150);
shoots(1000,200);

Part of my Pre Auton:
void shoots(int deg, int pwr)
{ Shooter.resetRotation();

 Shooter.spin(vex::directionType::rev,pwr,vex::velocityUnits::rpm);
   while(Shooter.rotation(vex::rotationUnits::deg) > -deg ) {
   vex::task::sleep(20);}
 
  Shooter.stop(vex::brakeType::coast);

}

What would it take to “git-gud”.

You have a few different things that you could do, the most important of all is spending a lot of time finetuning auton and testing it over and over again to make sure it is consistant. a auton that works 10% of the time but causes a 18 point swing (entire front of the field) is worth a lot less than an auton that works 99% of the time and causes a 10 point swing (three flags on your side).

step 2 is strategy. go for whatever can be done quickly and reliably and then deal with points; sometimes if something is worth less points it can be more beneficial to go for it because you will probably encounter less resistance (ie crossshotting flags).

in terms of actual code you also have a few things you can do: if you want to remain with a time based auton then I would recommend capping movement speed at something like 70 rpm to make sure you are more accurate. for time based code you also want to move then apply breaks (I like to use vex::braketype::break because it stops the robot but not as violently as hold) and then wait (sleep) for 100ms. the reason for the wait is so that your bot has time to come to a complete stop to keep things accurate. whatever speed you decide should remain constant for all movement methods and whatever end wait time should be constant to keep things consistent.

If you want to be even more accurate I would recommend a PID loop or at the very least a P loop which both work off of internal motor encoder values. with both PID loops and P loops you have a maximum speed and also a wait buffer just like with time based autons to keep things accurate (this buffer can probably be smaller though due to the increased intrinsic accuracy of PID).

2 Likes