"waypoints": [
{
"anchor": {
- "x": 4.0,
+ "x": 3.8,
"y": 7.623190984573506
},
"prevControl": null,
"nextControl": {
- "x": 7.193921116983211,
+ "x": 6.993921116983211,
"y": 7.623190984573506
},
"isLocked": false,
},
{
"anchor": {
- "x": 2.6967378410438916,
- "y": 7.031435349940688
- },
- "prevControl": {
- "x": 3.336191665489592,
- "y": 7.488201938773801
- },
- "nextControl": {
- "x": 2.4696060632890897,
- "y": 6.869193443841226
- },
- "isLocked": false,
- "linkedName": null
- },
- {
- "anchor": {
- "x": 1.8682799525504161,
- "y": 5.084
+ "x": 0.6955278766310802,
+ "y": 7.623190984573506
},
"prevControl": {
- "x": 1.8804205947396213,
- "y": 5.5984071344829935
+ "x": -0.09030729073703303,
+ "y": 7.623190984573506
},
"nextControl": null,
"isLocked": false,
"rotationDegrees": 180.0
},
{
- "waypointRelativePos": 4.95,
- "rotationDegrees": -89.50334218867351
+ "waypointRelativePos": 5,
+ "rotationDegrees": 180.0
}
],
"constraintZones": [
{
"name": "Depot",
"minWaypointRelativePos": 4.953880764904385,
- "maxWaypointRelativePos": 6.0,
+ "maxWaypointRelativePos": 5.5,
"constraints": {
"maxVelocity": 0.5,
"maxAcceleration": 2.0,
"unlimited": false
},
"goalEndState": {
- "velocity": 0,
- "rotation": -90.37860096211433
+ "velocity": 0.0,
+ "rotation": 180.0
},
"reversed": false,
"folder": "week 2 autos",
},
{
"anchor": {
- "x": 4.0,
+ "x": 3.8,
"y": 7.623
},
"prevControl": {
- "x": 3.7421509693935855,
+ "x": 3.5421509693935853,
"y": 7.623
},
"nextControl": null,
double x = drivepose.getX();
double y = drivepose.getY();
//double y = drivepose.getY();
- if ((x < FIELD_LENGTH/2 - Units.inchesToMeters(120.0) && x > (BLUE_ALLIANCE_LINE - (DriveConstants.ROBOT_WIDTH_WITH_BUMPERS)/2)) //blue alliance line
- || x > FIELD_LENGTH/2 + Units.inchesToMeters(120.0) && x < (RED_ALLIANCE_LINE - (DriveConstants.ROBOT_WIDTH_WITH_BUMPERS)/2)) {
+ if ((x < FIELD_LENGTH/2 - Units.inchesToMeters(120.0) && x > (BLUE_ALLIANCE_LINE + (DriveConstants.ROBOT_WIDTH_WITH_BUMPERS)/2)) //blue alliance line
+ || x > FIELD_LENGTH/2 + Units.inchesToMeters(120.0) && x < (RED_ALLIANCE_LINE + (DriveConstants.ROBOT_WIDTH_WITH_BUMPERS)/2)) {
return FieldZone.TRENCH_BUMP;
}
if(((y < (FIELD_WIDTH / 2) + 0.158750) && y > (FIELD_WIDTH / 2) - 0.736600) && (x < Units.inchesToMeters(47.0) || x > FIELD_LENGTH - Units.inchesToMeters(47.0)) && Robot.getAlliance() == Alliance.Blue) {
// if(((y < FIELD_WIDTH - (46.75 / 2) && y > FIELD_WIDTH - (46.75 / 2))) && ((x > 207.42375 && x < 207.42375 + 36.0) || (x < FIELD_LENGTH - 207.42375 && x > FIELD_LENGTH - 207.42375 - 36.0))) {
// return FieldZone.UNDER_LADDER;
// }
- if(x > FieldConstants.RED_ALLIANCE_LINE - (DriveConstants.ROBOT_WIDTH_WITH_BUMPERS)/2) { // inside red
+ if(x > FieldConstants.RED_ALLIANCE_LINE + (DriveConstants.ROBOT_WIDTH_WITH_BUMPERS)/2) { // inside red
if (Robot.getAlliance() == Alliance.Red) {
return FieldZone.ALLIANCE;
} else {
return FieldZone.OPPOSITION;
}
- } else if (x < FieldConstants.BLUE_ALLIANCE_LINE - (DriveConstants.ROBOT_WIDTH_WITH_BUMPERS)/2) {
+ } else if (x < FieldConstants.BLUE_ALLIANCE_LINE + (DriveConstants.ROBOT_WIDTH_WITH_BUMPERS)/2) {
if (Robot.getAlliance() == Alliance.Blue) {
return FieldZone.ALLIANCE;
} else {