auto testing: afternoon of the third day

This commit is contained in:
C4llSiqn
2025-03-19 11:56:44 -06:00
parent 6ac4b62089
commit d1fb8ce7b4
18 changed files with 142 additions and 459 deletions
@@ -21,11 +21,17 @@
"data": {
"name": "place-coral-left-l4"
}
},
{
"type": "named",
"data": {
"name": "lower-algae-removal"
}
}
]
}
},
"resetOdom": true,
"folder": null,
"folder": "1 Coral",
"choreoAuto": false
}
@@ -21,11 +21,17 @@
"data": {
"name": "place-coral-right-l4"
}
},
{
"type": "named",
"data": {
"name": "lower-algae-removal"
}
}
]
}
},
"resetOdom": true,
"folder": null,
"folder": "1 Coral",
"choreoAuto": false
}
@@ -46,6 +46,12 @@
"pathName": "Top Feed to Reef 6"
}
},
{
"type": "named",
"data": {
"name": "await-coral"
}
},
{
"type": "named",
"data": {
@@ -74,6 +80,6 @@
}
},
"resetOdom": true,
"folder": null,
"folder": "2 Coral",
"choreoAuto": false
}
@@ -46,6 +46,12 @@
"pathName": "Top Feed to Reef 6"
}
},
{
"type": "named",
"data": {
"name": "await-coral"
}
},
{
"type": "named",
"data": {
@@ -74,6 +80,6 @@
}
},
"resetOdom": true,
"folder": null,
"folder": "2 Coral",
"choreoAuto": false
}
@@ -46,6 +46,12 @@
"pathName": "Top Feed to Reef 6"
}
},
{
"type": "named",
"data": {
"name": "await-coral"
}
},
{
"type": "named",
"data": {
@@ -74,6 +80,6 @@
}
},
"resetOdom": true,
"folder": null,
"folder": "2 Coral",
"choreoAuto": false
}
@@ -19,7 +19,7 @@
{
"type": "named",
"data": {
"name": "place-coral-left-l4"
"name": "place-coral-right-l4"
}
},
{
@@ -46,6 +46,12 @@
"pathName": "Bottom Feed to Reef 2"
}
},
{
"type": "named",
"data": {
"name": "await-coral"
}
},
{
"type": "named",
"data": {
@@ -74,6 +80,6 @@
}
},
"resetOdom": true,
"folder": null,
"folder": "2 Coral",
"choreoAuto": false
}
@@ -19,7 +19,7 @@
{
"type": "named",
"data": {
"name": "place-coral-left-l4"
"name": "place-coral-right-l4"
}
},
{
@@ -46,6 +46,12 @@
"pathName": "Bottom Feed to Reef 2"
}
},
{
"type": "named",
"data": {
"name": "await-coral"
}
},
{
"type": "named",
"data": {
@@ -74,6 +80,6 @@
}
},
"resetOdom": true,
"folder": null,
"folder": "2 Coral",
"choreoAuto": false
}
@@ -19,7 +19,7 @@
{
"type": "named",
"data": {
"name": "place-coral-left-l4"
"name": "place-coral-right-l4"
}
},
{
@@ -46,6 +46,12 @@
"pathName": "Bottom Feed to Reef 2"
}
},
{
"type": "named",
"data": {
"name": "await-coral"
}
},
{
"type": "named",
"data": {
@@ -74,6 +80,6 @@
}
},
"resetOdom": true,
"folder": null,
"folder": "2 Coral",
"choreoAuto": false
}
@@ -74,6 +74,6 @@
}
},
"resetOdom": true,
"folder": null,
"folder": "2 Coral",
"choreoAuto": false
}
@@ -74,6 +74,6 @@
}
},
"resetOdom": true,
"folder": null,
"folder": "2 Coral",
"choreoAuto": false
}
@@ -1,109 +0,0 @@
{
"version": "2025.0",
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "prepare-l4"
}
},
{
"type": "path",
"data": {
"pathName": "Cage 1 to Reef"
}
},
{
"type": "named",
"data": {
"name": "place-coral-right-l4"
}
},
{
"type": "path",
"data": {
"pathName": "Reef 5 to Top Feed"
}
},
{
"type": "named",
"data": {
"name": "feed-driveback"
}
},
{
"type": "named",
"data": {
"name": "grab-coral"
}
},
{
"type": "path",
"data": {
"pathName": "Top Feed to Reef 6"
}
},
{
"type": "named",
"data": {
"name": "place-coral-right-l4"
}
},
{
"type": "path",
"data": {
"pathName": "Reef 6 to Top Feed"
}
},
{
"type": "named",
"data": {
"name": "feed-driveback"
}
},
{
"type": "named",
"data": {
"name": "grab-coral"
}
},
{
"type": "path",
"data": {
"pathName": "Top Feed to Reef 6"
}
},
{
"type": "named",
"data": {
"name": "place-coral-left-l4"
}
},
{
"type": "path",
"data": {
"pathName": "Reef 6 to Top Feed"
}
},
{
"type": "named",
"data": {
"name": "feed-driveback"
}
},
{
"type": "named",
"data": {
"name": "grab-coral"
}
}
]
}
},
"resetOdom": true,
"folder": null,
"choreoAuto": false
}
@@ -1,109 +0,0 @@
{
"version": "2025.0",
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "prepare-l4"
}
},
{
"type": "path",
"data": {
"pathName": "Cage 3 to Reef"
}
},
{
"type": "named",
"data": {
"name": "place-coral-right-l4"
}
},
{
"type": "path",
"data": {
"pathName": "Reef 5 to Top Feed"
}
},
{
"type": "named",
"data": {
"name": "feed-driveback"
}
},
{
"type": "named",
"data": {
"name": "grab-coral"
}
},
{
"type": "path",
"data": {
"pathName": "Top Feed to Reef 6"
}
},
{
"type": "named",
"data": {
"name": "place-coral-right-l4"
}
},
{
"type": "path",
"data": {
"pathName": "Reef 6 to Top Feed"
}
},
{
"type": "named",
"data": {
"name": "feed-driveback"
}
},
{
"type": "named",
"data": {
"name": "grab-coral"
}
},
{
"type": "path",
"data": {
"pathName": "Top Feed to Reef 6"
}
},
{
"type": "named",
"data": {
"name": "place-coral-left-l4"
}
},
{
"type": "path",
"data": {
"pathName": "Reef 6 to Top Feed"
}
},
{
"type": "named",
"data": {
"name": "feed-driveback"
}
},
{
"type": "named",
"data": {
"name": "grab-coral"
}
}
]
}
},
"resetOdom": true,
"folder": null,
"choreoAuto": false
}
@@ -1,109 +0,0 @@
{
"version": "2025.0",
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "prepare-l4"
}
},
{
"type": "path",
"data": {
"pathName": "Cage 4 to Reef"
}
},
{
"type": "named",
"data": {
"name": "place-coral-left-l4"
}
},
{
"type": "path",
"data": {
"pathName": "Reef 3 to Bottom Feed"
}
},
{
"type": "named",
"data": {
"name": "feed-driveback"
}
},
{
"type": "named",
"data": {
"name": "grab-coral"
}
},
{
"type": "path",
"data": {
"pathName": "Bottom Feed to Reef 2"
}
},
{
"type": "named",
"data": {
"name": "place-coral-right-l4"
}
},
{
"type": "path",
"data": {
"pathName": "Reef 2 to Bottom Feed"
}
},
{
"type": "named",
"data": {
"name": "feed-driveback"
}
},
{
"type": "named",
"data": {
"name": "grab-coral"
}
},
{
"type": "path",
"data": {
"pathName": "Bottom Feed to Reef 2"
}
},
{
"type": "named",
"data": {
"name": "place-coral-left-l4"
}
},
{
"type": "path",
"data": {
"pathName": "Reef 2 to Bottom Feed"
}
},
{
"type": "named",
"data": {
"name": "feed-driveback"
}
},
{
"type": "named",
"data": {
"name": "grab-coral"
}
}
]
}
},
"resetOdom": true,
"folder": null,
"choreoAuto": false
}
@@ -1,109 +0,0 @@
{
"version": "2025.0",
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "prepare-l4"
}
},
{
"type": "path",
"data": {
"pathName": "Cage 6 to Reef"
}
},
{
"type": "named",
"data": {
"name": "place-coral-left-l4"
}
},
{
"type": "path",
"data": {
"pathName": "Reef 3 to Bottom Feed"
}
},
{
"type": "named",
"data": {
"name": "feed-driveback"
}
},
{
"type": "named",
"data": {
"name": "grab-coral"
}
},
{
"type": "path",
"data": {
"pathName": "Bottom Feed to Reef 2"
}
},
{
"type": "named",
"data": {
"name": "place-coral-right-l4"
}
},
{
"type": "path",
"data": {
"pathName": "Reef 2 to Bottom Feed"
}
},
{
"type": "named",
"data": {
"name": "feed-driveback"
}
},
{
"type": "named",
"data": {
"name": "grab-coral"
}
},
{
"type": "path",
"data": {
"pathName": "Bottom Feed to Reef 2"
}
},
{
"type": "named",
"data": {
"name": "place-coral-left-l4"
}
},
{
"type": "path",
"data": {
"pathName": "Reef 2 to Bottom Feed"
}
},
{
"type": "named",
"data": {
"name": "feed-driveback"
}
},
{
"type": "named",
"data": {
"name": "grab-coral"
}
}
]
}
},
"resetOdom": true,
"folder": null,
"choreoAuto": false
}
@@ -0,0 +1,54 @@
{
"version": "2025.0",
"waypoints": [
{
"anchor": {
"x": 4.0,
"y": 6.0
},
"prevControl": null,
"nextControl": {
"x": 4.2495147804709745,
"y": 5.984431624152738
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 4.0,
"y": 6.0
},
"prevControl": {
"x": 4.249520880858856,
"y": 5.984529705386749
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [],
"pointTowardsZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0,
"nominalVoltage": 12.0,
"unlimited": false
},
"goalEndState": {
"velocity": 0,
"rotation": 0.0
},
"reversed": false,
"folder": null,
"idealStartingState": {
"velocity": 0,
"rotation": 0.0
},
"useDefaultConstraints": true
}
+5 -1
View File
@@ -9,7 +9,11 @@
"Reef to Bottom Feed",
"Top Feed to Reef"
],
"autoFolders": [],
"autoFolders": [
"1 Coral",
"2 Coral",
"3 Coral"
],
"defaultMaxVel": 3.0,
"defaultMaxAccel": 3.0,
"defaultMaxAngVel": 540.0,
@@ -163,7 +163,7 @@ public class RobotContainer {
new Translation2d(0,-0.5),
new Translation2d(), m_robotElevator::getEndeffectorLimit, true)
),
new InstantCommand(m_robotSwerveDrive::softStop, m_robotElevator),
new InstantCommand(m_robotSwerveDrive::softStop, m_robotSwerveDrive),
new InstantCommand(() -> m_robotElevator.transitionState(CoordinationState.ScoringFour), m_robotElevator),
@@ -172,10 +172,10 @@ public class RobotContainer {
new MoveForTimeCommand(m_robotSwerveDrive,
new Translation2d(0,1), new Translation2d(), AutoConstants.L4_DRIVE_TIME, true),
new ConditionalCommand(
new InstantCommand(() -> m_robotElevator.transitionState(CoordinationState.PrimedFour), m_robotElevator),
// new ConditionalCommand(
// new InstantCommand(() -> m_robotElevator.transitionState(CoordinationState.PrimedFour), m_robotElevator),
new InstantCommand(() -> m_robotElevator.transitionState(CoordinationState.Waiting), m_robotElevator),
() -> m_robotElevator.hasCoral()),
// () -> m_robotElevator.hasCoral()),
new InstantCommand(() -> {m_robotSwerveDrive.endSlowPeriod();})
);
@@ -280,7 +280,7 @@ public class RobotContainer {
new Translation2d(0,-0.5),
new Translation2d(), m_robotElevator::getEndeffectorLimit, true)
),
new InstantCommand(m_robotSwerveDrive::softStop, m_robotElevator),
new InstantCommand(m_robotSwerveDrive::softStop, m_robotSwerveDrive),
new InstantCommand(() -> m_robotElevator.transitionState(CoordinationState.ScoringFour), m_robotElevator),
@@ -290,10 +290,10 @@ public class RobotContainer {
new MoveForTimeCommand(m_robotSwerveDrive,
new Translation2d(0,1), new Translation2d(), AutoConstants.L4_DRIVE_TIME, true),
new ConditionalCommand(
new InstantCommand(() -> m_robotElevator.transitionState(CoordinationState.PrimedFour), m_robotElevator),
// new ConditionalCommand(
// new InstantCommand(() -> m_robotElevator.transitionState(CoordinationState.PrimedFour), m_robotElevator),
new InstantCommand(() -> m_robotElevator.transitionState(CoordinationState.Waiting), m_robotElevator),
() -> m_robotElevator.hasCoral()),
// () -> m_robotElevator.hasCoral()),
@@ -511,6 +511,10 @@ public class RobotContainer {
NamedCommands.registerCommand("place-coral-left-l2", AprilLidarAlignL2Left);
NamedCommands.registerCommand("place-coral-right-l2", AprilLidarAlignL2Right);
NamedCommands.registerCommand("lower-algae-removal", lowerAlgaeRemove);
NamedCommands.registerCommand("upper-algae-removal", upperAlgaeRemove);
NamedCommands.registerCommand("prepare-l4", new SequentialCommandGroup(
// new InstantCommand(() -> m_robotElevator.transitionState(CoordinationState.Hovering)),
// new waitElevatorRefrence(m_robotElevator),
@@ -830,7 +834,15 @@ public class RobotContainer {
}
autoChooser.onChange((filename) -> {
autoCommand = new PathPlannerAuto(filename);
if (filename.equals("Taxi")) {
autoCommand = new SequentialCommandGroup(
new MoveForTimeCommand(m_robotSwerveDrive,
new Translation2d(0, -1),
new Translation2d(), 1000, true
), new InstantCommand(()-> {m_robotSwerveDrive.softStop();} , m_robotSwerveDrive));
} else {
autoCommand = new PathPlannerAuto(filename);
}
System.out.println("Robot Auto Changed " + filename);
});
// SmartDashboard.putData(autoChooser);
@@ -118,6 +118,7 @@ public class SwerveDrive extends Subsystem {
}
public void setOdoPose(Pose2d pose) {
if (pose == null) return;
initalPose2d = pose;
swerveDriveTrain.resetPose(pose);
}