-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
477 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
{ | ||
"Keyboard 0 Settings": { | ||
"window": { | ||
"visible": true | ||
} | ||
}, | ||
"System Joysticks": { | ||
"window": { | ||
"visible": false | ||
|
170 changes: 170 additions & 0 deletions
170
src/main/deploy/pathplanner/paths/4AndPickupNoteAuto.path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
{ | ||
"version": 1.0, | ||
"waypoints": [ | ||
{ | ||
"anchor": { | ||
"x": 0.741887381054855, | ||
"y": 6.695925443427855 | ||
}, | ||
"prevControl": null, | ||
"nextControl": { | ||
"x": 1.3249004714516954, | ||
"y": 6.550174838486252 | ||
}, | ||
"isLocked": false, | ||
"linkedName": null | ||
}, | ||
{ | ||
"anchor": { | ||
"x": 2.511115021072635, | ||
"y": 6.9832349513151 | ||
}, | ||
"prevControl": { | ||
"x": 2.212410438221992, | ||
"y": 6.990643205161632 | ||
}, | ||
"nextControl": { | ||
"x": 2.824296168340601, | ||
"y": 6.975467660245216 | ||
}, | ||
"isLocked": false, | ||
"linkedName": null | ||
}, | ||
{ | ||
"anchor": { | ||
"x": 1.5082724716954066, | ||
"y": 5.488743105018038 | ||
}, | ||
"prevControl": { | ||
"x": 2.125198127424631, | ||
"y": 5.366730902594161 | ||
}, | ||
"nextControl": { | ||
"x": 1.4444384407793702, | ||
"y": 5.501367852634432 | ||
}, | ||
"isLocked": false, | ||
"linkedName": null | ||
}, | ||
{ | ||
"anchor": { | ||
"x": 2.388440350339902, | ||
"y": 5.488743105018038 | ||
}, | ||
"prevControl": { | ||
"x": 1.6754803456796465, | ||
"y": 5.471219489931063 | ||
}, | ||
"nextControl": { | ||
"x": 2.7106112717723123, | ||
"y": 5.496661640675712 | ||
}, | ||
"isLocked": false, | ||
"linkedName": null | ||
}, | ||
{ | ||
"anchor": { | ||
"x": 1.5082724716954066, | ||
"y": 5.488743105018038 | ||
}, | ||
"prevControl": { | ||
"x": 2.7225892863967442, | ||
"y": 5.521583593948438 | ||
}, | ||
"nextControl": { | ||
"x": 1.4220056676836053, | ||
"y": 5.486410069694874 | ||
}, | ||
"isLocked": false, | ||
"linkedName": null | ||
}, | ||
{ | ||
"anchor": { | ||
"x": 7.786221898253982, | ||
"y": 7.42479630901102 | ||
}, | ||
"prevControl": { | ||
"x": 7.15588177827108, | ||
"y": 7.266533230042734 | ||
}, | ||
"nextControl": { | ||
"x": 8.416562018236883, | ||
"y": 7.583059387979306 | ||
}, | ||
"isLocked": false, | ||
"linkedName": null | ||
}, | ||
{ | ||
"anchor": { | ||
"x": 1.5082724716954066, | ||
"y": 5.488743105018038 | ||
}, | ||
"prevControl": { | ||
"x": 2.672514522173267, | ||
"y": 5.695384322269494 | ||
}, | ||
"nextControl": { | ||
"x": 1.3904431950573972, | ||
"y": 5.467829597262204 | ||
}, | ||
"isLocked": false, | ||
"linkedName": null | ||
}, | ||
{ | ||
"anchor": { | ||
"x": 7.786221898253982, | ||
"y": 5.7846202012571855 | ||
}, | ||
"prevControl": { | ||
"x": 6.538274967970654, | ||
"y": 7.594698262132346 | ||
}, | ||
"nextControl": { | ||
"x": 9.03416882853731, | ||
"y": 3.9745421403820247 | ||
}, | ||
"isLocked": false, | ||
"linkedName": null | ||
}, | ||
{ | ||
"anchor": { | ||
"x": 4.834244879861288, | ||
"y": 4.06537564992086 | ||
}, | ||
"prevControl": { | ||
"x": 6.9342068541992985, | ||
"y": 4.043525214419497 | ||
}, | ||
"nextControl": null, | ||
"isLocked": false, | ||
"linkedName": null | ||
} | ||
], | ||
"rotationTargets": [ | ||
{ | ||
"waypointRelativePos": 1, | ||
"rotationDegrees": 180.0, | ||
"rotateFast": false | ||
} | ||
], | ||
"constraintZones": [], | ||
"eventMarkers": [], | ||
"globalConstraints": { | ||
"maxVelocity": 3.0, | ||
"maxAcceleration": 3.0, | ||
"maxAngularVelocity": 270.0, | ||
"maxAngularAcceleration": 600.0 | ||
}, | ||
"goalEndState": { | ||
"velocity": 0, | ||
"rotation": 180.0, | ||
"rotateFast": false | ||
}, | ||
"reversed": false, | ||
"folder": null, | ||
"previewStartingState": { | ||
"rotation": 60.0, | ||
"velocity": 0 | ||
}, | ||
"useDefaultConstraints": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
src/main/kotlin/com/team4099/robot2023/auto/mode/FiveNoteCenterlineAutoPath.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
package com.team4099.robot2023.auto.mode | ||
|
||
import com.team4099.lib.trajectory.FieldWaypoint | ||
import com.team4099.robot2023.commands.drivetrain.DrivePathCommand | ||
import com.team4099.robot2023.commands.drivetrain.ResetPoseCommand | ||
import com.team4099.robot2023.subsystems.drivetrain.drive.Drivetrain | ||
import edu.wpi.first.wpilibj2.command.Command | ||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup | ||
import org.team4099.lib.geometry.Pose2d | ||
import org.team4099.lib.geometry.Translation2d | ||
import org.team4099.lib.units.base.meters | ||
import org.team4099.lib.units.derived.degrees | ||
import org.team4099.lib.units.derived.inRotation2ds | ||
|
||
class FiveNoteCenterlineAutoPath(val drivetrain: Drivetrain): SequentialCommandGroup() { | ||
init { | ||
addRequirements(drivetrain) | ||
|
||
addCommands( | ||
ResetPoseCommand(drivetrain, Pose2d(Translation2d(1.51.meters, 5.49.meters), 180.degrees)), | ||
DrivePathCommand.createPathInFieldFrame( | ||
drivetrain, | ||
{ | ||
listOf( | ||
FieldWaypoint( | ||
Translation2d(1.51.meters, 5.49.meters).translation2d, | ||
null, | ||
180.degrees.inRotation2ds | ||
), // Subwoofer | ||
FieldWaypoint( | ||
Translation2d(2.39.meters, 5.49.meters).translation2d, | ||
null, | ||
180.degrees.inRotation2ds | ||
), // Middle wing note | ||
FieldWaypoint( | ||
Translation2d(2.51.meters, 6.98.meters).translation2d, | ||
null, | ||
235.degrees.inRotation2ds | ||
), // Leftmost wing note | ||
FieldWaypoint( | ||
Translation2d(3.meters, 6.98.meters).translation2d, | ||
null, | ||
180.degrees.inRotation2ds | ||
), // Right in front of the leftmost wing note | ||
FieldWaypoint( | ||
Translation2d(7.79.meters, 7.42.meters).translation2d, | ||
null, | ||
180.degrees.inRotation2ds | ||
), // Leftmost center line note | ||
FieldWaypoint( | ||
Translation2d(2.39.meters, 5.49.meters).translation2d, | ||
null, | ||
180.degrees.inRotation2ds | ||
), // Subwoofer | ||
FieldWaypoint( | ||
Translation2d(5.82.meters, 6.5.meters).translation2d, | ||
null, | ||
180.degrees.inRotation2ds | ||
), // In order to avoid stage | ||
FieldWaypoint( | ||
Translation2d(7.79.meters, 5.78.meters).translation2d, | ||
null, | ||
180.degrees.inRotation2ds | ||
), // Second leftmost wing note | ||
FieldWaypoint( | ||
Translation2d(5.82.meters, 6.5.meters).translation2d, | ||
null, | ||
180.degrees.inRotation2ds | ||
), // In order to avoid stage | ||
FieldWaypoint( | ||
Translation2d(2.39.meters, 5.49.meters).translation2d, | ||
null, | ||
180.degrees.inRotation2ds | ||
), // Subwoofer | ||
) | ||
}, | ||
resetPose = true | ||
) | ||
) | ||
} | ||
} |
Oops, something went wrong.