use of edu.wpi.first.math.trajectory.Trajectory in project FRC2022 by Team2338.
the class ThreeBallTerminalRight method reverse.
public Command reverse() {
Trajectory trajectory = TrajectoryGenerator.generateTrajectory(List.of(new Pose2dFeet().set(0.0, 0.0, 0.0), // 1st cargo location
new Pose2dFeet().set(-3.4, 0.0, 0.0)), RobotTrajectory.getInstance().configReverseSlow);
// create the command using the trajectory
RamseteCommand rc = RobotTrajectory.getInstance().createRamseteCommand(trajectory);
// Run path following command, then stop at the end.
return rc.andThen(() -> Robot.drivetrain.tankDriveVolts(0, 0));
}
use of edu.wpi.first.math.trajectory.Trajectory in project FRC2022 by Team2338.
the class TwoBallMiddle method reverse.
public Command reverse() {
Trajectory trajectory = TrajectoryGenerator.generateTrajectory(List.of(new Pose2dFeet().set(0.0, 0.0, 0.0), // 1st cargo location
new Pose2dFeet().set(-4.5, 0, 0.0)), RobotTrajectory.getInstance().configReverseSlow);
// create the command using the trajectory
RamseteCommand rc = RobotTrajectory.getInstance().createRamseteCommand(trajectory);
// return rc.andThen(() -> Robot.drivetrain.tankDriveVolts(0, 0));
return rc;
}
use of edu.wpi.first.math.trajectory.Trajectory in project FRC2022 by Team2338.
the class TwoBallMiddle method reverseAgain.
public Command reverseAgain() {
Trajectory trajectory = TrajectoryGenerator.generateTrajectory(List.of(new Pose2dFeet().set(-4.5, 0, 0), // shooting position
new Pose2dFeet().set(-6.5, 0, -10)), RobotTrajectory.getInstance().configReverseSlow);
// create the command using the trajectory
RamseteCommand rc = RobotTrajectory.getInstance().createRamseteCommand(trajectory);
// Run path following command, then stop at the end.
return rc.andThen(() -> Robot.drivetrain.tankDriveVolts(0, 0));
}
Aggregations