Skip to content

Commit

Permalink
test auto and removed voltagecompensation
Browse files Browse the repository at this point in the history
  • Loading branch information
JadedHearth committed Feb 26, 2024
1 parent 0d7a77a commit f098d73
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 14 deletions.
8 changes: 5 additions & 3 deletions .pathplanner/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@
"robotLength": 0.826,
"holonomicMode": true,
"pathFolders": [
"SpinShoot",
"TestPaths",
"Plans",
"PointPaths",
"SpinShoot",
"StartPaths"
],
"autoFolders": [
"Blue"
"Blue",
"TestAutos"
],
"defaultMaxVel": 3.0,
"defaultMaxAccel": 3.0,
"defaultMaxAngVel": 540.0,
"defaultMaxAngAccel": 720.0,
"maxModuleSpeed": 4.5
}
}
25 changes: 25 additions & 0 deletions src/main/deploy/pathplanner/autos/SimpleStraight.auto
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"version": 1.0,
"startingPose": {
"position": {
"x": 2.0,
"y": 7.0
},
"rotation": 0
},
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "1Meter"
}
}
]
}
},
"folder": "TestAutos",
"choreoAuto": false
}
52 changes: 52 additions & 0 deletions src/main/deploy/pathplanner/paths/1Meter.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"version": 1.0,
"waypoints": [
{
"anchor": {
"x": 2.0,
"y": 7.0
},
"prevControl": null,
"nextControl": {
"x": 3.0,
"y": 7.0
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 3.0,
"y": 7.0
},
"prevControl": {
"x": 2.0,
"y": 7.0
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
"goalEndState": {
"velocity": 0,
"rotation": 0,
"rotateFast": false
},
"reversed": false,
"folder": "TestPaths",
"previewStartingState": {
"rotation": 0,
"velocity": 0
},
"useDefaultConstraints": true
}
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public RobotContainer() {
SendableChooser<Command> chooser = new SendableChooser<>();
// ! Add new autos here. The autogenerated one is bad because it includes all of the ones in
// the chache of the RoboRIO.
String[] autoNames = new String[] {"BlueLClose3" /*, "BlueLMid3", "BlueLClose3Far1"*/};
String[] autoNames = new String[] {"BlueLClose3", "SimpleStraight" /*, "BlueLMid3", "BlueLClose3Far1"*/};

chooser.setDefaultOption("None", Commands.none());
List<PathPlannerAuto> options = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ public ArmElevatorIOSparkMax() {

motor.setInverted(true);

// motor.enableVoltageCompensation(12.0);

motor.setSmartCurrentLimit(ArmElevatorConstants.kCurrentLimit);

// pid.setOutputRange(0, ArmElevatorConstants.maxExtension);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ public ClimberIOSparkMax() {

leftMotor.setInverted(true);

leftMotor.enableVoltageCompensation(12.0);
rightMotor.enableVoltageCompensation(12.0);

leftMotor.setSmartCurrentLimit(ClimberConstants.kCurrentLimit);
rightMotor.setSmartCurrentLimit(ClimberConstants.kCurrentLimit);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ public IntakeIOSparkMax() {

intakeMotor.setInverted(false);

intakeMotor.enableVoltageCompensation(12.0);
intakeMotor.setSmartCurrentLimit(30);
followerIntakeMotor.enableVoltageCompensation(12.0);
followerIntakeMotor.setSmartCurrentLimit(30);

followerIntakeMotor.follow(intakeMotor, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ public SticksIOSparkMax() {

// encoder.setPosition(SticksConstants.initialAngle);

// motor.enableVoltageCompensation(12.0);

motor.setSmartCurrentLimit(SticksConstants.kCurrentLimit);

// motor.burnFlash();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public WristIOSparkMax() {

// encoder.setPosition(WristConstants.initialAngle);

// motor.enableVoltageCompensation(12.0);

motor.setSmartCurrentLimit(WristConstants.kCurrentLimit);

Expand Down

0 comments on commit f098d73

Please sign in to comment.