Skip to content

Commit f72b397

Browse files
barge auto fixes
1 parent 968c67f commit f72b397

File tree

4 files changed

+25
-18
lines changed

4 files changed

+25
-18
lines changed

src/main/deploy/pathplanner/paths/One piece part 2 barge.path

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@
88
},
99
"prevControl": null,
1010
"nextControl": {
11-
"x": 6.912717627679558,
12-
"y": 4.14838350636806
11+
"x": 6.58380744421885,
12+
"y": 3.97072622940022
1313
},
1414
"isLocked": false,
1515
"linkedName": null
1616
},
1717
{
1818
"anchor": {
19-
"x": 6.449385245901639,
20-
"y": 4.186834016393442
19+
"x": 6.521380450274493,
20+
"y": 4.020078421927787
2121
},
2222
"prevControl": {
23-
"x": 5.587703157977192,
24-
"y": 4.227767040157686
23+
"x": 5.692719585551794,
24+
"y": 4.197501730233285
2525
},
2626
"nextControl": null,
2727
"isLocked": false,
@@ -42,13 +42,13 @@
4242
},
4343
"goalEndState": {
4444
"velocity": 0,
45-
"rotation": -178.80651057601796
45+
"rotation": 180.0
4646
},
4747
"reversed": false,
4848
"folder": null,
4949
"idealStartingState": {
5050
"velocity": 0,
51-
"rotation": -178.8982938847937
51+
"rotation": 180.0
5252
},
5353
"useDefaultConstraints": true
5454
}

src/main/deploy/pathplanner/paths/One piece part 4 barge.path

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@
88
},
99
"prevControl": null,
1010
"nextControl": {
11-
"x": 7.523031014796091,
12-
"y": 6.049442112922044
11+
"x": 6.415690074084619,
12+
"y": 5.303542827299003
1313
},
1414
"isLocked": false,
1515
"linkedName": null
1616
},
1717
{
1818
"anchor": {
19-
"x": 6.041803278688524,
20-
"y": 6.788165983606557
19+
"x": 5.835833575274493,
20+
"y": 5.905737634607262
2121
},
2222
"prevControl": {
23-
"x": 7.339851338398133,
24-
"y": 6.1537541705130065
23+
"x": 5.911689711991,
24+
"y": 5.5599909301266
2525
},
2626
"nextControl": null,
2727
"isLocked": false,
@@ -42,7 +42,7 @@
4242
},
4343
"goalEndState": {
4444
"velocity": 0,
45-
"rotation": 178.91907581333933
45+
"rotation": 126.20121880708717
4646
},
4747
"reversed": false,
4848
"folder": null,

src/main/java/team1403/robot/RobotContainer.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,12 @@ private void configureBindings() {
518518
NamedCommands.registerCommand("ReefAlignR", getAlignCommand(Blackbox.ReefSelect.RIGHT));
519519
NamedCommands.registerCommand("ReefAlignCenter", getAlignCommandCenter());
520520
NamedCommands.registerCommand("Loading", Blackbox.robotStateCmd(Blackbox.State.loading));
521+
NamedCommands.registerCommand("LoadingFromBarge", Commands.sequence(
522+
Blackbox.robotStateCmd(State.MoveElevator),
523+
new WristCommand(m_wrist, Constants.Wrist.Setpoints.Barge).asProxy(),
524+
new ElevatorCommand(m_elevator, Constants.Elevator.Setpoints.Source).asProxy(),
525+
Blackbox.robotStateCmd(State.loading)
526+
));
521527

522528
NamedCommands.registerCommand("Barge L3", Commands.sequence(
523529
Blackbox.robotStateCmd(State.MoveElevator),

src/main/java/team1403/robot/commands/auto/AutoHelper.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,12 @@ public static Command getOnePCenterAlgae(SwerveSubsystem m_swerve) {
5757
Commands.waitSeconds(3.0),
5858
AutoUtil.loadPathPlannerPath("One piece part 3 barge", m_swerve),
5959
NamedCommands.getCommand("Net Shot"),
60-
NamedCommands.getCommand("WaitForSetpoint"),
61-
NamedCommands.getCommand("Algae Expel")
60+
NamedCommands.getCommand("WaitForSetpoint")
61+
//NamedCommands.getCommand("Algae Expel") // default command will expel
6262
)
6363
),
64-
NamedCommands.getCommand("Loading"),
64+
Commands.waitSeconds(0.5),
65+
NamedCommands.getCommand("LoadingFromBarge"), //make sure we don't kill ourselves on the barge
6566
AutoUtil.loadPathPlannerPath("One piece part 4 barge", m_swerve)
6667
);
6768
} catch (Exception e) {

0 commit comments

Comments
 (0)