text
stringlengths
0
715
Intake.spin(reverse, 11, volt);
}
}
}
return 0;
}
void init() {
//initialize settings, variables, and callback functions
Kicker.setStopping(coast);
Left1.setStopping(coast);
Left2.setStopping(coast);
Left3.setStopping(coast);
Right1.setStopping(coast);
Right2.setStopping(coast);
Right3.setStopping(coast);
KickerLED.off();
//other functions
Controller1.ButtonX.pressed(buttonXPressed);
Controller1.ButtonY.pressed(buttonYPressed);
Controller1.ButtonR2.pressed(buttonR2Pressed);
Controller1.ButtonB.pressed(buttonBPressed);
Controller1.ButtonL1.pressed(buttonL1Pressed);
Controller1.ButtonL1.released(buttonL1Released);
Controller1.ButtonL2.pressed(buttonL2Pressed);
Controller1.ButtonL2.released(buttonL2Released);
Controller1.ButtonUp.pressed(buttonUpPressed);
Controller1.ButtonDown.pressed(buttonDownPressed);
Controller1.ButtonLeft.pressed(buttonLeftPressed);
Controller1.ButtonRight.pressed(buttonRightPressed);
//start task
task myTask2 = task(kickerLoop);
task myTask3 = task(intakeLoop);
}
void pre_auton(void) {
init();
Inertial.calibrate();
}
void usercontrol(void) {
auton = false;
while (1) {
driveCode();
wait(20, msec);
}
}
int main() {
// Initializing Robot Configuration. DO NOT REMOVE!
vexcodeInit();
// Set up callbacks for autonomous and driver control periods.
Competition.autonomous(autonomousProgramTask);
Competition.drivercontrol(usercontrol);
// Run the pre-autonomous function, basically initialize
pre_auton();
// Prevent main from exiting with an infinite loop.
while (true) {
checkOverheating();
//printController(Intake.efficiency(percent));
wait(20, msec);
}
}
Design Constraints
Design Constraints
The robot has to be built according to the rules and constraints that the REC foundation lists in the game manual. Some of these robot design constraints are listed:
* Robots must start the match no larger than an 18” by 18” by 18” cube.
* Robots must be built from VEX official metal, motors, microcontrollers, and wires.
* Robots can use limited polycarbonate; the maximum amount is that which could be cut from a single 12” by 24” sheet up to 0.070” thick.
* Robots can use no more than 88W of total motor power--large motors are 11W each and small motors are 5.5W each.
* Robots can use no more than 2 pneumatic air tanks (unlimited pneumatic pistons).
* Robots must have license plates with a clearly identifiable team number.
Game Analysis Over Under
Game Analysis
Now, we will analyze the game to explore what an effective robot design will be able to do, so we can design our robot accordingly.
Initial Thoughts
This game has many interesting features, that distinguish if from previous challenges:
* About 74% (44 / 60) of the primary game objects are match loads. This means that efficient match loading will be key to success.
* There is a large barrier in the middle of the field. Going over this barrier will most likely be a huge advantage, as it allows for better maneuverability around the field.
* The highest elevation tier is above the height of the elevation bar, so reaching it will require an alliance partner with a compatible design.
* Since the AWP tasks require both removing a triball from the match load zone and scoring an alliance triball in an alliance’s goal, and crossing to the opposing offensive zone is not permitted during autonomous, no solo AWP program is possible this year. Both robots will have to be able to complete their respective tasks for that alliance to earn the AWP.
Scoring Analysis
Points can be obtained from one of three methods:
1. 1.
Alliance Triballs can be scored in an offensive zone for 2 points each or a goal for 5 points each
2. 2.
Elevating gives between 5 and 20 points, based on the relative elevation tier of the robot.
3. 3.
The winner of the Autonomous Bonus earns 8 points.
Here is a breakdown of the points earned from a single object (where applicable) for each of the scoring methods.
We can observe that elevation gives the most points, and triballs in offensive zones give the least amount of points.
However, we also have to consider the total score:
* There are 60 triballs, and all 60 can be scored in an offensive zone for 120 points
* Around 40 triballs can fit in a goal, for a total of 200 points
* Elevating at the highest tier results in 20 points
* The Autonomous Bonus gives 8 points