Skip to content

Commit

Permalink
Cowtown Changes (#61)
Browse files Browse the repository at this point in the history
Co-authored-by: Programmers <broncobots@gmail.com>
  • Loading branch information
Mallen220 and frc1987 committed Nov 3, 2023
1 parent 0b0a7bd commit 088f753
Show file tree
Hide file tree
Showing 18 changed files with 551 additions and 174 deletions.
84 changes: 84 additions & 0 deletions src/main/deploy/pathplanner/BumpAuto04Balance.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"waypoints": [
{
"anchorPoint": {
"x": 7.073997477964574,
"y": 2.15586199878997
},
"prevControl": null,
"nextControl": {
"x": 6.644274052436994,
"y": 2.335755157621427
},
"holonomicAngle": 180.0,
"isReversal": false,
"velOverride": null,
"isLocked": false,
"isStopPoint": false,
"stopEvent": {
"names": [],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
},
{
"anchorPoint": {
"x": 5.254650502356561,
"y": 2.52
},
"prevControl": {
"x": 6.220418304465077,
"y": 2.52
},
"nextControl": {
"x": 5.030300017255194,
"y": 2.52
},
"holonomicAngle": 180.0,
"isReversal": false,
"velOverride": 0.25,
"isLocked": false,
"isStopPoint": false,
"stopEvent": {
"names": [],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
},
{
"anchorPoint": {
"x": 3.8007762890525787,
"y": 2.52
},
"prevControl": {
"x": 4.289432841687728,
"y": 2.52
},
"nextControl": null,
"holonomicAngle": 180.0,
"isReversal": false,
"velOverride": null,
"isLocked": false,
"isStopPoint": false,
"stopEvent": {
"names": [],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
}
],
"maxVelocity": 3.25,
"maxAcceleration": 3.0,
"isReversed": null,
"markers": [
{
"position": 0.05,
"names": [
"GoHome"
]
}
]
}
90 changes: 90 additions & 0 deletions src/main/deploy/pathplanner/NoBumpAuto04Balance.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"waypoints": [
{
"anchorPoint": {
"x": 6.7699638687309065,
"y": 3.5991968997826884
},
"prevControl": null,
"nextControl": {
"x": 6.7699638687309065,
"y": 3.358082547089816
},
"holonomicAngle": 145.0,
"isReversal": false,
"velOverride": null,
"isLocked": false,
"isStopPoint": false,
"stopEvent": {
"names": [],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
},
{
"anchorPoint": {
"x": 5.435283007718793,
"y": 2.52
},
"prevControl": {
"x": 6.369127568086373,
"y": 2.52
},
"nextControl": {
"x": 4.976865268451309,
"y": 2.52
},
"holonomicAngle": 180.0,
"isReversal": false,
"velOverride": 0.25,
"isLocked": false,
"isStopPoint": false,
"stopEvent": {
"names": [],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
},
{
"anchorPoint": {
"x": 3.8991238746366386,
"y": 2.52
},
"prevControl": {
"x": 4.1691650440779355,
"y": 2.52
},
"nextControl": null,
"holonomicAngle": 180.0,
"isReversal": false,
"velOverride": null,
"isLocked": false,
"isStopPoint": false,
"stopEvent": {
"names": [],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
}
],
"maxVelocity": 3.25,
"maxAcceleration": null,
"isReversed": null,
"markers": [
{
"position": 1.25,
"names": [
"ConeScorePrep"
]
},
{
"position": 0.03,
"names": [
"GoHome"
]
}
]
}
16 changes: 9 additions & 7 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/
public final class Constants {

public static final ArmProfile ARM_A = new ArmProfile(1012, -322.037); // +1
public static final ArmProfile ARM_A = new ArmProfile(786, -322.037); // +1
public static final ArmProfile ARM_B = new ArmProfile(687, -201); // +1.412
public static ArmProfile INSTALLED_ARM = true ? ARM_A : ARM_B;

Expand Down Expand Up @@ -97,7 +97,8 @@ public static class PositionConfigs {
new PositionConfig(1, 83, 1850 + INSTALLED_ARM.getWristOffset(), GamePiece.CONE);

public static final PositionConfig BACK_CONE_FLOOR =
new PositionConfig(1, 82.7, 1735 + INSTALLED_ARM.getWristOffset(), GamePiece.CONE);
new PositionConfig(1, 75.1, 2130 + INSTALLED_ARM.getWristOffset(), GamePiece.CONE); // 1880
// new PositionConfig(1, 81.7, 1880 + INSTALLED_ARM.getWristOffset(), GamePiece.CONE); //1880

public static final PositionConfig
BACK_CONE_FLOOR_TIPPED = // not a good angle with new LL mounts
Expand All @@ -110,7 +111,7 @@ public static class PositionConfigs {
new PositionConfig(38, 49.5, 2800 + INSTALLED_ARM.getWristOffset(), GamePiece.CONE);

public static final PositionConfig BACK_CUBE_FLOOR =
new PositionConfig(4, 98.2, 2731 + INSTALLED_ARM.getWristOffset(), GamePiece.CUBE);
new PositionConfig(4, 98.2, 2746 + INSTALLED_ARM.getWristOffset(), GamePiece.CUBE);

public static final PositionConfig BACK_CUBE_FLOOR_LONG =
new PositionConfig(27, 88, 2076 + INSTALLED_ARM.getWristOffset(), GamePiece.CUBE);
Expand Down Expand Up @@ -139,13 +140,13 @@ public static class PositionConfigs {
new PositionConfig(20.7, -43.5, 300 + INSTALLED_ARM.getWristOffset(), GamePiece.CONE);

public static final PositionConfig FRONT_CONE_MEDIUM_AUTO =
new PositionConfig(18, -40, 125 + INSTALLED_ARM.getWristOffset(), GamePiece.CONE);
new PositionConfig(22, -40, 225 + INSTALLED_ARM.getWristOffset(), GamePiece.CONE);

public static final PositionConfig FRONT_CONE_TOP =
new PositionConfig(37.5, -45.6, 433 + INSTALLED_ARM.getWristOffset(), GamePiece.CONE);

public static final PositionConfig FRONT_CONE_TOP_AUTO =
new PositionConfig(37.5, -43.6, 340 + INSTALLED_ARM.getWristOffset(), GamePiece.CONE);
new PositionConfig(38.5, -43.0, 450 + INSTALLED_ARM.getWristOffset(), GamePiece.CONE);

public static final PositionConfig FRONT_CUBE_FLOOR =
new PositionConfig(
Expand All @@ -161,13 +162,14 @@ public static class PositionConfigs {
new PositionConfig(5, -47, 1016 + INSTALLED_ARM.getWristOffset(), GamePiece.CUBE);

public static final PositionConfig FRONT_CUBE_TOP =
new PositionConfig(22, -57.8, 2045 + INSTALLED_ARM.getWristOffset(), GamePiece.CUBE);
new PositionConfig(23, -57.8, 2045 + INSTALLED_ARM.getWristOffset(), GamePiece.CUBE);

public static final PositionConfig FRONT_CUBE_TOP_AUTO =
new PositionConfig(24, -57.8, 2045 + INSTALLED_ARM.getWristOffset(), GamePiece.CUBE);

public static final PositionConfig BACK_DOUBLE_SUBSTATION =
new PositionConfig(22.25, 27, 2390 + INSTALLED_ARM.getWristOffset(), GamePiece.CONE);
new PositionConfig(
23.25, 24.22, 2575 + INSTALLED_ARM.getWristOffset(), GamePiece.CONE); // 2575

public static final PositionConfig FRONT_SINGLE_SUBSTATION =
new PositionConfig(0, -72, 2330 + INSTALLED_ARM.getWristOffset(), GamePiece.CONE);
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/frc/robot/DriveControls.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Driver Controls:
BackButton - Zero Gyroscope
RightBumper - Collect Cube Floor
RightTrigger - Reduce Speed
LeftTrigger - Reduce Speed, Align Straight
LeftBumper - Eject / Score
B - Collect Double Substation
StartButton - Go home
A - Score
Y - Collect Cone Floor

CoDriver Controls:
RightBumper - Correctional Grab GamePiece
LeftBumper - Eject (No home)
LeftTrigger - Home Wrist
StartButton - Increase Wrist Offset
BackButton - Decrease Wrist Offset
A - Set Height Floor
B - Set Height Medium
Y - Set Height High
X - Zero Arm Extension
2 changes: 0 additions & 2 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ public void autonomousInit() {

// schedule the autonomous command
if (autonomousCommand != null) {
robotContainer.setShouldUseVision(false);
autonomousCommand.schedule();
}
}
Expand All @@ -145,7 +144,6 @@ public void teleopInit() {
}
robotContainer.enableFieldRelative();
robotContainer.disableXstance();
robotContainer.setShouldUseVision(false);
}

/** This method is invoked at the start of the test period. */
Expand Down
Loading

0 comments on commit 088f753

Please sign in to comment.