TLDR: Skills Code works fine at school but is doesn’t work at competitions, any suggestions?
So our team has a skills code that can score up to 120 points when working perfectly, but every time we go to a competition the code just doesn’t work . We start in the right corner of the field and try to clamp the alliance goal that is placed on the win point line. Our robot is supposed to start at the wall, drive parallel with the goal and then do a 90 degree turn and drive forward to grab it. Again this part works completely fine at school but at our last two competitions it will try to do the 90 degree turn and then just gets stuck and will not move for the rest of the run.
We’re kind of at a loss for what the problem might be but at school the initial code works very consistently. I posted the code below and any help / suggestions that you guys have would be greatly appreciated and Thanks in Advance.
We just used our remote to run skills and either used the built in timer on the remote or the referee kept the time, at most competitions that I’ve been too this is how it is
It seems that you are not using the competition template. Try putting your auton in a seperate function and then passing it as a callback to competition::autonomous().
copy this over to the competition template
it’ll give you pre auton, auton, and driver control voids to put everything in
then it’ll work on switches or like normal