-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
1,909 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,29 @@ | ||
{ | ||
"HALProvider": { | ||
"Other Devices": { | ||
"window": { | ||
"visible": false | ||
} | ||
} | ||
}, | ||
"NTProvider": { | ||
"types": { | ||
"/FMSInfo": "FMSInfo", | ||
"/Shuffleboard/Pre-match/Mode": "String Chooser", | ||
"/SmartDashboard/AutonomousMode": "String Chooser" | ||
} | ||
}, | ||
"NetworkTables": { | ||
"transitory": { | ||
"SmartDashboard": { | ||
"TunableNumbers": { | ||
"Flywheel": { | ||
"open": true | ||
}, | ||
"open": true | ||
}, | ||
"open": true | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
src/main/kotlin/com/team4099/robot2023/config/constants/FlywheelConstants.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
package com.team4099.robot2023.config.constants | ||
|
||
import org.team4099.lib.units.Velocity | ||
import org.team4099.lib.units.base.amps | ||
import org.team4099.lib.units.base.grams | ||
import org.team4099.lib.units.base.meters | ||
import org.team4099.lib.units.base.seconds | ||
import org.team4099.lib.units.derived.DerivativeGain | ||
import org.team4099.lib.units.derived.IntegralGain | ||
import org.team4099.lib.units.derived.ProportionalGain | ||
import org.team4099.lib.units.derived.Radian | ||
import org.team4099.lib.units.derived.Volt | ||
import org.team4099.lib.units.derived.radians | ||
import org.team4099.lib.units.derived.rotations | ||
import org.team4099.lib.units.derived.volts | ||
import org.team4099.lib.units.kilo | ||
import org.team4099.lib.units.perMinute | ||
import org.team4099.lib.units.perSecond | ||
|
||
object FlywheelConstants { | ||
val LEFT_GEAR_RATIO = 1.0 | ||
|
||
val RIGHT_MOTOR_REVOLUTIONS_PER_FLYWHEEL_REVOLUTIONS = 24.0 / 48.0 | ||
|
||
val VOLTAGE_COMPENSATION = 12.volts | ||
|
||
val INERTIA = 0.0014550597.kilo.grams * 1.0.meters.squared | ||
|
||
val RIGHT_FLYWHEEL_SUPPLY_CURRENT_LIMIT = 50.0.amps | ||
val RIGHT_FLYWHEEL_THRESHOLD_CURRENT_LIMIT = 1.0.amps | ||
val RIGHT_flywheel_TRIGGER_THRESHOLD_TIME = 10.0.seconds | ||
val RIGHT_FLYWHEEL_STATOR_CURRENT_LIMIT = 50.0.amps | ||
|
||
val LEFT_FLYWHEEL_SUPPLY_CURRENT_LIMIT = 50.0.amps | ||
val LEFT_FLYWHEEL_THRESHOLD_CURRENT_LIMIT = 1.0.amps | ||
val LEFT_flywheel_TRIGGER_THRESHOLD_TIME = 10.0.seconds | ||
val LEFT_FLYWHEEL_STATOR_CURRENT_LIMIT = 50.0.amps | ||
|
||
val FLYWHEEL_TOLERANCE = 50.0.rotations.perMinute | ||
object PID { | ||
val RIGHT_REAL_KP: ProportionalGain<Velocity<Radian>, Volt> = | ||
0.01.volts / 1.0.rotations.perMinute | ||
val RIGHT_REAL_KI: IntegralGain<Velocity<Radian>, Volt> = | ||
0.0.volts / (1.0.rotations.perMinute * 1.0.seconds) | ||
val RIGHT_REAL_KD: DerivativeGain<Velocity<Radian>, Volt> = | ||
0.0.volts / (1.0.rotations.perMinute.perSecond) | ||
|
||
val RIGHT_SIM_KP: ProportionalGain<Velocity<Radian>, Volt> = | ||
0.015.volts / 1.0.rotations.perMinute | ||
val RIGHT_SIM_KI: IntegralGain<Velocity<Radian>, Volt> = | ||
0.0.volts / (1.0.rotations.perMinute * 1.0.seconds) | ||
val RIGHT_SIM_KD: DerivativeGain<Velocity<Radian>, Volt> = | ||
0.0.volts / (1.0.rotations.perMinute.perSecond) | ||
|
||
val LEFT_REAL_KP: ProportionalGain<Velocity<Radian>, Volt> = | ||
0.015.volts / 1.0.rotations.perMinute | ||
val LEFT_REAL_KI: IntegralGain<Velocity<Radian>, Volt> = | ||
0.0.volts / (1.0.rotations.perMinute * 1.0.seconds) | ||
val LEFT_REAL_KD: DerivativeGain<Velocity<Radian>, Volt> = | ||
0.0.volts / (1.0.rotations.perMinute.perSecond) | ||
|
||
val LEFT_SIM_KP: ProportionalGain<Velocity<Radian>, Volt> = | ||
0.0015.volts / 1.0.rotations.perMinute | ||
val LEFT_SIM_KI: IntegralGain<Velocity<Radian>, Volt> = | ||
0.0.volts / (1.0.rotations.perMinute * 1.0.seconds) | ||
val LEFT_SIM_KD: DerivativeGain<Velocity<Radian>, Volt> = | ||
0.0.volts / (1.0.rotations.perMinute.perSecond) | ||
|
||
val RIGHT_REAL_FLYWHEEL_KS = 0.0.volts | ||
val RIGHT_REAL_FLYWHEEL_KV = 0.0099.volts / 1.radians.perSecond | ||
val RIGHT_REAL_FLYWHEEL_KA = 0.09.volts / 1.radians.perSecond.perSecond | ||
|
||
val LEFT_REAL_FLYWHEEL_KS = 0.0.volts | ||
val LEFT_REAL_FLYWHEEL_KV = 0.0197.volts / 1.radians.perSecond | ||
val LEFT_REAL_FLYWHEEL_KA = 0.03.volts / 1.radians.perSecond.perSecond | ||
|
||
val RIGHT_SIM_FLYWHEEL_KS = 0.0.volts | ||
val RIGHT_SIM_FLYWHEEL_KV = 0.0099.volts / 1.radians.perSecond | ||
val RIGHT_SIM_FLYWHEEL_KA = 0.09.volts / 1.radians.perSecond.perSecond | ||
|
||
val LEFT_SIM_FLYWHEEL_KS = 0.0.volts | ||
val LEFT_SIM_FLYWHEEL_KV = 0.0197.volts / 1.radians.perSecond | ||
val LEFT_SIM_FLYWHEEL_KA = 0.03.volts / 1.radians.perSecond.perSecond | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
src/main/kotlin/com/team4099/robot2023/config/constants/WristConstants.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package com.team4099.robot2023.config.constants | ||
|
||
import org.team4099.lib.units.base.amps | ||
import org.team4099.lib.units.base.grams | ||
import org.team4099.lib.units.base.inches | ||
import org.team4099.lib.units.base.meters | ||
import org.team4099.lib.units.base.seconds | ||
import org.team4099.lib.units.derived.DerivativeGain | ||
import org.team4099.lib.units.derived.IntegralGain | ||
import org.team4099.lib.units.derived.ProportionalGain | ||
import org.team4099.lib.units.derived.Radian | ||
import org.team4099.lib.units.derived.Volt | ||
import org.team4099.lib.units.derived.degrees | ||
import org.team4099.lib.units.derived.radians | ||
import org.team4099.lib.units.derived.rotations | ||
import org.team4099.lib.units.derived.volts | ||
import org.team4099.lib.units.kilo | ||
import org.team4099.lib.units.perSecond | ||
|
||
object WristConstants { | ||
// val ROLLER_GEAR_RATIO = 0.0 | ||
// val ROLLER_VOLTAGE_COMPENSATION = 0.0.volts | ||
// val ROLLER_STATOR_CURRENT_LIMIT = 0.0.amps | ||
|
||
val VOLTAGE_COMPENSATION = 12.0.volts | ||
val ABSOLUTE_ENCODER_OFFSET = 0.degrees | ||
val WRIST_LENGTH = 18.6.inches | ||
val WRIST_INERTIA = 0.7181257183.kilo.grams * 1.0.meters.squared | ||
|
||
val WRIST_ENCODER_GEAR_RATIO = 0.0 | ||
|
||
val WRIST_GEAR_RATIO = 90.0 / 12 * 90 / 24 * 90 / 30 | ||
val WRIST_VOLTAGE_COMPENSATION = 12.0.volts | ||
val WRIST_STATOR_CURRENT_LIMIT = 40.0.amps | ||
|
||
val WRIST_MAX_ROTATION = 45.degrees | ||
val WRIST_MIN_ROTATION = (-47.0).degrees | ||
|
||
val MAX_WRIST_VELOCITY = 1.radians.perSecond | ||
val MAX_WRIST_ACCELERATION = 2.radians.perSecond.perSecond | ||
object PID { | ||
val REAL_KP: ProportionalGain<Radian, Volt> = 0.001.volts / 1.0.degrees | ||
val REAL_KI: IntegralGain<Radian, Volt> = 0.0.volts / (1.0.degrees * 1.0.seconds) | ||
val REAL_KD: DerivativeGain<Radian, Volt> = 0.0.volts / (1.0.rotations / 1.0.seconds) | ||
|
||
val SIM_KP: ProportionalGain<Radian, Volt> = 1.volts / 1.0.degrees | ||
val SIM_KI: IntegralGain<Radian, Volt> = 0.0.volts / (1.0.degrees * 1.0.seconds) | ||
val SIM_KD: DerivativeGain<Radian, Volt> = 0.00.volts / (1.0.degrees / 1.0.seconds) | ||
|
||
val WRIST_KG = 1.25.volts | ||
val WRIST_KV = 1.61.volts / 1.0.radians.perSecond | ||
val WRIST_KA = 0.03.volts / 1.0.radians.perSecond.perSecond | ||
val WRIST_KS = 0.0.volts | ||
} | ||
|
||
val WRIST_TOLERANCE = 0.01.degrees | ||
} |
3 changes: 0 additions & 3 deletions
3
src/main/kotlin/com/team4099/robot2023/subsystems/Shooter/Shooter.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.