-
Notifications
You must be signed in to change notification settings - Fork 0
Added new constants and separated JSON files between the pushbot and the real robot. #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
b5842e2
0383cd1
0367a75
be76e32
ebb4f86
8436d61
84bd9c7
cd048d9
922975d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "angleJoystickRadiusDeadband": 0.5, | ||
| "heading": { | ||
| "p": 0.4, | ||
| "i": 0, | ||
| "d": 0.01 | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| { | ||
| "location": { | ||
| "front": -9, | ||
| "left": 9 | ||
| }, | ||
| "absoluteEncoderOffset": 0, | ||
| "drive": { | ||
| "type": "sparkmax_neo", | ||
| "id": 58, | ||
| "canbus": null | ||
| }, | ||
| "angle": { | ||
| "type": "sparkmax_neo", | ||
| "id": 28, | ||
| "canbus": null | ||
| }, | ||
| "encoder": { | ||
| "type": "cancoder", | ||
| "id": 0, | ||
| "canbus": null | ||
| }, | ||
| "inverted": { | ||
| "drive": false, | ||
| "angle": false | ||
| }, | ||
| "absoluteEncoderInverted": false | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| { | ||
| "location": { | ||
| "front": -9, | ||
| "left": -9 | ||
| }, | ||
| "absoluteEncoderOffset": 0, | ||
| "drive": { | ||
| "type": "sparkmax_neo", | ||
| "id": 59, | ||
| "canbus": null | ||
| }, | ||
| "angle": { | ||
| "type": "sparkmax_neo", | ||
| "id": 29, | ||
| "canbus": null | ||
| }, | ||
| "encoder": { | ||
| "type": "cancoder", | ||
| "id": 0, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same |
||
| "canbus": null | ||
| }, | ||
| "inverted": { | ||
| "drive": false, | ||
| "angle": false | ||
| }, | ||
| "absoluteEncoderInverted": false | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| { | ||
| "location": { | ||
| "front": 9, | ||
| "left": 9 | ||
| }, | ||
| "absoluteEncoderOffset": 0, | ||
| "drive": { | ||
| "type": "sparkmax_neo", | ||
| "id": 57, | ||
| "canbus": null | ||
| }, | ||
| "angle": { | ||
| "type": "sparkmax_neo", | ||
| "id": 27, | ||
| "canbus": null | ||
| }, | ||
| "encoder": { | ||
| "type": "cancoder", | ||
| "id": 0, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same |
||
| "canbus": null | ||
| }, | ||
| "inverted": { | ||
| "drive": false, | ||
| "angle": false | ||
| }, | ||
| "absoluteEncoderInverted": false | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| { | ||
| "location": { | ||
| "front": 9, | ||
| "left": -9 | ||
| }, | ||
| "absoluteEncoderOffset": 0, | ||
| "drive": { | ||
| "type": "sparkmax_neo", | ||
| "id": 60, | ||
| "canbus": null | ||
| }, | ||
| "angle": { | ||
| "type": "sparkmax_neo", | ||
| "id": 30, | ||
| "canbus": null | ||
| }, | ||
| "encoder": { | ||
| "type": "cancoder", | ||
| "id": 0, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same |
||
| "canbus": null | ||
| }, | ||
| "inverted": { | ||
| "drive": false, | ||
| "angle": false | ||
| }, | ||
| "absoluteEncoderInverted": false | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "optimalVoltage": 12, | ||
| "robotMass": 137, | ||
| "wheelGripCoefficientOfFriction": 1.19, | ||
| "currentLimit": { | ||
| "drive": 40, | ||
| "angle": 20 | ||
| }, | ||
| "conversionFactors": { | ||
| "angle": { | ||
| "gearRatio": 12.8, | ||
| "factor": 0 | ||
| }, | ||
| "drive": { | ||
| "diameter": 4, | ||
| "gearRatio": 6.75, | ||
| "factor": 0 | ||
| } | ||
| }, | ||
| "rampRate": { | ||
| "drive": 0.25, | ||
| "angle": 0.25 | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "drive": { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where did these numbers come from? |
||
| "p": 0.0020645, | ||
| "i": 0, | ||
| "d": 0, | ||
| "f": 0, | ||
| "iz": 0 | ||
| }, | ||
| "angle": { | ||
| "p": 0.0020645, | ||
| "i": 0, | ||
| "d": 0, | ||
| "f": 0, | ||
| "iz": 0 | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "imu": { | ||
| "type": "navx_spi", | ||
| "id": 0, | ||
| "canbus": null | ||
| }, | ||
| "invertedIMU": false, | ||
| "modules": [ | ||
| "frontleft.json", | ||
| "frontright.json", | ||
| "backleft.json", | ||
| "backright.json" | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,8 +1,8 @@ | ||||||
| package frc.robot.constants; | ||||||
|
|
||||||
| public class Constants2026 extends GameConstants { | ||||||
| public class ConstantsPushbot2026 extends GameConstants { | ||||||
|
|
||||||
| // Constants2026 is only for CANIDs and nothing else, everything else goes into GameConstants. | ||||||
| // ConstantsPushbot2026 is only for CANIDs and nothing else, everything else goes into GameConstants. | ||||||
|
|
||||||
| public static final int ROLLER_MOTOR_ID = 10; // we dont have a roller this year i thought? | ||||||
| public static final int TILT_MOTOR_ID = 20; // we dont have a tilt this year i thought? | ||||||
|
|
@@ -33,6 +33,6 @@ public class Constants2026 extends GameConstants { | |||||
| public static final int SERVER_SOCKET_ATTEMPT_DELAY = 100; | ||||||
| public static final int TCP_SERVER_PORT = 5806; | ||||||
|
|
||||||
|
|
||||||
| public static final String JSON_DIRECTORY = "pushbot"; | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| } | ||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,20 @@ | ||||||
| package frc.robot.constants; | ||||||
|
|
||||||
| public class ConstantsReal2026 extends ConstantsPushbot2026 { | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't feel right to have |
||||||
|
|
||||||
| public static final String JSON_DIRECTORY = "real"; | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| // shooter related | ||||||
| public static final int SHOOTER_MOTOR_ID = 53; | ||||||
| public static final int SHOOTER_FOLLOWER_MOTOR_ID = 54; | ||||||
| public static final int ANGLER_MOTOR_ID = 11; | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 52? |
||||||
|
|
||||||
| // other CAN-ID's | ||||||
| public static final int TURRET_MOTOR_ID = 1; | ||||||
| public static final int FEEDER_MOTOR_ID = 2; | ||||||
| public static final int HOPPER_MOTOR_ID = 3; | ||||||
| public static final int INTAKE_MOTOR_ID = 4; | ||||||
| public static final int INTAKE_DEPLOYMENT_ID = 5; | ||||||
| public static final int CLIMBER_MOTOR_ID = 6; | ||||||
|
|
||||||
| } | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,19 @@ | ||
| package frc.robot.constants; | ||
|
|
||
| public class ConstantsTestbed2026 extends Constants2026 { | ||
| /** | ||
| * To use the TestBed constants, change Constants.java to read: {@code public class Constants extends | ||
| * ConstantsTestbed2026} | ||
| * | ||
| * <p>instead of: {@code public class Constants extends ConstantsPushbot2026} | ||
| * | ||
| * <p>Then revert changes to Constants.java and ConstantsTestBed.java before committing. | ||
| */ | ||
| public class ConstantsTestbed2026 extends ConstantsPushbot2026 { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. extend REAL? |
||
|
|
||
| // public static final int ROLLER_MOTOR_ID = 40; | ||
| // public static final int TILT_MOTOR_ID = 42; | ||
| //Intake motor id (43) isn't real | ||
| // public static final int HOPPER_MOTOR_ID = 43; | ||
| /** | ||
| * To use the TestBed constants, change Constants.java to read: public class Constants extends | ||
| * ConstantsTestbedClean2025 | ||
| * | ||
| * <p>instead of: public class Constants extends Constants2025 | ||
| * | ||
| * <p>Then revert changes to Constants.java and ConstantsTestBed.java before committing. | ||
| */ | ||
|
|
||
| /** | ||
| * This an example of overriding a specific motor ID for testing, no changes to this file should | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 is not a good CAN value - for now use the same ids as the testbed until we get the real ones.