two peice auto right

This commit is contained in:
Tylr-J42 2025-03-21 00:25:18 -04:00
parent 3e6fa986e7
commit 17143ffffb
5 changed files with 128 additions and 36 deletions

View File

@ -0,0 +1,49 @@
{
"version": "2025.0",
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "Right Start to E"
}
},
{
"type": "named",
"data": {
"name": "Shoot Coral L4"
}
},
{
"type": "named",
"data": {
"name": "HP Pickup"
}
},
{
"type": "path",
"data": {
"pathName": "E to HP"
}
},
{
"type": "named",
"data": {
"name": "Collect Coral"
}
},
{
"type": "path",
"data": {
"pathName": "HP to D"
}
}
]
}
},
"resetOdom": true,
"folder": null,
"choreoAuto": false
}

View File

@ -3,35 +3,54 @@
"waypoints": [ "waypoints": [
{ {
"anchor": { "anchor": {
"x": 5.289041095890411, "x": 4.958476027397261,
"y": 2.9732020547945206 "y": 2.837970890410959
}, },
"prevControl": null, "prevControl": null,
"nextControl": { "nextControl": {
"x": 5.950171232876712, "x": 5.619606164383562,
"y": 1.6208904109589037 "y": 1.455607876712329
}, },
"isLocked": false, "isLocked": false,
"linkedName": null "linkedName": "E"
}, },
{ {
"anchor": { "anchor": {
"x": 1.4424657534246574, "x": 1.1569777397260272,
"y": 0.7944777397260271 "y": 1.0198630136986298
}, },
"prevControl": { "prevControl": {
"x": 2.389083904109589, "x": 2.7647260273972605,
"y": 2.5374571917808213 "y": 1.485659246575342
}, },
"nextControl": null, "nextControl": null,
"isLocked": false, "isLocked": false,
"linkedName": null "linkedName": "Right HP"
} }
], ],
"rotationTargets": [], "rotationTargets": [],
"constraintZones": [], "constraintZones": [],
"pointTowardsZones": [], "pointTowardsZones": [],
"eventMarkers": [], "eventMarkers": [
{
"name": "HP Pickup",
"waypointRelativePos": 0.22857142857142831,
"endWaypointRelativePos": null,
"command": {
"type": "parallel",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "HP Pickup"
}
}
]
}
}
}
],
"globalConstraints": { "globalConstraints": {
"maxVelocity": 4.0, "maxVelocity": 4.0,
"maxAcceleration": 2.5, "maxAcceleration": 2.5,
@ -48,7 +67,7 @@
"folder": null, "folder": null,
"idealStartingState": { "idealStartingState": {
"velocity": 0, "velocity": 0,
"rotation": 120.96375653207336 "rotation": 120.25643716352937
}, },
"useDefaultConstraints": true "useDefaultConstraints": true
} }

View File

@ -3,25 +3,25 @@
"waypoints": [ "waypoints": [
{ {
"anchor": { "anchor": {
"x": 2.5773565573770494, "x": 1.187029109589041,
"y": 6.506454918032786 "y": 0.9747859589041092
}, },
"prevControl": null, "prevControl": null,
"nextControl": { "nextControl": {
"x": 3.5773565573770494, "x": 2.268878424657535,
"y": 6.506454918032786 "y": 1.0949914383561645
}, },
"isLocked": false, "isLocked": false,
"linkedName": null "linkedName": null
}, },
{ {
"anchor": { "anchor": {
"x": 7.060758196721312, "x": 4.011857876712329,
"y": 6.506454918032786 "y": 2.837970890410959
}, },
"prevControl": { "prevControl": {
"x": 6.060758196721312, "x": 3.3657534246575342,
"y": 6.506454918032786 "y": 1.9364297945205475
}, },
"nextControl": null, "nextControl": null,
"isLocked": false, "isLocked": false,
@ -34,9 +34,21 @@
"eventMarkers": [ "eventMarkers": [
{ {
"name": "Lift L4", "name": "Lift L4",
"waypointRelativePos": 0.351851851851855, "waypointRelativePos": 0.27142857142857096,
"endWaypointRelativePos": null, "endWaypointRelativePos": null,
"command": null "command": {
"type": "parallel",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "Lift L4"
}
}
]
}
}
} }
], ],
"globalConstraints": { "globalConstraints": {
@ -49,13 +61,13 @@
}, },
"goalEndState": { "goalEndState": {
"velocity": 0, "velocity": 0,
"rotation": 90.0 "rotation": 58.57043438516136
}, },
"reversed": false, "reversed": false,
"folder": null, "folder": null,
"idealStartingState": { "idealStartingState": {
"velocity": 0, "velocity": 0,
"rotation": -90.0 "rotation": 54.24611274556325
}, },
"useDefaultConstraints": true "useDefaultConstraints": true
} }

View File

@ -3,29 +3,29 @@
"waypoints": [ "waypoints": [
{ {
"anchor": { "anchor": {
"x": 7.602996575342465, "x": 7.572945205479453,
"y": 2.0115582191780823 "y": 0.4939640410958907
}, },
"prevControl": null, "prevControl": null,
"nextControl": { "nextControl": {
"x": 6.491095890410959, "x": 6.461044520547946,
"y": 1.9965325342465756 "y": 0.478938356164384
}, },
"isLocked": false, "isLocked": false,
"linkedName": null "linkedName": null
}, },
{ {
"anchor": { "anchor": {
"x": 5.289041095890411, "x": 4.958476027397261,
"y": 2.9882277397260277 "y": 2.837970890410959
}, },
"prevControl": { "prevControl": {
"x": 6.130479452054795, "x": 5.799914383561644,
"y": 2.11673801369863 "y": 1.9664811643835614
}, },
"nextControl": null, "nextControl": null,
"isLocked": false, "isLocked": false,
"linkedName": null "linkedName": "E"
} }
], ],
"rotationTargets": [], "rotationTargets": [],
@ -34,9 +34,21 @@
"eventMarkers": [ "eventMarkers": [
{ {
"name": "Lift L4", "name": "Lift L4",
"waypointRelativePos": 0.7142857142857124, "waypointRelativePos": 0.4261904761904757,
"endWaypointRelativePos": null, "endWaypointRelativePos": null,
"command": null "command": {
"type": "parallel",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "Lift L4"
}
}
]
}
}
} }
], ],
"globalConstraints": { "globalConstraints": {

View File

@ -237,7 +237,7 @@ public class RobotContainer {
new EventTrigger("HP Pickup").onTrue(safeMoveManipulator(ElevatorConstants.kL4Position, ManipulatorPivotConstants.kL4Position)); new EventTrigger("HP Pickup").onTrue(safeMoveManipulator(ElevatorConstants.kL4Position, ManipulatorPivotConstants.kL4Position));
NamedCommands.registerCommand("Drivetrain Set X", drivetrain.setXCommand()); NamedCommands.registerCommand("Drivetrain Set X", drivetrain.setXCommand());
NamedCommands.registerCommand("Shoot Coral L4", Commands.race(manipulator.runManipulator(() -> 0.4, true).withTimeout(3).andThen(manipulator.runUntilCollected(() -> 0.0).withTimeout(0.1)), Commands.parallel(elevator.maintainPosition(), manipulatorPivot.maintainPosition()))); NamedCommands.registerCommand("Shoot Coral L4", Commands.race(manipulator.runManipulator(() -> 0.4, true).withTimeout(1).andThen(manipulator.runUntilCollected(() -> 0.0).withTimeout(0.1)), Commands.parallel(elevator.maintainPosition(), manipulatorPivot.maintainPosition())));
NamedCommands.registerCommand("Collect Coral", manipulator.runUntilCollected(() -> 0.30).andThen(manipulator.runUntilCollected(() -> 0)).withTimeout(0.5)); NamedCommands.registerCommand("Collect Coral", manipulator.runUntilCollected(() -> 0.30).andThen(manipulator.runUntilCollected(() -> 0)).withTimeout(0.5));
NamedCommands.registerCommand("Lift L4", safeMoveManipulator(ElevatorConstants.kL4Position, ManipulatorPivotConstants.kL4Position)); NamedCommands.registerCommand("Lift L4", safeMoveManipulator(ElevatorConstants.kL4Position, ManipulatorPivotConstants.kL4Position));
NamedCommands.registerCommand("HP Pickup", safeMoveManipulator(ElevatorConstants.kCoralIntakePosition, ManipulatorPivotConstants.kStartingPosition)); NamedCommands.registerCommand("HP Pickup", safeMoveManipulator(ElevatorConstants.kCoralIntakePosition, ManipulatorPivotConstants.kStartingPosition));