mirror of
https://github.com/Team4388/2025RidgeScape.git
synced 2026-06-09 00:38:02 -06:00
test path planner
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"version": "2025.0",
|
||||||
|
"command": {
|
||||||
|
"type": "sequential",
|
||||||
|
"data": {
|
||||||
|
"commands": [
|
||||||
|
{
|
||||||
|
"type": "path",
|
||||||
|
"data": {
|
||||||
|
"pathName": "Example Path"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"resetOdom": true,
|
||||||
|
"folder": null,
|
||||||
|
"choreoAuto": false
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
"version": "2025.0",
|
||||||
|
"waypoints": [
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 0.0,
|
||||||
|
"y": 0.0
|
||||||
|
},
|
||||||
|
"prevControl": null,
|
||||||
|
"nextControl": {
|
||||||
|
"x": 0.25,
|
||||||
|
"y": 0.0
|
||||||
|
},
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 2.0,
|
||||||
|
"y": 0.0
|
||||||
|
},
|
||||||
|
"prevControl": {
|
||||||
|
"x": 1.75,
|
||||||
|
"y": 0.0
|
||||||
|
},
|
||||||
|
"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
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"robotWidth": 0.9,
|
||||||
|
"robotLength": 0.9,
|
||||||
|
"holonomicMode": true,
|
||||||
|
"pathFolders": [],
|
||||||
|
"autoFolders": [],
|
||||||
|
"defaultMaxVel": 3.0,
|
||||||
|
"defaultMaxAccel": 3.0,
|
||||||
|
"defaultMaxAngVel": 540.0,
|
||||||
|
"defaultMaxAngAccel": 720.0,
|
||||||
|
"defaultNominalVoltage": 12.0,
|
||||||
|
"robotMass": 22.6796,
|
||||||
|
"robotMOI": 6.883,
|
||||||
|
"robotTrackwidth": 0.546,
|
||||||
|
"driveWheelRadius": 0.048,
|
||||||
|
"driveGearing": 5.143,
|
||||||
|
"maxDriveSpeed": 5.45,
|
||||||
|
"driveMotorType": "krakenX60",
|
||||||
|
"driveCurrentLimit": 60.0,
|
||||||
|
"wheelCOF": 1.2,
|
||||||
|
"flModuleX": 0.273,
|
||||||
|
"flModuleY": 0.273,
|
||||||
|
"frModuleX": 0.273,
|
||||||
|
"frModuleY": -0.273,
|
||||||
|
"blModuleX": -0.273,
|
||||||
|
"blModuleY": 0.273,
|
||||||
|
"brModuleX": -0.273,
|
||||||
|
"brModuleY": -0.273,
|
||||||
|
"bumperOffsetX": 0.0,
|
||||||
|
"bumperOffsetY": 0.0,
|
||||||
|
"robotFeatures": []
|
||||||
|
}
|
||||||
@@ -225,16 +225,16 @@ public class RobotContainer {
|
|||||||
public Command getAutonomousCommand() {
|
public Command getAutonomousCommand() {
|
||||||
//return autoPlayback;
|
//return autoPlayback;
|
||||||
//return new GotoPositionCommand(m_robotSwerveDrive, m_vision);
|
//return new GotoPositionCommand(m_robotSwerveDrive, m_vision);
|
||||||
//try{
|
try{
|
||||||
// // Load the path you want to follow using its name in the GUI
|
// Load the path you want to follow using its name in the GUI
|
||||||
// return new PathPlannerAuto("Example Auto");
|
return new PathPlannerAuto("New Auto");
|
||||||
//} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// DriverStation.reportError("Big oops: " + e.getMessage(), e.getStackTrace());
|
DriverStation.reportError("Big oops: " + e.getMessage(), e.getStackTrace());
|
||||||
// return Commands.none();
|
return Commands.none();
|
||||||
//}
|
}
|
||||||
// zach told me to do the below comment
|
// zach told me to do the below comment
|
||||||
//return new GotoPositionCommand(m_robotSwerveDrive, m_vision);
|
//return new GotoPositionCommand(m_robotSwerveDrive, m_vision);
|
||||||
return new GotoPositionCommand(m_robotSwerveDrive, m_vision, AutoConstants.targetpos);
|
// return new GotoPositionCommand(m_robotSwerveDrive, m_vision, AutoConstants.targetpos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class SwerveDrive extends Subsystem {
|
|||||||
config = null;
|
config = null;
|
||||||
}
|
}
|
||||||
AutoBuilder.configure(
|
AutoBuilder.configure(
|
||||||
() -> swerveDriveTrain.samplePoseAt(Utils.getCurrentTimeSeconds()).orElse(null), // Robot pose supplier
|
() -> swerveDriveTrain.samplePoseAt(Utils.getCurrentTimeSeconds()).orElse(new Pose2d()), // Robot pose supplier
|
||||||
swerveDriveTrain::resetPose, // Method to reset odometry (will be called if your auto has a starting pose)
|
swerveDriveTrain::resetPose, // Method to reset odometry (will be called if your auto has a starting pose)
|
||||||
() -> swerveDriveTrain.getState().Speeds, // ChassisSpeeds supplier. MUST BE ROBOT RELATIVE
|
() -> swerveDriveTrain.getState().Speeds, // ChassisSpeeds supplier. MUST BE ROBOT RELATIVE
|
||||||
(speeds, feedforwards) -> swerveDriveTrain.setControl(new SwerveRequest.ApplyRobotSpeeds()
|
(speeds, feedforwards) -> swerveDriveTrain.setControl(new SwerveRequest.ApplyRobotSpeeds()
|
||||||
@@ -222,7 +222,7 @@ public class SwerveDrive extends Subsystem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void stopModules() {
|
public void stopModules() {
|
||||||
// swerveDriveTrain.setControl(new SwerveRequest.SwerveDriveBrake());
|
swerveDriveTrain.setControl(new SwerveRequest.SwerveDriveBrake());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user