0% found this document useful (0 votes)
2 views

message (4)

The document contains a sequence of commands for a robotic arm and chassis, detailing movements and actions to achieve specific tasks. It includes setting the arm's position, controlling the intake mechanism, and navigating the chassis to various poses while adjusting velocities and brake modes. The overall goal appears to be executing a series of coordinated movements for a robotic operation.

Uploaded by

jamiedapro0108
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

message (4)

The document contains a sequence of commands for a robotic arm and chassis, detailing movements and actions to achieve specific tasks. It includes setting the arm's position, controlling the intake mechanism, and navigating the chassis to various poses while adjusting velocities and brake modes. The overall goal appears to be executing a series of coordinated movements for a robotic operation.

Uploaded by

jamiedapro0108
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

int AutoarmCurrent=0;

int AutoarmDesired=34;
chassis.setPose(8,0,-135);
arm.move_velocity(-200);
pros::delay(100);
while(abs(AutoarmCurrent-AutoarmDesired)>3){
AutoarmCurrent=(3+((ArmRotation.get_angle())/100))%360;
if((AutoarmDesired-AutoarmCurrent)>0){
arm.move_voltage(-90*abs(AutoarmCurrent-AutoarmDesired)-800);
}
else if((AutoarmDesired-AutoarmCurrent)<0){
arm.move_voltage(90*abs(AutoarmCurrent-AutoarmDesired)+350);
}
}
arm.move_velocity(0);
arm.set_brake_mode(MOTOR_BRAKE_HOLD);
arm.brake();
intakeTop.move_velocity(200);
pros::delay(450);
intakeTop.move_velocity(-200);
pros::delay(100);
intakeTop.move_velocity(0);
arm.move_velocity(-200);
pros::delay(750);
arm.move_velocity(20);
intakeTop.move_velocity(200);
intakeBottom.move_velocity(200);
chassis.arcade(-120,0);
pros::delay(200);
chassis.moveToPose(20,9, -125, 1500,
{.forwards=false, .lead=0.3, .maxSpeed=50, .minSpeed=30, .earlyExitRange=0});
chassis.waitUntilDone();
chassis.arcade(-70,0);
pros::delay(200);
goalclamp.set_value(true);
chassis.arcade(0,0);
pros::delay(200);
arm.move_velocity(200);
chassis.turnToHeading(0,600);
chassis.waitUntilDone();
pros::delay(300);
arm.move_velocity(0);
startIntakeTask(200,true);
chassis.moveToPose(23,37, 0, 800,
{.forwards=true, .lead=0.1, .maxSpeed=80, .minSpeed=60, .earlyExitRange=0});
chassis.waitUntilDone();
pros::delay(200);
chassis.arcade(-100,0);
pros::delay(100);
chassis.arcade(0,0);
pros::delay(500);
chassis.turnToHeading(-45,400);
chassis.waitUntilDone();
startIntakeTask(0,true);
startIntakeTask(0,false);
intakeTop.move_velocity(0);
intakeBottom.move_velocity(200);
chassis.moveToPose(-6,70, 0, 1500,
{.forwards=true, .lead=0.1, .maxSpeed=50, .minSpeed=30, .earlyExitRange=0});
chassis.turnToHeading(45,500);
chassis.waitUntilDone();
intakeTop.move_velocity(200);
intakeBottom.move_velocity(200);
pros::delay(200);
startIntakeTask(200,true);
chassis.moveToPose(25,90, 45, 1000, {.forwards=true, .lead=0.1, .maxSpeed=80,
.minSpeed=60, .earlyExitRange=0});
chassis.turnToHeading(90,300);
chassis.moveToPose(50,88, 90, 1000, {.forwards=true, .lead=0.1, .maxSpeed=80,
.minSpeed=60, .earlyExitRange=0});
chassis.turnToHeading(160,700);
chassis.waitUntilDone();
pros::delay(700);
AutoarmCurrent=3;
AutoarmDesired=34;
arm.move_velocity(-200);
pros::delay(100);
while(abs(AutoarmCurrent-AutoarmDesired)>3){
AutoarmCurrent=(3+((ArmRotation.get_angle())/100))%360;
if((AutoarmDesired-AutoarmCurrent)>0){
arm.move_voltage(-90*abs(AutoarmCurrent-AutoarmDesired)-800);
}
else if((AutoarmDesired-AutoarmCurrent)<0){
arm.move_voltage(90*abs(AutoarmCurrent-AutoarmDesired)+350);
}
}
arm.move_velocity(0);
arm.set_brake_mode(MOTOR_BRAKE_HOLD);
arm.brake();
startIntakeTask(0,true);
startIntakeTask(0,false);
intakeTop.move_velocity(200);
intakeBottom.move_velocity(200);
chassis.moveToPose(59,55, 180, 1000,
{.forwards=true, .lead=0.1, .maxSpeed=80, .minSpeed=60, .earlyExitRange=0});
chassis.moveToPose(56,63, 180, 1000,
{.forwards=true, .lead=0.1, .maxSpeed=80, .minSpeed=60, .earlyExitRange=0});
chassis.turnToHeading(92,550);
chassis.moveToPose(51,63, 90, 1000,
{.forwards=false, .lead=0.1, .maxSpeed=80, .minSpeed=60, .earlyExitRange=0});
chassis.waitUntilDone();
chassis.arcade(100,0);
pros::delay(600);
chassis.turnToHeading(90,200);
chassis.arcade(40,0);
pros::delay(200);
chassis.setPose(0,0,0);
chassis.arcade(60,0);
intakeTop.move_velocity(-200);
pros::delay(100);
intakeTop.move_velocity(0);
arm.move_velocity(-200);
pros::delay(850);
arm.move_velocity(0);
pros::delay(200);
arm.move_velocity(200);
startIntakeTask(200, true);
chassis.moveToPose(0,-11 , 0, 1500,
{.forwards=false, .lead=0.3, .maxSpeed=90, .minSpeed=60, .earlyExitRange=0});
chassis.turnToHeading(-90,1000);
chassis.moveToPose(-49, -20, -106, 1500,
{.forwards=true, .lead=0.3, .maxSpeed=110, .minSpeed=70, .earlyExitRange=0});
chassis.waitUntilDone();
pros::delay(300);
chassis.moveToPose(-34, -14, -52, 1500,
{.forwards=false, .lead=0.3, .maxSpeed=110, .minSpeed=70, .earlyExitRange=0});
chassis.moveToPose(-50, -6, -51, 1500, {.forwards=true, .lead=0.3, .maxSpeed=110,
.minSpeed=70, .earlyExitRange=0});
chassis.waitUntilDone();
pros::delay(300);
chassis.moveToPose(-34, -4, -52, 1500,
{.forwards=false, .lead=0.3, .maxSpeed=110, .minSpeed=70, .earlyExitRange=0});
chassis.waitUntilDone();
chassis.moveToPose(-67, 10, -80, 1200,
{.forwards=false, .lead=0.3, .maxSpeed=110, .minSpeed=70, .earlyExitRange=0});
chassis.waitUntilDone();
chassis.arcade(100,0);
pros::delay(600);
goalclamp.set_value(false);
pros::delay(200);
chassis.arcade(-100,0);
pros::delay(800);
chassis.moveToPose(-30, 60, 0, 2200,
{.forwards=true, .lead=0.3, .maxSpeed=110, .minSpeed=70, .earlyExitRange=0});

You might also like