all my homies hate roadrunner
This commit is contained in:
parent
97bf2a6caa
commit
5ec14a3fc7
|
@ -1,34 +1,25 @@
|
|||
package org.firstinspires.ftc.teamcode.createdcode.enhancedautos;
|
||||
|
||||
import com.acmerobotics.roadrunner.geometry.Pose2d;
|
||||
import com.acmerobotics.roadrunner.geometry.Vector2d;
|
||||
import com.acmerobotics.roadrunner.trajectory.Trajectory;
|
||||
import com.acmerobotics.roadrunner.trajectory.TrajectoryBuilder;
|
||||
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
|
||||
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
|
||||
|
||||
import org.firstinspires.ftc.teamcode.drive.SampleMecanumDrive;
|
||||
import com.qualcomm.robotcore.hardware.DcMotor;
|
||||
|
||||
@Autonomous
|
||||
public class AutoBlueSubstationParkingBehavior extends LinearOpMode {
|
||||
SampleMecanumDrive mecanumDrive;
|
||||
|
||||
@Override
|
||||
public void runOpMode() throws InterruptedException {
|
||||
mecanumDrive = new SampleMecanumDrive(hardwareMap);
|
||||
API api = new API(this);
|
||||
DcMotor fl = hardwareMap.get(DcMotor.class, "frontLeft");
|
||||
DcMotor fr = hardwareMap.get(DcMotor.class, "frontRight");
|
||||
DcMotor rl = hardwareMap.get(DcMotor.class, "rearLeft");
|
||||
DcMotor rr = hardwareMap.get(DcMotor.class, "rearRight");
|
||||
|
||||
API api = new API(this);
|
||||
MovementAPI movementAPI = new MovementAPI(api, fl, fr, rl, rr);
|
||||
|
||||
waitForStart();
|
||||
|
||||
// init move to default terminal
|
||||
Trajectory endpos = api.makeTrajectories(
|
||||
mecanumDrive,
|
||||
new Pose2d(new Vector2d(-34, 60), Math.toRadians(270)),
|
||||
new int[]{-34, 1},
|
||||
new int[]{60, 60}
|
||||
);
|
||||
|
||||
mecanumDrive.followTrajectory(endpos);
|
||||
movementAPI.move(90, 0.7);
|
||||
api.pause(0.7);
|
||||
movementAPI.stop();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,34 +1,25 @@
|
|||
package org.firstinspires.ftc.teamcode.createdcode.enhancedautos;
|
||||
|
||||
import com.acmerobotics.roadrunner.geometry.Pose2d;
|
||||
import com.acmerobotics.roadrunner.geometry.Vector2d;
|
||||
import com.acmerobotics.roadrunner.trajectory.Trajectory;
|
||||
import com.acmerobotics.roadrunner.trajectory.TrajectoryBuilder;
|
||||
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
|
||||
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
|
||||
|
||||
import org.firstinspires.ftc.teamcode.drive.SampleMecanumDrive;
|
||||
import com.qualcomm.robotcore.hardware.DcMotor;
|
||||
|
||||
@Autonomous
|
||||
public class AutoBlueTerminalParkingBehavior extends LinearOpMode {
|
||||
SampleMecanumDrive mecanumDrive;
|
||||
|
||||
@Override
|
||||
public void runOpMode() throws InterruptedException {
|
||||
mecanumDrive = new SampleMecanumDrive(hardwareMap);
|
||||
API api = new API(this);
|
||||
DcMotor fl = hardwareMap.get(DcMotor.class, "frontLeft");
|
||||
DcMotor fr = hardwareMap.get(DcMotor.class, "frontRight");
|
||||
DcMotor rl = hardwareMap.get(DcMotor.class, "rearLeft");
|
||||
DcMotor rr = hardwareMap.get(DcMotor.class, "rearRight");
|
||||
|
||||
API api = new API(this);
|
||||
MovementAPI movementAPI = new MovementAPI(api, fl, fr, rl, rr);
|
||||
|
||||
waitForStart();
|
||||
|
||||
// init move to default terminal
|
||||
Trajectory endpos = api.makeTrajectories(
|
||||
mecanumDrive,
|
||||
new Pose2d(new Vector2d(-34, 60), Math.toRadians(270)),
|
||||
new int[]{-34, -70},
|
||||
new int[]{60, 60}
|
||||
);
|
||||
|
||||
mecanumDrive.followTrajectory(endpos);
|
||||
movementAPI.move(-90, 0.7);
|
||||
api.pause(0.7);
|
||||
movementAPI.stop();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,34 +1,25 @@
|
|||
package org.firstinspires.ftc.teamcode.createdcode.enhancedautos;
|
||||
|
||||
import com.acmerobotics.roadrunner.geometry.Pose2d;
|
||||
import com.acmerobotics.roadrunner.geometry.Vector2d;
|
||||
import com.acmerobotics.roadrunner.trajectory.Trajectory;
|
||||
import com.acmerobotics.roadrunner.trajectory.TrajectoryBuilder;
|
||||
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
|
||||
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
|
||||
|
||||
import org.firstinspires.ftc.teamcode.drive.SampleMecanumDrive;
|
||||
import com.qualcomm.robotcore.hardware.DcMotor;
|
||||
|
||||
@Autonomous
|
||||
public class AutoRedSubstationParkingBehavior extends LinearOpMode {
|
||||
SampleMecanumDrive mecanumDrive;
|
||||
|
||||
@Override
|
||||
public void runOpMode() throws InterruptedException {
|
||||
mecanumDrive = new SampleMecanumDrive(hardwareMap);
|
||||
API api = new API(this);
|
||||
DcMotor fl = hardwareMap.get(DcMotor.class, "frontLeft");
|
||||
DcMotor fr = hardwareMap.get(DcMotor.class, "frontRight");
|
||||
DcMotor rl = hardwareMap.get(DcMotor.class, "rearLeft");
|
||||
DcMotor rr = hardwareMap.get(DcMotor.class, "rearRight");
|
||||
|
||||
API api = new API(this);
|
||||
MovementAPI movementAPI = new MovementAPI(api, fl, fr, rl, rr);
|
||||
|
||||
waitForStart();
|
||||
|
||||
// init move to default terminal
|
||||
Trajectory endpos = api.makeTrajectories(
|
||||
mecanumDrive,
|
||||
new Pose2d(new Vector2d(-34, -60), Math.toRadians(90)),
|
||||
new int[]{-34, 1},
|
||||
new int[]{-60, -60}
|
||||
);
|
||||
|
||||
mecanumDrive.followTrajectory(endpos);
|
||||
movementAPI.move(-90, 0.7);
|
||||
api.pause(0.7);
|
||||
movementAPI.stop();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,34 +1,27 @@
|
|||
package org.firstinspires.ftc.teamcode.createdcode.enhancedautos;
|
||||
|
||||
import com.acmerobotics.roadrunner.geometry.Pose2d;
|
||||
import com.acmerobotics.roadrunner.geometry.Vector2d;
|
||||
import com.acmerobotics.roadrunner.trajectory.Trajectory;
|
||||
import com.acmerobotics.roadrunner.trajectory.TrajectoryBuilder;
|
||||
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
|
||||
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
|
||||
import com.qualcomm.robotcore.hardware.DcMotor;
|
||||
|
||||
import org.firstinspires.ftc.teamcode.drive.SampleMecanumDrive;
|
||||
|
||||
@Autonomous
|
||||
public class AutoRedTerminalParkingBehavior extends LinearOpMode {
|
||||
SampleMecanumDrive mecanumDrive;
|
||||
|
||||
@Override
|
||||
public void runOpMode() throws InterruptedException {
|
||||
mecanumDrive = new SampleMecanumDrive(hardwareMap);
|
||||
DcMotor fl = hardwareMap.get(DcMotor.class, "frontLeft");
|
||||
DcMotor fr = hardwareMap.get(DcMotor.class, "frontRight");
|
||||
DcMotor rl = hardwareMap.get(DcMotor.class, "rearLeft");
|
||||
DcMotor rr = hardwareMap.get(DcMotor.class, "rearRight");
|
||||
|
||||
API api = new API(this);
|
||||
MovementAPI movementAPI = new MovementAPI(api, fl, fr, rl, rr);
|
||||
|
||||
waitForStart();
|
||||
|
||||
// init move to default terminal
|
||||
Trajectory endpos = api.makeTrajectories(
|
||||
mecanumDrive,
|
||||
new Pose2d(new Vector2d(-34, -60), Math.toRadians(90)),
|
||||
new int[]{-34, -70},
|
||||
new int[]{-60, -60}
|
||||
);
|
||||
|
||||
mecanumDrive.followTrajectory(endpos);
|
||||
movementAPI.move(90, 0.7);
|
||||
api.pause(0.7);
|
||||
movementAPI.stop();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue