Intake Retracted added

This commit is contained in:
Shikhar
2026-03-05 23:33:14 -07:00
parent 0957729c80
commit c2f16a5117
10 changed files with 215 additions and 107 deletions
@@ -28,12 +28,6 @@
"name": "Robot Shoot" "name": "Robot Shoot"
} }
}, },
{
"type": "path",
"data": {
"pathName": "Center-NeutralL"
}
},
{ {
"type": "named", "type": "named",
"data": { "data": {
@@ -43,7 +37,25 @@
{ {
"type": "path", "type": "path",
"data": { "data": {
"pathName": "HubFarLeft-NeutralZone" "pathName": "Center-NeutralL"
}
},
{
"type": "path",
"data": {
"pathName": "HubFarLeft-NeutralZone 1-2"
}
},
{
"type": "named",
"data": {
"name": "Intake Retracted"
}
},
{
"type": "path",
"data": {
"pathName": "HubFarLeft-NeutralZone 2-2"
} }
} }
] ]
@@ -28,12 +28,6 @@
"name": "Robot Shoot" "name": "Robot Shoot"
} }
}, },
{
"type": "path",
"data": {
"pathName": "Center-NeutralR"
}
},
{ {
"type": "named", "type": "named",
"data": { "data": {
@@ -43,7 +37,25 @@
{ {
"type": "path", "type": "path",
"data": { "data": {
"pathName": "HubFarRight-NeutralZone" "pathName": "Center-NeutralR"
}
},
{
"type": "path",
"data": {
"pathName": "HubFarRight-NeutralZone 1-2"
}
},
{
"type": "named",
"data": {
"name": "Intake Retracted"
}
},
{
"type": "path",
"data": {
"pathName": "HubFarRight-NeutralZone 2-2"
} }
} }
] ]
@@ -43,7 +43,19 @@
{ {
"type": "path", "type": "path",
"data": { "data": {
"pathName": "HubFarLeft-NeutralZone" "pathName": "HubFarLeft-NeutralZone 1-2"
}
},
{
"type": "named",
"data": {
"name": "Intake Retracted"
}
},
{
"type": "path",
"data": {
"pathName": "HubFarLeft-NeutralZone 2-2"
} }
} }
] ]
@@ -27,24 +27,6 @@
"data": { "data": {
"name": "Robot Shoot" "name": "Robot Shoot"
} }
},
{
"type": "named",
"data": {
"name": "Intake Extended"
}
},
{
"type": "path",
"data": {
"pathName": "ReadyPush"
}
},
{
"type": "path",
"data": {
"pathName": "HubFarRight-NeutralZone"
}
} }
] ]
} }
@@ -47,12 +47,6 @@
"name": "Robot Shoot" "name": "Robot Shoot"
} }
}, },
{
"type": "path",
"data": {
"pathName": "ReadyPush"
}
},
{ {
"type": "named", "type": "named",
"data": { "data": {
@@ -62,7 +56,25 @@
{ {
"type": "path", "type": "path",
"data": { "data": {
"pathName": "HubFarRight-NeutralZone" "pathName": "ReadyPush"
}
},
{
"type": "path",
"data": {
"pathName": "HubFarRight-NeutralZone 1-2"
}
},
{
"type": "named",
"data": {
"name": "Intake Retracted"
}
},
{
"type": "path",
"data": {
"pathName": "HubFarRight-NeutralZone 2-2"
} }
} }
] ]
@@ -0,0 +1,65 @@
{
"version": "2025.0",
"waypoints": [
{
"anchor": {
"x": 4.0,
"y": 7.4
},
"prevControl": null,
"nextControl": {
"x": 5.0954999999999995,
"y": 7.479440476190477
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 7.535761904761905,
"y": 7.54422619047619
},
"prevControl": {
"x": 7.654535714285714,
"y": 7.187904761904762
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [],
"pointTowardsZones": [
{
"fieldPosition": {
"x": 9.0,
"y": 7.5
},
"rotationOffset": 0.0,
"minWaypointRelativePos": 0.025631067961170227,
"maxWaypointRelativePos": 0.6920388349514595,
"name": "Point Towards Zone"
}
],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 600.0,
"maxAngularAcceleration": 750.0,
"nominalVoltage": 12.0,
"unlimited": false
},
"goalEndState": {
"velocity": 0,
"rotation": -90.0
},
"reversed": false,
"folder": null,
"idealStartingState": {
"velocity": 0,
"rotation": 0.0
},
"useDefaultConstraints": true
}
@@ -1,28 +1,12 @@
{ {
"version": "2025.0", "version": "2025.0",
"waypoints": [ "waypoints": [
{
"anchor": {
"x": 4.0,
"y": 7.4
},
"prevControl": null,
"nextControl": {
"x": 5.0954999999999995,
"y": 7.479440476190477
},
"isLocked": false,
"linkedName": null
},
{ {
"anchor": { "anchor": {
"x": 7.535761904761905, "x": 7.535761904761905,
"y": 7.54422619047619 "y": 7.54422619047619
}, },
"prevControl": { "prevControl": null,
"x": 7.654535714285714,
"y": 7.187904761904762
},
"nextControl": { "nextControl": {
"x": 7.374699934066787, "x": 7.374699934066787,
"y": 8.027412102561545 "y": 8.027412102561545
@@ -69,8 +53,8 @@
"y": 0.0 "y": 0.0
}, },
"rotationOffset": 0.0, "rotationOffset": 0.0,
"minWaypointRelativePos": 0.9056310679611663, "minWaypointRelativePos": 0.0,
"maxWaypointRelativePos": 1.9091262135922324, "maxWaypointRelativePos": 0.9091262135922324,
"name": "Point Towards Zone" "name": "Point Towards Zone"
}, },
{ {
@@ -79,18 +63,8 @@
"y": 0.5 "y": 0.5
}, },
"rotationOffset": 0.0, "rotationOffset": 0.0,
"minWaypointRelativePos": 1.9728155339805904, "minWaypointRelativePos": 0.9728155339805904,
"maxWaypointRelativePos": 2.55, "maxWaypointRelativePos": 1.5499999999999998,
"name": "Point Towards Zone"
},
{
"fieldPosition": {
"x": 9.0,
"y": 7.5
},
"rotationOffset": 0.0,
"minWaypointRelativePos": 0.025631067961170227,
"maxWaypointRelativePos": 0.6920388349514595,
"name": "Point Towards Zone" "name": "Point Towards Zone"
} }
], ],
@@ -111,7 +85,7 @@
"folder": null, "folder": null,
"idealStartingState": { "idealStartingState": {
"velocity": 0, "velocity": 0,
"rotation": 0.0 "rotation": -90.0
}, },
"useDefaultConstraints": true "useDefaultConstraints": true
} }
@@ -0,0 +1,65 @@
{
"version": "2025.0",
"waypoints": [
{
"anchor": {
"x": 4.0,
"y": 0.666
},
"prevControl": null,
"nextControl": {
"x": 5.052309523809524,
"y": 0.6013571428571436
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 7.663,
"y": 0.8712976190476196
},
"prevControl": {
"x": 7.713544609817508,
"y": 0.5725975891884018
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [],
"pointTowardsZones": [
{
"fieldPosition": {
"x": 9.0,
"y": 0.5
},
"rotationOffset": 0.0,
"minWaypointRelativePos": 0.025631067961170227,
"maxWaypointRelativePos": 0.6920388349514595,
"name": "Point Towards Zone"
}
],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 600.0,
"maxAngularAcceleration": 750.0,
"nominalVoltage": 10.0,
"unlimited": false
},
"goalEndState": {
"velocity": 0,
"rotation": 90.0
},
"reversed": false,
"folder": null,
"idealStartingState": {
"velocity": 0,
"rotation": 0.0
},
"useDefaultConstraints": true
}
@@ -1,28 +1,12 @@
{ {
"version": "2025.0", "version": "2025.0",
"waypoints": [ "waypoints": [
{
"anchor": {
"x": 4.0,
"y": 0.666
},
"prevControl": null,
"nextControl": {
"x": 5.052309523809524,
"y": 0.6013571428571436
},
"isLocked": false,
"linkedName": null
},
{ {
"anchor": { "anchor": {
"x": 7.663, "x": 7.663,
"y": 0.8712976190476196 "y": 0.8712976190476196
}, },
"prevControl": { "prevControl": null,
"x": 7.713544609817508,
"y": 0.5725975891884018
},
"nextControl": { "nextControl": {
"x": 7.578952380952382, "x": 7.578952380952382,
"y": 1.367988095238095 "y": 1.367988095238095
@@ -69,8 +53,8 @@
"y": 8.0 "y": 8.0
}, },
"rotationOffset": 0.0, "rotationOffset": 0.0,
"minWaypointRelativePos": 0.9056310679611663, "minWaypointRelativePos": 0.0,
"maxWaypointRelativePos": 1.9091262135922324, "maxWaypointRelativePos": 0.9091262135922324,
"name": "Point Towards Zone" "name": "Point Towards Zone"
}, },
{ {
@@ -79,18 +63,8 @@
"y": 7.4 "y": 7.4
}, },
"rotationOffset": 0.0, "rotationOffset": 0.0,
"minWaypointRelativePos": 1.9728155339805904, "minWaypointRelativePos": 0.9728155339805904,
"maxWaypointRelativePos": 2.55, "maxWaypointRelativePos": 1.5499999999999998,
"name": "Point Towards Zone"
},
{
"fieldPosition": {
"x": 9.0,
"y": 0.5
},
"rotationOffset": 0.0,
"minWaypointRelativePos": 0.025631067961170227,
"maxWaypointRelativePos": 0.6920388349514595,
"name": "Point Towards Zone" "name": "Point Towards Zone"
} }
], ],
@@ -111,7 +85,7 @@
"folder": null, "folder": null,
"idealStartingState": { "idealStartingState": {
"velocity": 0, "velocity": 0,
"rotation": 0.0 "rotation": 90.0
}, },
"useDefaultConstraints": true "useDefaultConstraints": true
} }
@@ -126,7 +126,7 @@ public class RobotContainer {
new InstantCommand(() -> m_robotIntake.setMode(IntakeMode.RollerStop), m_robotIntake) new InstantCommand(() -> m_robotIntake.setMode(IntakeMode.RollerStop), m_robotIntake)
); );
private Command RobotIntakeRetracted = new SequentialCommandGroup( private Command IntakeRetracted = new SequentialCommandGroup(
new InstantCommand(() -> m_robotIntake.setMode(IntakeMode.Retracted), m_robotIntake) new InstantCommand(() -> m_robotIntake.setMode(IntakeMode.Retracted), m_robotIntake)
); );
@@ -136,7 +136,7 @@ public class RobotContainer {
new WaitUntilCommand(m_robotShooter::isShooterUpToSpeed), new WaitUntilCommand(m_robotShooter::isShooterUpToSpeed),
new InstantCommand(()-> m_robotShooter.allowShooting(), m_robotShooter), new InstantCommand(()-> m_robotShooter.allowShooting(), m_robotShooter),
new WaitCommand(2), new WaitCommand(2),
RobotIntakeRetracted, IntakeRetracted,
new WaitCommand(5), new WaitCommand(5),
new InstantCommand(() -> m_robotShooter.denyShooting(), m_robotShooter), new InstantCommand(() -> m_robotShooter.denyShooting(), m_robotShooter),
new InstantCommand(()->m_robotShooter.spinUpIdle(), m_robotShooter) new InstantCommand(()->m_robotShooter.spinUpIdle(), m_robotShooter)
@@ -162,7 +162,7 @@ public class RobotContainer {
}, true); }, true);
NamedCommands.registerCommand("Robot Rev Up", RobotRev); NamedCommands.registerCommand("Robot Rev Up", RobotRev);
NamedCommands.registerCommand("Robot Intake Retracted", RobotIntakeRetracted); NamedCommands.registerCommand("Intake Retracted", IntakeRetracted);
NamedCommands.registerCommand("Robot Shoot", RobotShoot); NamedCommands.registerCommand("Robot Shoot", RobotShoot);
// NamedCommands.registerCommand("Lidar Intake", LidarIntake); // NamedCommands.registerCommand("Lidar Intake", LidarIntake);
NamedCommands.registerCommand("Intake Extended", IntakeExtended); NamedCommands.registerCommand("Intake Extended", IntakeExtended);