Skip to content

Commit 9b76916

Browse files
more auto testing
1 parent fcf421c commit 9b76916

8 files changed

Lines changed: 139 additions & 18 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"version": "2025.0",
3+
"command": {
4+
"type": "sequential",
5+
"data": {
6+
"commands": [
7+
{
8+
"type": "parallel",
9+
"data": {
10+
"commands": [
11+
{
12+
"type": "named",
13+
"data": {
14+
"name": "HalfRaise"
15+
}
16+
},
17+
{
18+
"type": "path",
19+
"data": {
20+
"pathName": "shortZayan"
21+
}
22+
}
23+
]
24+
}
25+
}
26+
]
27+
}
28+
},
29+
"resetOdom": false,
30+
"folder": null,
31+
"choreoAuto": false
32+
}

src/main/deploy/pathplanner/autos/TEst Auto.auto

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,60 @@
44
"type": "sequential",
55
"data": {
66
"commands": [
7+
{
8+
"type": "parallel",
9+
"data": {
10+
"commands": [
11+
{
12+
"type": "path",
13+
"data": {
14+
"pathName": "NSource_3L4 Max V"
15+
}
16+
},
17+
{
18+
"type": "named",
19+
"data": {
20+
"name": "HalfRaise"
21+
}
22+
}
23+
]
24+
}
25+
},
26+
{
27+
"type": "named",
28+
"data": {
29+
"name": "AutoLeft"
30+
}
31+
},
732
{
833
"type": "named",
934
"data": {
10-
"name": "HalfRaise"
35+
"name": "AutoL4"
36+
}
37+
},
38+
{
39+
"type": "parallel",
40+
"data": {
41+
"commands": [
42+
{
43+
"type": "named",
44+
"data": {
45+
"name": "AutoSource"
46+
}
47+
},
48+
{
49+
"type": "named",
50+
"data": {
51+
"name": "Rest"
52+
}
53+
}
54+
]
1155
}
1256
}
1357
]
1458
}
1559
},
16-
"resetOdom": true,
60+
"resetOdom": false,
1761
"folder": null,
1862
"choreoAuto": false
1963
}

src/main/deploy/pathplanner/paths/3L4_NSource.path

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"y": 6.9961925864377
2121
},
2222
"prevControl": {
23-
"x": 2.596411960407839,
23+
"x": 2.5964119604078384,
2424
"y": 6.1812288963188555
2525
},
2626
"nextControl": null,

src/main/deploy/pathplanner/paths/NSource_3L4 Max V.path

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"prevControl": null,
1010
"nextControl": {
11-
"x": 1.7001755231350861,
11+
"x": 1.7001755231350864,
1212
"y": 6.692872886068093
1313
},
1414
"isLocked": false,
@@ -31,14 +31,7 @@
3131
"rotationTargets": [],
3232
"constraintZones": [],
3333
"pointTowardsZones": [],
34-
"eventMarkers": [
35-
{
36-
"name": "HalfRaise",
37-
"waypointRelativePos": 0.0,
38-
"endWaypointRelativePos": null,
39-
"command": null
40-
}
41-
],
34+
"eventMarkers": [],
4235
"globalConstraints": {
4336
"maxVelocity": 3.5,
4437
"maxAcceleration": 3.5,

src/main/deploy/pathplanner/paths/NSource_4L4 Max V.path

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"prevControl": null,
1010
"nextControl": {
11-
"x": 2.1459258827873184,
11+
"x": 2.145925882787318,
1212
"y": 6.775326847782206
1313
},
1414
"isLocked": false,
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"version": "2025.0",
3+
"waypoints": [
4+
{
5+
"anchor": {
6+
"x": 1.2780967178611593,
7+
"y": 6.9961925864377
8+
},
9+
"prevControl": null,
10+
"nextControl": {
11+
"x": 1.4662764096942653,
12+
"y": 6.83160703548745
13+
},
14+
"isLocked": false,
15+
"linkedName": "NSourceCenter"
16+
},
17+
{
18+
"anchor": {
19+
"x": 1.5057102272727272,
20+
"y": 6.762201704545455
21+
},
22+
"prevControl": {
23+
"x": 1.3057102272727306,
24+
"y": 6.91220170454546
25+
},
26+
"nextControl": null,
27+
"isLocked": false,
28+
"linkedName": null
29+
}
30+
],
31+
"rotationTargets": [],
32+
"constraintZones": [],
33+
"pointTowardsZones": [],
34+
"eventMarkers": [],
35+
"globalConstraints": {
36+
"maxVelocity": 3.5,
37+
"maxAcceleration": 3.5,
38+
"maxAngularVelocity": 540.0,
39+
"maxAngularAcceleration": 720.0,
40+
"nominalVoltage": 12.0,
41+
"unlimited": false
42+
},
43+
"goalEndState": {
44+
"velocity": 0,
45+
"rotation": -48.81407483429033
46+
},
47+
"reversed": false,
48+
"folder": "North",
49+
"idealStartingState": {
50+
"velocity": 0,
51+
"rotation": -54.69266815216971
52+
},
53+
"useDefaultConstraints": true
54+
}

src/main/java/frc/robot/commands/HalfRaise.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class HalfRaise extends Command {
1111
public HalfRaise(Elevator elevator, MailBox mailbox) {
1212
this.elevator = elevator;
1313
this.mailbox = mailbox;
14-
addRequirements(elevator, mailbox);
14+
addRequirements(elevator);
1515
}
1616

1717
// Called when the command is initially scheduled.
@@ -23,7 +23,7 @@ public void initialize() {}
2323
public void execute() {
2424
boolean hasCoral = mailbox.somethingInIntake();
2525
if (hasCoral) {
26-
elevator.setElevatorPosition(elevator.L4_inMotorRotations / 2, 120, 75, 0);
26+
elevator.setElevatorPosition(elevator.L4_inMotorRotations / 2, 150, 100, 0);
2727
}
2828
}
2929

src/main/java/frc/robot/subsystems/elevator/Elevator.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,15 @@
44

55
package frc.robot.subsystems.elevator;
66

7-
import java.util.function.BooleanSupplier;
8-
97
import com.ctre.phoenix6.controls.DynamicMotionMagicVoltage;
108
import com.ctre.phoenix6.controls.Follower;
119
import com.ctre.phoenix6.hardware.CANdi;
1210
import com.ctre.phoenix6.hardware.TalonFX;
13-
1411
import edu.wpi.first.wpilibj2.command.Command;
1512
import edu.wpi.first.wpilibj2.command.RunCommand;
1613
import edu.wpi.first.wpilibj2.command.SubsystemBase;
1714
import frc.robot.Constants;
15+
import java.util.function.BooleanSupplier;
1816

1917
public class Elevator extends SubsystemBase {
2018
private final CANdi myCANdi;

0 commit comments

Comments
 (0)