Skip to content

Commit c556cc9

Browse files
authored
Merge pull request #7 from FRC-7525/Drive
Drive
2 parents b79b4c0 + 37798bc commit c556cc9

21 files changed

+1226
-1
lines changed

src/main/deploy/example.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
Files placed in this directory will be deployed to the RoboRIO into the
22
'deploy' directory in the home folder. Use the 'Filesystem.getDeployDirectory' wpilib function
3-
to get a proper path relative to the deploy directory.
3+
to get a proper path relative to the deploy directory.
4+
5+
The values for drive configs are not accurate
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"angleJoystickRadiusDeadband": 0.5,
3+
"heading": {
4+
"p": 0.4,
5+
"i": 0,
6+
"d": 0.01
7+
}
8+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"location": {
3+
"front": -10.171,
4+
"left": 13.878
5+
},
6+
"absoluteEncoderOffset": 348.3,
7+
"drive": {
8+
"type": "sparkmax",
9+
"id": 2,
10+
"canbus": null
11+
},
12+
"angle": {
13+
"type": "sparkmax",
14+
"id": 10,
15+
"canbus": null
16+
},
17+
"encoder": {
18+
"type": "cancoder",
19+
"id": 9,
20+
"canbus": null
21+
},
22+
"inverted": {
23+
"drive": true,
24+
"angle": true
25+
},
26+
"absoluteEncoderInverted": false
27+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"location": {
3+
"front": -10.171,
4+
"left": -13.878
5+
},
6+
"absoluteEncoderOffset": 168.1,
7+
"drive": {
8+
"type": "sparkmax",
9+
"id": 35,
10+
"canbus": null
11+
},
12+
"angle": {
13+
"type": "sparkmax",
14+
"id": 1,
15+
"canbus": null
16+
},
17+
"encoder": {
18+
"type": "cancoder",
19+
"id": 12,
20+
"canbus": null
21+
},
22+
"inverted": {
23+
"drive": true,
24+
"angle": true
25+
},
26+
"absoluteEncoderInverted": false
27+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"location": {
3+
"front": 10.171,
4+
"left": 13.878
5+
},
6+
"absoluteEncoderOffset": 49.5,
7+
"drive": {
8+
"type": "sparkmax",
9+
"id": 7,
10+
"canbus": null
11+
},
12+
"angle": {
13+
"type": "sparkmax",
14+
"id": 33,
15+
"canbus": null
16+
},
17+
"encoder": {
18+
"type": "cancoder",
19+
"id": 6,
20+
"canbus": null
21+
},
22+
"inverted": {
23+
"drive": true,
24+
"angle": true
25+
},
26+
"absoluteEncoderInverted": false
27+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"location": {
3+
"front": 10.171,
4+
"left": -13.878
5+
},
6+
"absoluteEncoderOffset": 42.5,
7+
"drive": {
8+
"type": "sparkmax",
9+
"id": 11,
10+
"canbus": null
11+
},
12+
"angle": {
13+
"type": "sparkmax",
14+
"id": 8,
15+
"canbus": null
16+
},
17+
"encoder": {
18+
"type": "cancoder",
19+
"id": 3,
20+
"canbus": null
21+
},
22+
"inverted": {
23+
"drive": true,
24+
"angle": true
25+
},
26+
"absoluteEncoderInverted": false
27+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"optimalVoltage": 12,
3+
"robotMass": 79,
4+
"wheelGripCoefficientOfFriction": 1.542,
5+
"currentLimit": {
6+
"drive": 40,
7+
"angle": 20
8+
},
9+
"conversionFactors": {
10+
"angle": {
11+
"gearRatio": 21.4286,
12+
"factor": 0
13+
},
14+
"drive": {
15+
"diameter": 3.5,
16+
"gearRatio": 6.75,
17+
"factor": 0
18+
}
19+
},
20+
"rampRate": {
21+
"drive": 0.12,
22+
"angle": 0.05
23+
}
24+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"drive": {
3+
"p": 0,
4+
"i": 0,
5+
"d": 0,
6+
"f": 0,
7+
"iz": 0
8+
},
9+
"angle": {
10+
"p": 0.01,
11+
"i": 0,
12+
"d": 0.02,
13+
"f": 0,
14+
"iz": 0
15+
}
16+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"imu": {
3+
"type": "navx_usb",
4+
"id": 0,
5+
"canbus": null
6+
},
7+
"invertedIMU": false,
8+
"modules": [
9+
"frontright.json",
10+
"frontleft.json",
11+
"backright.json",
12+
"backleft.json"
13+
]
14+
}

src/main/java/frc/robot/GlobalConstants.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package frc.robot;
22

33
import edu.wpi.first.wpilibj.RobotBase;
4+
import edu.wpi.first.wpilibj.XboxController;
45

56
public class GlobalConstants {
67

@@ -13,4 +14,9 @@ public enum RobotMode {
1314
public static final RobotMode ROBOT_MODE = RobotBase.isReal() ? RobotMode.REAL : RobotMode.SIM; // Change this to TESTING for testing purposes
1415

1516
public static final double SIMULATION_PERIOD = 0.02;
17+
18+
public static class Controllers {
19+
20+
public static final XboxController DRIVER_CONTROLLER = new XboxController(0);
21+
}
1622
}

0 commit comments

Comments
 (0)