FRC1732 / 2022-Competition

Code for the 2022 Season
Other
0 stars 0 forks source link

Document field Poses for auto routines #44

Open borkae opened 2 years ago

borkae commented 2 years ago

Drive routines for Autonomous need to be defined as points on the field with rotation headers. Those are the data points for the Trajectory.

    Trajectory exampleTrajectory = TrajectoryGenerator.generateTrajectory(
        // Start at the origin facing the +X direction
        new Pose2d(0, 0, new Rotation2d(0)),
        // Pass through these two interior waypoints, making an 's' curve path
        List.of(
            new Translation2d(1, 1),
            new Translation2d(2, -1)
        ),
        // End 3 meters straight ahead of where we started, facing forward
        new Pose2d(3, 0, new Rotation2d(0)),
        // Pass config
        config
    );

For each of our Auto routines, define the x, y and rotation of each of the points in the Trajectory. Units of measures - meters, and degrees.