Skip to content

Commit

Permalink
Refined the path strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
rhsftc committed Nov 6, 2024
1 parent fe847c5 commit 4b4b933
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
* This OpMode illustrates the concept of driving an autonomous path based on Gyro (IMU) heading and encoder counts.
* The code is structured as a LinearOpMode
*
* The path to be followed by the robot is built from a series of poses.
* The path to be followed by the robot is built from a series of segments.
*
* The code REQUIRES that you have encoders on the drive motors, otherwise you should use: RobotAutoDriveByTime;
*
Expand Down Expand Up @@ -108,6 +108,8 @@ public class AutoGyro extends LinearOpMode {
static final double P_TURN_GAIN = 0.02; // Larger is more responsive, but also less stable.
static final double P_DRIVE_GAIN = 0.03; // Larger is more responsive, but also less stable.

// The following classes define parameters to the driving methods. They are used to construct
// paths for the autonomous strategy.
public static class DriveStraight {
double distance;
double heading;
Expand Down Expand Up @@ -136,6 +138,7 @@ public HoldHeading(double heading, double holdTime) {
}
}

// A list of lists. Each item in paths defines a state in the autonomous process.
public ArrayList<ArrayList> paths = new ArrayList<>();

@Override
Expand All @@ -149,8 +152,6 @@ public void runOpMode() {
robot.rightBackDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);

/* The next two lines define Hub orientation.
* The Default Orientation (shown) is when a hub is mounted horizontally with the printed logo pointing UP and the USB port pointing FORWARD.
*
* To Do: EDIT these two lines to match YOUR mounting configuration.
*/
RevHubOrientationOnRobot.LogoFacingDirection logoDirection = RevHubOrientationOnRobot.LogoFacingDirection.UP;
Expand Down

This file was deleted.

0 comments on commit 4b4b933

Please sign in to comment.