diff --git a/docs/index-all.html b/docs/index-all.html
index 435958b..8c3198f 100644
--- a/docs/index-all.html
+++ b/docs/index-all.html
@@ -429,8 +429,7 @@
M
ManipElevator(ManipMotor, ManipElevatorConstants) - Constructor for class maniplib.ManipElevator
-Subsystem constructor, advanced
ManipElevator when config.kEnableAdvanced is set to
- true.
+Subsystem constructor, advanced
ManipElevator when config.kEnableAdvanced is set to true.
ManipElevator(ManipMotor, PIDFConfig) - Constructor for class maniplib.ManipElevator
@@ -490,8 +489,7 @@ M
maximumRetries - Variable in class maniplib.motors.ManipMotor
-The maximum amount of times the swerve motor will attempt to configure a motor if failures
- occur.
+The maximum amount of times the swerve motor will attempt to configure a motor if failures occur.
min - Variable in class maniplib.utils.deserializer.PIDFRange
@@ -629,6 +627,30 @@ R
Runs runElevatorVoltage as a
Command.
+runkG() - Method in class maniplib.ManipArm
+
+Powers the motor with the kG feedforward value.
+
+runkG() - Method in class maniplib.ManipElevator
+
+Powers the motor with the kG feedforward value.
+
+runkGCommand() - Method in class maniplib.ManipArm
+
+Powers the motor with the kG feedforward value as a command.
+
+runkGCommand() - Method in class maniplib.ManipElevator
+
+Powers the motor with the kG feedforward value as a command.
+
+runSpeed(double) - Method in class maniplib.ManipShooterIntake
+
+Set the percentage output as a command.
+
+runSpeedCommand(double) - Method in class maniplib.ManipShooterIntake
+
+Set the percentage output.
+
runSysIdRoutine() - Method in class maniplib.ManipArm
Runs the SysId routine to tune the Arm
@@ -637,6 +659,14 @@ R
Runs the SysId routine to tune the elevator
+runVoltage(double) - Method in class maniplib.ManipShooterIntake
+
+Set the motor voltage.
+
+runVoltageCommand(double) - Method in class maniplib.ManipShooterIntake
+
+Set the motor voltage as a command.
+
S
@@ -670,13 +700,13 @@ S
- setCurrentLimit(int) - Method in class maniplib.motors.ManipMotor
-
-
Set the current limit for the swerve drive motor, remember this may cause jumping if used in
- conjunction with voltage compensation.
+Set the current limit for the swerve drive motor, remember this may cause jumping if used in conjunction with
+ voltage compensation.
- setCurrentLimit(int) - Method in class maniplib.motors.ManipSparkMax
-
-
Set the current limit for the motor, remember this may cause jumping if used in conjunction
- with voltage compensation.
+Set the current limit for the motor, remember this may cause jumping if used in conjunction with
+ voltage compensation.
- setGearbox(DCMotor) - Method in class maniplib.motors.ManipMotor
-
@@ -750,17 +780,15 @@
S
-
Set the closed loop PID controller reference point.
- - setSpeed(double) - Method in class maniplib.ManipShooterIntake
--
-
Set the percentage output.
-
- setSyncAbsEncoderInit(boolean) - Method in class maniplib.ManipArm
-
-
Determines whether to sync the absolute encoder in the
ManipArm class or not.
+Determines whether to sync the absolute encoder in the
+
ManipArm class or not.
- setSyncAbsEncoderInit(boolean) - Method in class maniplib.ManipElevator
-
-
Determines whether to sync the absolute encoder in the
ManipElevator class or not.
+Determines whether to sync the absolute encoder in the
+
ManipElevator class or not.
- setTopLimitSwitch(boolean) - Method in class maniplib.ManipArm
-
diff --git a/docs/maniplib/ManipArm.html b/docs/maniplib/ManipArm.html
index f552f79..544ae3a 100644
--- a/docs/maniplib/ManipArm.html
+++ b/docs/maniplib/ManipArm.html
@@ -189,6 +189,16 @@
Method Summary
+void
+
+
+
Powers the motor with the kG feedforward value.
+
+
+
+
+
Powers the motor with the kG feedforward value as a command.
+
@@ -210,7 +220,8 @@
Method Summary
void
-
Determines whether to sync the absolute encoder in the
ManipArm class or not.
+
Determines whether to sync the absolute encoder in the
+
ManipArm class or not.
void
@@ -301,7 +312,8 @@
periodic
simulationPeriodic
public void simulationPeriodic()
-Ran periodically in simulation. Controls the arm simulation.
+Ran periodically in simulation.
+ Controls the arm simulation.
-
@@ -331,23 +343,25 @@
addFollower
addAbsoluteEncoderValue
public void addAbsoluteEncoderValue(double absEncoderDegrees)
-Adds an absolute encoder to sync to on init. This is not used for actual control but
- recommended to keep arm position on boot. Can be called in init.
+Adds an absolute encoder to sync to on init. This is not used for actual control
+ but recommended to keep arm position on boot. Can be called in init.
+ Value must be in 0-360.
-
setSyncAbsEncoderInit
public void setSyncAbsEncoderInit(boolean syncAbsEncoderInit)
-Determines whether to sync the absolute encoder in the
ManipArm class or not. This is
- enabled by default.
+Determines whether to sync the absolute encoder in the
+
ManipArm class or not. This is enabled by default.
-
synchronizeAbsoluteEncoder
public void synchronizeAbsoluteEncoder()
-Seeds inbuilt encoder with absolute encoder value. Syncs on init by default.
+Seeds inbuilt encoder with absolute encoder value.
+ Syncs on init by default.
-
@@ -398,14 +412,32 @@
reachSetpoint
runArmSpeed
public void runArmSpeed(double speed)
-Basic method to run the arm at commanded speed. This does not stop!!
+Basic method to run the arm at commanded speed.
+ This does not stop!!
-
runArmVoltage
public void runArmVoltage(Voltage volts)
-Basic method to run the arm at commanded voltage. This does not stop!!
+Basic method to run the arm at commanded voltage.
+ This does not stop!!
+
+
+
-
+
+
runkG
+public void runkG()
+Powers the motor with the kG feedforward value.
+ "Voltage required to counteract gravity".
+
+
+
-
+
+
runkGCommand
+
+Powers the motor with the kG feedforward value as a command.
+ "Voltage required to counteract gravity".
-
@@ -441,14 +473,16 @@
setGoal
runArmSpeedCommand
public Command runArmSpeedCommand(double speed)
-Runs runArmSpeed as a
Command. This stops after command is finished.
+Runs runArmSpeed as a
Command.
+ This stops after command is finished.
-
runArmVoltageCommand
-Runs runArmVoltage as a
Command. This stops after command is finished.
+Runs runArmVoltage as a
Command.
+ This stops after command is finished.
-
@@ -469,9 +503,9 @@
setBottomLimitSwitch
autoStowWithOverride
public Command autoStowWithOverride(double stowAngle)
-A command to be used as a default command to stow the arm. Use toggleAutoStow() to toggle it on
- and off. It's good for if you want it to stow but want safety or to be able to control
- manually.
+A command to be used as a default command to stow the arm.
+ Use toggleAutoStow() to toggle it on and off.
+ It's good for if you want it to stow but want safety or to be able to control manually.
-
diff --git a/docs/maniplib/ManipElevator.html b/docs/maniplib/ManipElevator.html
index f642c64..0a15e34 100644
--- a/docs/maniplib/ManipElevator.html
+++ b/docs/maniplib/ManipElevator.html
@@ -101,8 +101,7 @@
Constructor Summary
-
Subsystem constructor, advanced
ManipElevator when config.kEnableAdvanced is set to
- true.
+
Subsystem constructor, advanced
ManipElevator when config.kEnableAdvanced is set to true.
@@ -206,6 +205,16 @@ Method Summary
Runs runElevatorVoltage as a
Command.
+void
+
+
+
Powers the motor with the kG feedforward value.
+
+
+
+
+
Powers the motor with the kG feedforward value as a command.
+
@@ -227,7 +236,8 @@
Method Summary
void
-
Determines whether to sync the absolute encoder in the
ManipElevator class or not.
+
Determines whether to sync the absolute encoder in the
+
ManipElevator class or not.
void
@@ -282,8 +292,7 @@
Constructor Details
ManipElevator
-
Subsystem constructor, advanced
ManipElevator when config.kEnableAdvanced is set to
- true.
+
Subsystem constructor, advanced
ManipElevator when config.kEnableAdvanced is set to true.
-
@@ -319,7 +328,8 @@
periodic
simulationPeriodic
public void simulationPeriodic()
-Ran periodically in simulation. Controls the elevator simulation.
+Ran periodically in simulation.
+ Controls the elevator simulation.
-
@@ -349,23 +359,24 @@
addFollower
addAbsoluteEncoderValue
public void addAbsoluteEncoderValue(double absEncoderDegrees)
-Adds an absolute encoder to sync to on init. This is not used for actual control but
- recommended to keep elevator position on boot. Can be called in init.
+Adds an absolute encoder to sync to on init. This is not used for actual control
+ but recommended to keep elevator position on boot. Can be called in init.
-
setSyncAbsEncoderInit
public void setSyncAbsEncoderInit(boolean syncAbsEncoderInit)
-Determines whether to sync the absolute encoder in the
ManipElevator class or not. This
- is enabled by default.
+Determines whether to sync the absolute encoder in the
+
ManipElevator class or not. This is enabled by default.
-
synchronizeAbsoluteEncoder
public void synchronizeAbsoluteEncoder()
-Seeds inbuilt encoder with absolute encoder value. Syncs on init by default.
+Seeds inbuilt encoder with absolute encoder value.
+ Syncs on init by default.
-
@@ -468,22 +479,24 @@
nearMin
reachSetpoint
public void reachSetpoint(double setpointInches)
-Run the control loop to reach and maintain the setpoint from the preferences. If using basic
- control setpoint is in sensor units.
+Run the control loop to reach and maintain the setpoint from the preferences.
+ If using basic control setpoint is in sensor units.
-
runElevatorSpeed
public void runElevatorSpeed(double speed)
-Basic method to run the elevator at commanded speed. This does not stop!!
+Basic method to run the elevator at commanded speed.
+ This does not stop!!
-
runElevatorVoltage
public void runElevatorVoltage(Voltage volts)
-Basic method to run the elevator at commanded voltage. This does not stop!!
+Basic method to run the elevator at commanded voltage.
+ This does not stop!!
-
@@ -497,14 +510,32 @@
setGoal
runElevatorSpeedCommand
public Command runElevatorSpeedCommand(double speed)
-Runs runElevatorSpeed as a
Command. This stops after command is finished.
+Runs runElevatorSpeed as a
Command.
+ This stops after command is finished.
-
runElevatorVoltageCommand
-Runs runElevatorVoltage as a
Command. This stops after command is finished.
+Runs runElevatorVoltage as a
Command.
+ This stops after command is finished.
+
+
+
-
+
+
runkG
+public void runkG()
+Powers the motor with the kG feedforward value.
+ "Voltage required to counteract gravity".
+
+
+
-
+
+
runkGCommand
+
+Powers the motor with the kG feedforward value as a command.
+ "Voltage required to counteract gravity".
-
@@ -525,9 +556,9 @@
setBottomLimitSwitch
autoStowWithOverride
public Command autoStowWithOverride(double stowHeight)
-A command to be used as a default command to stow the elevator. Use toggleAutoStow() to toggle
- it on and off. It's good for if you want it to stow but want safety or to be able to control
- manually.
+A command to be used as a default command to stow the elevator.
+ Use toggleAutoStow() to toggle it on and off.
+ It's good for if you want it to stow but want safety or to be able to control manually.
-
diff --git a/docs/maniplib/ManipShooterIntake.html b/docs/maniplib/ManipShooterIntake.html
index 5a31aad..54a167c 100644
--- a/docs/maniplib/ManipShooterIntake.html
+++ b/docs/maniplib/ManipShooterIntake.html
@@ -118,24 +118,39 @@
Method Summary
-
-
+void
+
-
Set the closed loop PID controller reference point.
+
Set the percentage output as a command.
-
+
Set the percentage output.
void
-
+
-
+
Set the motor voltage.
-
+
+
Set the motor voltage as a command.
+
+
+
+
+
Set the closed loop PID controller reference point.
+
+void
+
+
+
+
+
@@ -194,10 +209,32 @@ addFollower
-
-
-
setSpeed
-public Command setSpeed(double speed)
-Set the percentage output.
+
+runVoltage
+public void runVoltage(double voltage)
+Set the motor voltage.
+
+- Parameters:
+voltage - to run the motor at.
+
+
+
+
-
+
+
runVoltageCommand
+public Command runVoltageCommand(double voltage)
+Set the motor voltage as a command.
+
+- Parameters:
+voltage - to run the motor at.
+
+
+
+
-
+
+
runSpeed
+public void runSpeed(double speed)
+Set the percentage output as a command.
- Parameters:
speed - percent out for the motor controller.
@@ -205,6 +242,17 @@ setSpeed
-
+
+
runSpeedCommand
+public Command runSpeedCommand(double speed)
+Set the percentage output.
+
+- Parameters:
+speed - percent out for the motor controller as a command.
+
+
+
+
-
setReference
public Command setReference(double setpoint)
diff --git a/docs/maniplib/motors/ManipMotor.html b/docs/maniplib/motors/ManipMotor.html
index a3e10d7..df8744c 100644
--- a/docs/maniplib/motors/ManipMotor.html
+++ b/docs/maniplib/motors/ManipMotor.html
@@ -97,8 +97,7 @@ Field Summary
final int
-
The maximum amount of times the swerve motor will attempt to configure a motor if failures
- occur.
+
The maximum amount of times the swerve motor will attempt to configure a motor if failures occur.
@@ -220,8 +219,8 @@ Method Summary
abstract void
-
Set the current limit for the swerve drive motor, remember this may cause jumping if used in
- conjunction with voltage compensation.
+
Set the current limit for the swerve drive motor, remember this may cause jumping if used in conjunction with
+ voltage compensation.
abstract void
@@ -329,8 +328,7 @@ Field Details
maximumRetries
public final int maximumRetries
-The maximum amount of times the swerve motor will attempt to configure a motor if failures
- occur.
+The maximum amount of times the swerve motor will attempt to configure a motor if failures occur.
- See Also:
-
@@ -685,8 +683,8 @@
setVoltageCompensation
setCurrentLimit
public abstract void setCurrentLimit(int currentLimit)
-Set the current limit for the swerve drive motor, remember this may cause jumping if used in
- conjunction with voltage compensation. This is useful to protect the motor from current spikes.
+Set the current limit for the swerve drive motor, remember this may cause jumping if used in conjunction with
+ voltage compensation. This is useful to protect the motor from current spikes.
- Parameters:
currentLimit - Current limit in AMPS at free speed.
diff --git a/docs/maniplib/motors/ManipSparkMax.html b/docs/maniplib/motors/ManipSparkMax.html
index 3b0b7f7..efd7b9e 100644
--- a/docs/maniplib/motors/ManipSparkMax.html
+++ b/docs/maniplib/motors/ManipSparkMax.html
@@ -254,8 +254,8 @@ Method Summary
void
-
Set the current limit for the motor, remember this may cause jumping if used in conjunction
- with voltage compensation.
+
Set the current limit for the motor, remember this may cause jumping if used in conjunction with
+ voltage compensation.
void
@@ -530,8 +530,8 @@ setVoltageCompensation
setCurrentLimit
public void setCurrentLimit(int currentLimit)
-Set the current limit for the motor, remember this may cause jumping if used in conjunction
- with voltage compensation. This is useful to protect the motor from current spikes.
+Set the current limit for the motor, remember this may cause jumping if used in conjunction with
+ voltage compensation. This is useful to protect the motor from current spikes.
- Specified by:
setCurrentLimit in class ManipMotor
diff --git a/docs/maniplib/utils/ManipArmConstants.html b/docs/maniplib/utils/ManipArmConstants.html
index a55375e..14eab4d 100644
--- a/docs/maniplib/utils/ManipArmConstants.html
+++ b/docs/maniplib/utils/ManipArmConstants.html
@@ -392,13 +392,11 @@ ManipArmConstants
kMaxAngle - Arms min height in degrees. Used for soft limits as well.
kArmInverted - Whether to invert the drive direction of the arm. runArm(.1); should go up.
kArmRampRate - Elevators ramp rate. 0.5 is recommended for most.
-kArmOffsetToHorizantalZero - Absolute encoder offset. Arm should be horizontal to the
- floor at 0.
+kArmOffsetToHorizantalZero - Absolute encoder offset. Arm should be horizontal to the floor at 0.
kArmAllowedClosedLoopError - Allowed error in the pid control in degrees.
kArmStallCurrentLimitAmps - The arms stall limit. 30 is recommended for most.
kArmMaxVelocityRPM - Arms max velocity in rotations per second.
-kArmMaxAccelerationRPMperSecond - Arms max Acceleration in rotations per second. Depends
- on specific arm config for accurate sim speed.
+kArmMaxAccelerationRPMperSecond - Arms max Acceleration in rotations per second. Depends on specific arm config for accurate sim speed.
kEnableAdvanced - Determines whether to use advanced control and sim.
diff --git a/docs/maniplib/utils/ManipElevatorConstants.html b/docs/maniplib/utils/ManipElevatorConstants.html
index 29820e5..102b1b3 100644
--- a/docs/maniplib/utils/ManipElevatorConstants.html
+++ b/docs/maniplib/utils/ManipElevatorConstants.html
@@ -376,8 +376,7 @@ ManipElevatorConstants
kElevatorGearing - Gear ratio of the elevator, use gearbox w/o sprockets.
kElevatorDrumRadiusInches - Radius of the drum, sprocket radius if using chain.
kElevatorCarriageMassLbs - How much the carriage weighs in pounds.
-kStartingSimHeightInches - Where the elevator sim should set the elevator on start, in
- inches.
+kStartingSimHeightInches - Where the elevator sim should set the elevator on start, in inches.
kMaxHeightInches - Elevators max height in inches. Used for soft limits as well.
kMinHeightInches - Elevators min height in inches. Used for soft limits as well.
kIsInverted - Whether to invert the lead motor. Positive speed should go up.
@@ -385,8 +384,7 @@ ManipElevatorConstants
kElevatorCurrentLimit - Elevators current limit. 40 is recommended for most.
kMaxVelocityMps - Elevators max velocity in meters per second.
kMaxAccelerationMps - Elevators max acceleration in meters per second.
-kAbsEncoderOffset - Offset for an optional but heavily recommended abs encoder. Set
- elevator to kMinHeight then input the raw abs output.
+kAbsEncoderOffset - Offset for an optional but heavily recommended abs encoder. Set elevator to kMinHeight then input the raw abs output.
kEnableAdvanced - Determines whether to use advanced control and sim.
diff --git a/docs/member-search-index.js b/docs/member-search-index.js
index aaec3f1..1a27af7 100644
--- a/docs/member-search-index.js
+++ b/docs/member-search-index.js
@@ -1 +1 @@
-memberSearchIndex = [{"p":"maniplib","c":"ManipArm","l":"addAbsoluteEncoderValue(double)"},{"p":"maniplib","c":"ManipElevator","l":"addAbsoluteEncoderValue(double)"},{"p":"maniplib","c":"ManipArm","l":"addFollower(ManipMotor, boolean)","u":"addFollower(maniplib.motors.ManipMotor,boolean)"},{"p":"maniplib","c":"ManipElevator","l":"addFollower(ManipMotor, boolean)","u":"addFollower(maniplib.motors.ManipMotor,boolean)"},{"p":"maniplib","c":"ManipShooterIntake","l":"addFollower(ManipMotor, boolean)","u":"addFollower(maniplib.motors.ManipMotor,boolean)"},{"p":"maniplib.utils","c":"ManipMath.Arm","l":"Arm()","u":"%3Cinit%3E()"},{"p":"maniplib","c":"ManipElevator","l":"atHeight(double, double)","u":"atHeight(double,double)"},{"p":"maniplib","c":"ManipArm","l":"autoStowWithOverride(double)"},{"p":"maniplib","c":"ManipElevator","l":"autoStowWithOverride(double)"},{"p":"maniplib.motors","c":"ManipMotor","l":"burnFlash()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"burnFlash()"},{"p":"maniplib.motors","c":"ManipMotor","l":"clearStickyFaults()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"clearStickyFaults()"},{"p":"maniplib.motors","c":"ManipMotor","l":"configureMotor(int, double, boolean, boolean)","u":"configureMotor(int,double,boolean,boolean)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"configureMotor(int, double, boolean, boolean)","u":"configureMotor(int,double,boolean,boolean)"},{"p":"maniplib.motors","c":"ManipMotor","l":"configurePIDF(PIDFConfig)","u":"configurePIDF(maniplib.utils.PIDFConfig)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"configurePIDF(PIDFConfig)","u":"configurePIDF(maniplib.utils.PIDFConfig)"},{"p":"maniplib.motors","c":"ManipMotor","l":"configurePIDWrapping(double, double)","u":"configurePIDWrapping(double,double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"configurePIDWrapping(double, double)","u":"configurePIDWrapping(double,double)"},{"p":"maniplib.utils","c":"PIDControlType","l":"controlType"},{"p":"maniplib.utils","c":"ManipMath.Arm","l":"convertAngleToSensorUnits(double, Angle)","u":"convertAngleToSensorUnits(double,edu.wpi.first.units.measure.Angle)"},{"p":"maniplib.utils","c":"ManipMath.Elevator","l":"convertDistanceToRotations(double, double, Distance)","u":"convertDistanceToRotations(double,double,edu.wpi.first.units.measure.Distance)"},{"p":"maniplib.utils","c":"ManipMath.Elevator","l":"convertRotationsToDistance(double, double, Angle)","u":"convertRotationsToDistance(double,double,edu.wpi.first.units.measure.Angle)"},{"p":"maniplib.utils","c":"ManipMath.Arm","l":"convertSensorUnitsToAngle(double, Angle)","u":"convertSensorUnitsToAngle(double,edu.wpi.first.units.measure.Angle)"},{"p":"maniplib.utils","c":"PIDFConfig","l":"createPIDController()"},{"p":"maniplib.utils","c":"PIDFConfig","l":"d"},{"p":"maniplib.utils","c":"ManipMath.Elevator","l":"Elevator()","u":"%3Cinit%3E()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"encoder"},{"p":"maniplib.utils","c":"PIDFConfig","l":"f"},{"p":"maniplib.motors","c":"ManipMotor","l":"factoryDefaults()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"factoryDefaults()"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"gearbox"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"gearbox"},{"p":"maniplib","c":"ManipArm","l":"getAngle()"},{"p":"maniplib.motors","c":"ManipMotor","l":"getAppliedOutput()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getAppliedOutput()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getConfig()"},{"p":"maniplib","c":"ManipElevator","l":"getHeightMeters()"},{"p":"maniplib","c":"ManipElevator","l":"getLinearPosition()"},{"p":"maniplib","c":"ManipElevator","l":"getLinearVelocity()"},{"p":"maniplib","c":"ManipArm","l":"getMechAngle()"},{"p":"maniplib","c":"ManipElevator","l":"getMechLength()"},{"p":"maniplib.motors","c":"ManipMotor","l":"getMotor()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getMotor()"},{"p":"maniplib.motors","c":"ManipMotor","l":"getMotorID()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getMotorID()"},{"p":"maniplib.motors","c":"ManipMotor","l":"getPosition()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getPosition()"},{"p":"maniplib.motors","c":"ManipMotor","l":"getRioController()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getRioController()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getSparkController()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getSparkMax()"},{"p":"maniplib","c":"ManipArm","l":"getVelocity()"},{"p":"maniplib.motors","c":"ManipMotor","l":"getVelocity()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getVelocity()"},{"p":"maniplib","c":"ManipElevator","l":"getVelocityMetersPerSecond()"},{"p":"maniplib.motors","c":"ManipMotor","l":"getVoltage()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getVoltage()"},{"p":"maniplib","c":"Telemetry.ManipTelemetry","l":"HIGH"},{"p":"maniplib.utils","c":"PIDFConfig","l":"i"},{"p":"maniplib.motors","c":"ManipMotor","l":"iterateCTRESim()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"iterateCTRESim()"},{"p":"maniplib.motors","c":"ManipMotor","l":"iterateRevSim(double, double, double)","u":"iterateRevSim(double,double,double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"iterateRevSim(double, double, double)","u":"iterateRevSim(double,double,double)"},{"p":"maniplib.utils","c":"PIDFConfig","l":"iz"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kAbsEncoderOffset"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmAllowedClosedLoopError"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmInverted"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmKa"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmKd"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmkG"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmKi"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmKp"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmkS"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmKv"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmLength"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmMass"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmMaxAccelerationRPMperSecond"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmMaxVelocityRPM"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmOffsetToHorizantalZero"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmRampRate"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmReduction"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmStallCurrentLimitAmps"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmStartingAngle"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorCarriageMass"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorCurrentLimit"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorDrumRadius"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorGearing"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorkA"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorKd"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorkG"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorKi"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorKp"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorkS"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorkV"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorRampRate"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kEnableAdvanced"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kEnableAdvanced"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kIsInverted"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kMaxAcceleration"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kMaxAngle"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kMaxHeight"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kMaxVelocity"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kMinAngle"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kMinHeight"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kStartingHeightSim"},{"p":"maniplib","c":"Telemetry.ManipTelemetry","l":"LOW"},{"p":"maniplib","c":"ManipArm","l":"ManipArm(ManipMotor)","u":"%3Cinit%3E(maniplib.motors.ManipMotor)"},{"p":"maniplib","c":"ManipArm","l":"ManipArm(ManipMotor, ManipArmConstants)","u":"%3Cinit%3E(maniplib.motors.ManipMotor,maniplib.utils.ManipArmConstants)"},{"p":"maniplib","c":"ManipArm","l":"ManipArm(ManipMotor, PIDFConfig)","u":"%3Cinit%3E(maniplib.motors.ManipMotor,maniplib.utils.PIDFConfig)"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"ManipArmConstants(DCMotor, double, double, double, double, double, double, double, double, double, double, double, double, double, boolean, double, double, double, int, double, double, boolean)","u":"%3Cinit%3E(edu.wpi.first.math.system.plant.DCMotor,double,double,double,double,double,double,double,double,double,double,double,double,double,boolean,double,double,double,int,double,double,boolean)"},{"p":"maniplib","c":"ManipElevator","l":"ManipElevator(ManipMotor)","u":"%3Cinit%3E(maniplib.motors.ManipMotor)"},{"p":"maniplib","c":"ManipElevator","l":"ManipElevator(ManipMotor, ManipElevatorConstants)","u":"%3Cinit%3E(maniplib.motors.ManipMotor,maniplib.utils.ManipElevatorConstants)"},{"p":"maniplib","c":"ManipElevator","l":"ManipElevator(ManipMotor, PIDFConfig)","u":"%3Cinit%3E(maniplib.motors.ManipMotor,maniplib.utils.PIDFConfig)"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"ManipElevatorConstants(DCMotor, double, double, double, double, double, double, double, double, double, double, double, double, double, boolean, double, int, double, double, double, boolean)","u":"%3Cinit%3E(edu.wpi.first.math.system.plant.DCMotor,double,double,double,double,double,double,double,double,double,double,double,double,double,boolean,double,int,double,double,double,boolean)"},{"p":"maniplib.utils","c":"ManipMath","l":"ManipMath()","u":"%3Cinit%3E()"},{"p":"maniplib.motors","c":"ManipMotor","l":"ManipMotor()","u":"%3Cinit%3E()"},{"p":"maniplib","c":"ManipShooterIntake","l":"ManipShooterIntake(ManipMotor)","u":"%3Cinit%3E(maniplib.motors.ManipMotor)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"ManipSparkMax(int)","u":"%3Cinit%3E(int)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"ManipSparkMax(SparkMax)","u":"%3Cinit%3E(com.revrobotics.spark.SparkMax)"},{"p":"maniplib","c":"Telemetry","l":"manipVerbosity"},{"p":"maniplib.utils.deserializer","c":"PIDFRange","l":"max"},{"p":"maniplib.motors","c":"ManipMotor","l":"maximumRetries"},{"p":"maniplib.utils.deserializer","c":"PIDFRange","l":"min"},{"p":"maniplib","c":"ManipArm","l":"nearMax(double)"},{"p":"maniplib","c":"ManipElevator","l":"nearMax(double)"},{"p":"maniplib","c":"ManipArm","l":"nearMin(double)"},{"p":"maniplib","c":"ManipElevator","l":"nearMin(double)"},{"p":"maniplib","c":"Telemetry.ManipTelemetry","l":"NONE"},{"p":"maniplib.utils","c":"PIDFConfig","l":"output"},{"p":"maniplib.utils","c":"PIDFConfig","l":"p"},{"p":"maniplib","c":"ManipArm","l":"periodic()"},{"p":"maniplib","c":"ManipElevator","l":"periodic()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"pid"},{"p":"maniplib.utils","c":"PIDControlType","l":"PIDControlType()","u":"%3Cinit%3E()"},{"p":"maniplib.utils","c":"PIDFConfig","l":"PIDFConfig()","u":"%3Cinit%3E()"},{"p":"maniplib.utils","c":"PIDFConfig","l":"PIDFConfig(double, double)","u":"%3Cinit%3E(double,double)"},{"p":"maniplib.utils","c":"PIDFConfig","l":"PIDFConfig(double, double, double)","u":"%3Cinit%3E(double,double,double)"},{"p":"maniplib.utils","c":"PIDFConfig","l":"PIDFConfig(double, double, double, double)","u":"%3Cinit%3E(double,double,double,double)"},{"p":"maniplib.utils","c":"PIDFConfig","l":"PIDFConfig(double, double, double, double, double)","u":"%3Cinit%3E(double,double,double,double,double)"},{"p":"maniplib.utils.deserializer","c":"PIDFRange","l":"PIDFRange()","u":"%3Cinit%3E()"},{"p":"maniplib.utils","c":"PIDControlType.ControlType","l":"POSITION"},{"p":"maniplib","c":"ManipArm","l":"reachSetpoint(double)"},{"p":"maniplib","c":"ManipElevator","l":"reachSetpoint(double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"rioPID"},{"p":"maniplib","c":"ManipArm","l":"runArmSpeed(double)"},{"p":"maniplib","c":"ManipArm","l":"runArmSpeedCommand(double)"},{"p":"maniplib","c":"ManipArm","l":"runArmVoltage(Voltage)","u":"runArmVoltage(edu.wpi.first.units.measure.Voltage)"},{"p":"maniplib","c":"ManipArm","l":"runArmVoltageCommand(Voltage)","u":"runArmVoltageCommand(edu.wpi.first.units.measure.Voltage)"},{"p":"maniplib","c":"ManipElevator","l":"runElevatorSpeed(double)"},{"p":"maniplib","c":"ManipElevator","l":"runElevatorSpeedCommand(double)"},{"p":"maniplib","c":"ManipElevator","l":"runElevatorVoltage(Voltage)","u":"runElevatorVoltage(edu.wpi.first.units.measure.Voltage)"},{"p":"maniplib","c":"ManipElevator","l":"runElevatorVoltageCommand(Voltage)","u":"runElevatorVoltageCommand(edu.wpi.first.units.measure.Voltage)"},{"p":"maniplib","c":"ManipArm","l":"runSysIdRoutine()"},{"p":"maniplib","c":"ManipElevator","l":"runSysIdRoutine()"},{"p":"maniplib.motors","c":"ManipMotor","l":"set(double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"set(double)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setAsFollower(ManipMotor, Boolean)","u":"setAsFollower(maniplib.motors.ManipMotor,java.lang.Boolean)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setAsFollower(ManipMotor, Boolean)","u":"setAsFollower(maniplib.motors.ManipMotor,java.lang.Boolean)"},{"p":"maniplib","c":"ManipArm","l":"setAutoStow(boolean)"},{"p":"maniplib","c":"ManipElevator","l":"setAutoStow(boolean)"},{"p":"maniplib","c":"ManipArm","l":"setBottomLimitSwitch(boolean)"},{"p":"maniplib","c":"ManipElevator","l":"setBottomLimitSwitch(boolean)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setCurrentLimit(int)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setCurrentLimit(int)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setGearbox(DCMotor)","u":"setGearbox(edu.wpi.first.math.system.plant.DCMotor)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setGearbox(DCMotor)","u":"setGearbox(edu.wpi.first.math.system.plant.DCMotor)"},{"p":"maniplib","c":"ManipArm","l":"setGoal(double)"},{"p":"maniplib","c":"ManipElevator","l":"setGoal(double)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setInverted(boolean)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setInverted(boolean)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setLoopRampRate(double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setLoopRampRate(double)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setMotorBrake(boolean)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setMotorBrake(boolean)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setPIDControlType(PIDControlType.ControlType)","u":"setPIDControlType(maniplib.utils.PIDControlType.ControlType)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setPIDControlType(PIDControlType.ControlType)","u":"setPIDControlType(maniplib.utils.PIDControlType.ControlType)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setPosition(double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setPosition(double)"},{"p":"maniplib","c":"ManipShooterIntake","l":"setReference(double)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setReference(double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setReference(double)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setReference(double, double)","u":"setReference(double,double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setReference(double, double)","u":"setReference(double,double)"},{"p":"maniplib","c":"ManipShooterIntake","l":"setSpeed(double)"},{"p":"maniplib","c":"ManipArm","l":"setSyncAbsEncoderInit(boolean)"},{"p":"maniplib","c":"ManipElevator","l":"setSyncAbsEncoderInit(boolean)"},{"p":"maniplib","c":"ManipArm","l":"setTopLimitSwitch(boolean)"},{"p":"maniplib","c":"ManipElevator","l":"setTopLimitSwitch(boolean)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setupRioPID(PIDFConfig, double, double, double, boolean)","u":"setupRioPID(maniplib.utils.PIDFConfig,double,double,double,boolean)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setupRioPID(PIDFConfig, double, double, double, boolean)","u":"setupRioPID(maniplib.utils.PIDFConfig,double,double,double,boolean)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setVelocity(double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setVelocity(double)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setVoltage(double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setVoltage(double)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setVoltage(Voltage)","u":"setVoltage(edu.wpi.first.units.measure.Voltage)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setVoltage(Voltage)","u":"setVoltage(edu.wpi.first.units.measure.Voltage)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setVoltageCompensation(double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setVoltageCompensation(double)"},{"p":"maniplib","c":"ManipArm","l":"simulationPeriodic()"},{"p":"maniplib","c":"ManipElevator","l":"simulationPeriodic()"},{"p":"maniplib","c":"ManipArm","l":"stopArm()"},{"p":"maniplib","c":"ManipElevator","l":"stopElevator()"},{"p":"maniplib.motors","c":"ManipMotor","l":"stopMotor()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"stopMotor()"},{"p":"maniplib.motors","c":"ManipMotor","l":"stopMotorCommand()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"stopMotorCommand()"},{"p":"maniplib","c":"ManipShooterIntake","l":"stopShooter()"},{"p":"maniplib","c":"ManipShooterIntake","l":"stopShooterCommand()"},{"p":"maniplib","c":"ManipArm","l":"synchronizeAbsoluteEncoder()"},{"p":"maniplib","c":"ManipElevator","l":"synchronizeAbsoluteEncoder()"},{"p":"maniplib","c":"Telemetry","l":"Telemetry()","u":"%3Cinit%3E()"},{"p":"maniplib","c":"ManipArm","l":"toggleAutoStow()"},{"p":"maniplib","c":"ManipElevator","l":"toggleAutoStow()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"updateConfig(SparkMaxConfig)","u":"updateConfig(com.revrobotics.spark.config.SparkMaxConfig)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"useRioPID"},{"p":"maniplib.motors","c":"ManipMotor","l":"useRioPID(boolean)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"useRioPID(boolean)"},{"p":"maniplib","c":"Telemetry.ManipTelemetry","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"maniplib.utils","c":"PIDControlType.ControlType","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"maniplib","c":"Telemetry.ManipTelemetry","l":"values()"},{"p":"maniplib.utils","c":"PIDControlType.ControlType","l":"values()"},{"p":"maniplib.utils","c":"PIDControlType.ControlType","l":"VELOCITY"}];updateSearchResults();
\ No newline at end of file
+memberSearchIndex = [{"p":"maniplib","c":"ManipArm","l":"addAbsoluteEncoderValue(double)"},{"p":"maniplib","c":"ManipElevator","l":"addAbsoluteEncoderValue(double)"},{"p":"maniplib","c":"ManipArm","l":"addFollower(ManipMotor, boolean)","u":"addFollower(maniplib.motors.ManipMotor,boolean)"},{"p":"maniplib","c":"ManipElevator","l":"addFollower(ManipMotor, boolean)","u":"addFollower(maniplib.motors.ManipMotor,boolean)"},{"p":"maniplib","c":"ManipShooterIntake","l":"addFollower(ManipMotor, boolean)","u":"addFollower(maniplib.motors.ManipMotor,boolean)"},{"p":"maniplib.utils","c":"ManipMath.Arm","l":"Arm()","u":"%3Cinit%3E()"},{"p":"maniplib","c":"ManipElevator","l":"atHeight(double, double)","u":"atHeight(double,double)"},{"p":"maniplib","c":"ManipArm","l":"autoStowWithOverride(double)"},{"p":"maniplib","c":"ManipElevator","l":"autoStowWithOverride(double)"},{"p":"maniplib.motors","c":"ManipMotor","l":"burnFlash()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"burnFlash()"},{"p":"maniplib.motors","c":"ManipMotor","l":"clearStickyFaults()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"clearStickyFaults()"},{"p":"maniplib.motors","c":"ManipMotor","l":"configureMotor(int, double, boolean, boolean)","u":"configureMotor(int,double,boolean,boolean)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"configureMotor(int, double, boolean, boolean)","u":"configureMotor(int,double,boolean,boolean)"},{"p":"maniplib.motors","c":"ManipMotor","l":"configurePIDF(PIDFConfig)","u":"configurePIDF(maniplib.utils.PIDFConfig)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"configurePIDF(PIDFConfig)","u":"configurePIDF(maniplib.utils.PIDFConfig)"},{"p":"maniplib.motors","c":"ManipMotor","l":"configurePIDWrapping(double, double)","u":"configurePIDWrapping(double,double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"configurePIDWrapping(double, double)","u":"configurePIDWrapping(double,double)"},{"p":"maniplib.utils","c":"PIDControlType","l":"controlType"},{"p":"maniplib.utils","c":"ManipMath.Arm","l":"convertAngleToSensorUnits(double, Angle)","u":"convertAngleToSensorUnits(double,edu.wpi.first.units.measure.Angle)"},{"p":"maniplib.utils","c":"ManipMath.Elevator","l":"convertDistanceToRotations(double, double, Distance)","u":"convertDistanceToRotations(double,double,edu.wpi.first.units.measure.Distance)"},{"p":"maniplib.utils","c":"ManipMath.Elevator","l":"convertRotationsToDistance(double, double, Angle)","u":"convertRotationsToDistance(double,double,edu.wpi.first.units.measure.Angle)"},{"p":"maniplib.utils","c":"ManipMath.Arm","l":"convertSensorUnitsToAngle(double, Angle)","u":"convertSensorUnitsToAngle(double,edu.wpi.first.units.measure.Angle)"},{"p":"maniplib.utils","c":"PIDFConfig","l":"createPIDController()"},{"p":"maniplib.utils","c":"PIDFConfig","l":"d"},{"p":"maniplib.utils","c":"ManipMath.Elevator","l":"Elevator()","u":"%3Cinit%3E()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"encoder"},{"p":"maniplib.utils","c":"PIDFConfig","l":"f"},{"p":"maniplib.motors","c":"ManipMotor","l":"factoryDefaults()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"factoryDefaults()"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"gearbox"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"gearbox"},{"p":"maniplib","c":"ManipArm","l":"getAngle()"},{"p":"maniplib.motors","c":"ManipMotor","l":"getAppliedOutput()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getAppliedOutput()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getConfig()"},{"p":"maniplib","c":"ManipElevator","l":"getHeightMeters()"},{"p":"maniplib","c":"ManipElevator","l":"getLinearPosition()"},{"p":"maniplib","c":"ManipElevator","l":"getLinearVelocity()"},{"p":"maniplib","c":"ManipArm","l":"getMechAngle()"},{"p":"maniplib","c":"ManipElevator","l":"getMechLength()"},{"p":"maniplib.motors","c":"ManipMotor","l":"getMotor()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getMotor()"},{"p":"maniplib.motors","c":"ManipMotor","l":"getMotorID()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getMotorID()"},{"p":"maniplib.motors","c":"ManipMotor","l":"getPosition()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getPosition()"},{"p":"maniplib.motors","c":"ManipMotor","l":"getRioController()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getRioController()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getSparkController()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getSparkMax()"},{"p":"maniplib","c":"ManipArm","l":"getVelocity()"},{"p":"maniplib.motors","c":"ManipMotor","l":"getVelocity()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getVelocity()"},{"p":"maniplib","c":"ManipElevator","l":"getVelocityMetersPerSecond()"},{"p":"maniplib.motors","c":"ManipMotor","l":"getVoltage()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"getVoltage()"},{"p":"maniplib","c":"Telemetry.ManipTelemetry","l":"HIGH"},{"p":"maniplib.utils","c":"PIDFConfig","l":"i"},{"p":"maniplib.motors","c":"ManipMotor","l":"iterateCTRESim()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"iterateCTRESim()"},{"p":"maniplib.motors","c":"ManipMotor","l":"iterateRevSim(double, double, double)","u":"iterateRevSim(double,double,double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"iterateRevSim(double, double, double)","u":"iterateRevSim(double,double,double)"},{"p":"maniplib.utils","c":"PIDFConfig","l":"iz"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kAbsEncoderOffset"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmAllowedClosedLoopError"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmInverted"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmKa"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmKd"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmkG"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmKi"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmKp"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmkS"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmKv"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmLength"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmMass"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmMaxAccelerationRPMperSecond"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmMaxVelocityRPM"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmOffsetToHorizantalZero"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmRampRate"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmReduction"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmStallCurrentLimitAmps"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kArmStartingAngle"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorCarriageMass"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorCurrentLimit"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorDrumRadius"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorGearing"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorkA"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorKd"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorkG"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorKi"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorKp"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorkS"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorkV"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kElevatorRampRate"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kEnableAdvanced"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kEnableAdvanced"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kIsInverted"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kMaxAcceleration"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kMaxAngle"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kMaxHeight"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kMaxVelocity"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"kMinAngle"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kMinHeight"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"kStartingHeightSim"},{"p":"maniplib","c":"Telemetry.ManipTelemetry","l":"LOW"},{"p":"maniplib","c":"ManipArm","l":"ManipArm(ManipMotor)","u":"%3Cinit%3E(maniplib.motors.ManipMotor)"},{"p":"maniplib","c":"ManipArm","l":"ManipArm(ManipMotor, ManipArmConstants)","u":"%3Cinit%3E(maniplib.motors.ManipMotor,maniplib.utils.ManipArmConstants)"},{"p":"maniplib","c":"ManipArm","l":"ManipArm(ManipMotor, PIDFConfig)","u":"%3Cinit%3E(maniplib.motors.ManipMotor,maniplib.utils.PIDFConfig)"},{"p":"maniplib.utils","c":"ManipArmConstants","l":"ManipArmConstants(DCMotor, double, double, double, double, double, double, double, double, double, double, double, double, double, boolean, double, double, double, int, double, double, boolean)","u":"%3Cinit%3E(edu.wpi.first.math.system.plant.DCMotor,double,double,double,double,double,double,double,double,double,double,double,double,double,boolean,double,double,double,int,double,double,boolean)"},{"p":"maniplib","c":"ManipElevator","l":"ManipElevator(ManipMotor)","u":"%3Cinit%3E(maniplib.motors.ManipMotor)"},{"p":"maniplib","c":"ManipElevator","l":"ManipElevator(ManipMotor, ManipElevatorConstants)","u":"%3Cinit%3E(maniplib.motors.ManipMotor,maniplib.utils.ManipElevatorConstants)"},{"p":"maniplib","c":"ManipElevator","l":"ManipElevator(ManipMotor, PIDFConfig)","u":"%3Cinit%3E(maniplib.motors.ManipMotor,maniplib.utils.PIDFConfig)"},{"p":"maniplib.utils","c":"ManipElevatorConstants","l":"ManipElevatorConstants(DCMotor, double, double, double, double, double, double, double, double, double, double, double, double, double, boolean, double, int, double, double, double, boolean)","u":"%3Cinit%3E(edu.wpi.first.math.system.plant.DCMotor,double,double,double,double,double,double,double,double,double,double,double,double,double,boolean,double,int,double,double,double,boolean)"},{"p":"maniplib.utils","c":"ManipMath","l":"ManipMath()","u":"%3Cinit%3E()"},{"p":"maniplib.motors","c":"ManipMotor","l":"ManipMotor()","u":"%3Cinit%3E()"},{"p":"maniplib","c":"ManipShooterIntake","l":"ManipShooterIntake(ManipMotor)","u":"%3Cinit%3E(maniplib.motors.ManipMotor)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"ManipSparkMax(int)","u":"%3Cinit%3E(int)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"ManipSparkMax(SparkMax)","u":"%3Cinit%3E(com.revrobotics.spark.SparkMax)"},{"p":"maniplib","c":"Telemetry","l":"manipVerbosity"},{"p":"maniplib.utils.deserializer","c":"PIDFRange","l":"max"},{"p":"maniplib.motors","c":"ManipMotor","l":"maximumRetries"},{"p":"maniplib.utils.deserializer","c":"PIDFRange","l":"min"},{"p":"maniplib","c":"ManipArm","l":"nearMax(double)"},{"p":"maniplib","c":"ManipElevator","l":"nearMax(double)"},{"p":"maniplib","c":"ManipArm","l":"nearMin(double)"},{"p":"maniplib","c":"ManipElevator","l":"nearMin(double)"},{"p":"maniplib","c":"Telemetry.ManipTelemetry","l":"NONE"},{"p":"maniplib.utils","c":"PIDFConfig","l":"output"},{"p":"maniplib.utils","c":"PIDFConfig","l":"p"},{"p":"maniplib","c":"ManipArm","l":"periodic()"},{"p":"maniplib","c":"ManipElevator","l":"periodic()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"pid"},{"p":"maniplib.utils","c":"PIDControlType","l":"PIDControlType()","u":"%3Cinit%3E()"},{"p":"maniplib.utils","c":"PIDFConfig","l":"PIDFConfig()","u":"%3Cinit%3E()"},{"p":"maniplib.utils","c":"PIDFConfig","l":"PIDFConfig(double, double)","u":"%3Cinit%3E(double,double)"},{"p":"maniplib.utils","c":"PIDFConfig","l":"PIDFConfig(double, double, double)","u":"%3Cinit%3E(double,double,double)"},{"p":"maniplib.utils","c":"PIDFConfig","l":"PIDFConfig(double, double, double, double)","u":"%3Cinit%3E(double,double,double,double)"},{"p":"maniplib.utils","c":"PIDFConfig","l":"PIDFConfig(double, double, double, double, double)","u":"%3Cinit%3E(double,double,double,double,double)"},{"p":"maniplib.utils.deserializer","c":"PIDFRange","l":"PIDFRange()","u":"%3Cinit%3E()"},{"p":"maniplib.utils","c":"PIDControlType.ControlType","l":"POSITION"},{"p":"maniplib","c":"ManipArm","l":"reachSetpoint(double)"},{"p":"maniplib","c":"ManipElevator","l":"reachSetpoint(double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"rioPID"},{"p":"maniplib","c":"ManipArm","l":"runArmSpeed(double)"},{"p":"maniplib","c":"ManipArm","l":"runArmSpeedCommand(double)"},{"p":"maniplib","c":"ManipArm","l":"runArmVoltage(Voltage)","u":"runArmVoltage(edu.wpi.first.units.measure.Voltage)"},{"p":"maniplib","c":"ManipArm","l":"runArmVoltageCommand(Voltage)","u":"runArmVoltageCommand(edu.wpi.first.units.measure.Voltage)"},{"p":"maniplib","c":"ManipElevator","l":"runElevatorSpeed(double)"},{"p":"maniplib","c":"ManipElevator","l":"runElevatorSpeedCommand(double)"},{"p":"maniplib","c":"ManipElevator","l":"runElevatorVoltage(Voltage)","u":"runElevatorVoltage(edu.wpi.first.units.measure.Voltage)"},{"p":"maniplib","c":"ManipElevator","l":"runElevatorVoltageCommand(Voltage)","u":"runElevatorVoltageCommand(edu.wpi.first.units.measure.Voltage)"},{"p":"maniplib","c":"ManipArm","l":"runkG()"},{"p":"maniplib","c":"ManipElevator","l":"runkG()"},{"p":"maniplib","c":"ManipArm","l":"runkGCommand()"},{"p":"maniplib","c":"ManipElevator","l":"runkGCommand()"},{"p":"maniplib","c":"ManipShooterIntake","l":"runSpeed(double)"},{"p":"maniplib","c":"ManipShooterIntake","l":"runSpeedCommand(double)"},{"p":"maniplib","c":"ManipArm","l":"runSysIdRoutine()"},{"p":"maniplib","c":"ManipElevator","l":"runSysIdRoutine()"},{"p":"maniplib","c":"ManipShooterIntake","l":"runVoltage(double)"},{"p":"maniplib","c":"ManipShooterIntake","l":"runVoltageCommand(double)"},{"p":"maniplib.motors","c":"ManipMotor","l":"set(double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"set(double)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setAsFollower(ManipMotor, Boolean)","u":"setAsFollower(maniplib.motors.ManipMotor,java.lang.Boolean)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setAsFollower(ManipMotor, Boolean)","u":"setAsFollower(maniplib.motors.ManipMotor,java.lang.Boolean)"},{"p":"maniplib","c":"ManipArm","l":"setAutoStow(boolean)"},{"p":"maniplib","c":"ManipElevator","l":"setAutoStow(boolean)"},{"p":"maniplib","c":"ManipArm","l":"setBottomLimitSwitch(boolean)"},{"p":"maniplib","c":"ManipElevator","l":"setBottomLimitSwitch(boolean)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setCurrentLimit(int)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setCurrentLimit(int)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setGearbox(DCMotor)","u":"setGearbox(edu.wpi.first.math.system.plant.DCMotor)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setGearbox(DCMotor)","u":"setGearbox(edu.wpi.first.math.system.plant.DCMotor)"},{"p":"maniplib","c":"ManipArm","l":"setGoal(double)"},{"p":"maniplib","c":"ManipElevator","l":"setGoal(double)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setInverted(boolean)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setInverted(boolean)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setLoopRampRate(double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setLoopRampRate(double)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setMotorBrake(boolean)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setMotorBrake(boolean)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setPIDControlType(PIDControlType.ControlType)","u":"setPIDControlType(maniplib.utils.PIDControlType.ControlType)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setPIDControlType(PIDControlType.ControlType)","u":"setPIDControlType(maniplib.utils.PIDControlType.ControlType)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setPosition(double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setPosition(double)"},{"p":"maniplib","c":"ManipShooterIntake","l":"setReference(double)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setReference(double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setReference(double)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setReference(double, double)","u":"setReference(double,double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setReference(double, double)","u":"setReference(double,double)"},{"p":"maniplib","c":"ManipArm","l":"setSyncAbsEncoderInit(boolean)"},{"p":"maniplib","c":"ManipElevator","l":"setSyncAbsEncoderInit(boolean)"},{"p":"maniplib","c":"ManipArm","l":"setTopLimitSwitch(boolean)"},{"p":"maniplib","c":"ManipElevator","l":"setTopLimitSwitch(boolean)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setupRioPID(PIDFConfig, double, double, double, boolean)","u":"setupRioPID(maniplib.utils.PIDFConfig,double,double,double,boolean)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setupRioPID(PIDFConfig, double, double, double, boolean)","u":"setupRioPID(maniplib.utils.PIDFConfig,double,double,double,boolean)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setVelocity(double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setVelocity(double)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setVoltage(double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setVoltage(double)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setVoltage(Voltage)","u":"setVoltage(edu.wpi.first.units.measure.Voltage)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setVoltage(Voltage)","u":"setVoltage(edu.wpi.first.units.measure.Voltage)"},{"p":"maniplib.motors","c":"ManipMotor","l":"setVoltageCompensation(double)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"setVoltageCompensation(double)"},{"p":"maniplib","c":"ManipArm","l":"simulationPeriodic()"},{"p":"maniplib","c":"ManipElevator","l":"simulationPeriodic()"},{"p":"maniplib","c":"ManipArm","l":"stopArm()"},{"p":"maniplib","c":"ManipElevator","l":"stopElevator()"},{"p":"maniplib.motors","c":"ManipMotor","l":"stopMotor()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"stopMotor()"},{"p":"maniplib.motors","c":"ManipMotor","l":"stopMotorCommand()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"stopMotorCommand()"},{"p":"maniplib","c":"ManipShooterIntake","l":"stopShooter()"},{"p":"maniplib","c":"ManipShooterIntake","l":"stopShooterCommand()"},{"p":"maniplib","c":"ManipArm","l":"synchronizeAbsoluteEncoder()"},{"p":"maniplib","c":"ManipElevator","l":"synchronizeAbsoluteEncoder()"},{"p":"maniplib","c":"Telemetry","l":"Telemetry()","u":"%3Cinit%3E()"},{"p":"maniplib","c":"ManipArm","l":"toggleAutoStow()"},{"p":"maniplib","c":"ManipElevator","l":"toggleAutoStow()"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"updateConfig(SparkMaxConfig)","u":"updateConfig(com.revrobotics.spark.config.SparkMaxConfig)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"useRioPID"},{"p":"maniplib.motors","c":"ManipMotor","l":"useRioPID(boolean)"},{"p":"maniplib.motors","c":"ManipSparkMax","l":"useRioPID(boolean)"},{"p":"maniplib","c":"Telemetry.ManipTelemetry","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"maniplib.utils","c":"PIDControlType.ControlType","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"maniplib","c":"Telemetry.ManipTelemetry","l":"values()"},{"p":"maniplib.utils","c":"PIDControlType.ControlType","l":"values()"},{"p":"maniplib.utils","c":"PIDControlType.ControlType","l":"VELOCITY"}];updateSearchResults();
\ No newline at end of file
diff --git a/maniplib/maniplib.json b/maniplib/maniplib.json
index 0672f93..ec2fc29 100644
--- a/maniplib/maniplib.json
+++ b/maniplib/maniplib.json
@@ -1,7 +1,7 @@
{
- "fileName": "maniplib-2025.0.0-beta0.5.4.json",
+ "fileName": "maniplib-2025.0.0-beta0.5.5.json",
"name": "ManipLib",
- "version": "2025.0.0-beta0.5.4",
+ "version": "2025.0.0-beta0.5.5",
"frcYear": "2025",
"uuid": "67953b3f-32a5-41cf-84d7-2f6989d3d38d",
"mavenUrls": [
@@ -12,7 +12,7 @@
{
"groupId": "maniplib",
"artifactId": "ManipLib-java",
- "version": "2025.0.0-beta0.5.4"
+ "version": "2025.0.0-beta0.5.5"
}
],
"requires": [
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-headers.zip b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-headers.zip
new file mode 100644
index 0000000..8b39308
Binary files /dev/null and b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-headers.zip differ
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-headers.zip.md5 b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-headers.zip.md5
new file mode 100644
index 0000000..652194a
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-headers.zip.md5
@@ -0,0 +1 @@
+a884767781648034695405bfd16808eb
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-headers.zip.sha1 b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-headers.zip.sha1
new file mode 100644
index 0000000..5ed6adb
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-headers.zip.sha1
@@ -0,0 +1 @@
+0938e82b7149a828fc2938f60c050b3c7362ed9b
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-headers.zip.sha256 b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-headers.zip.sha256
new file mode 100644
index 0000000..bbfa2c5
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-headers.zip.sha256
@@ -0,0 +1 @@
+273f0a84075bd10e72f425a3b5fd1eb6b3fb86c606ac52d71af991d5a396fb43
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-headers.zip.sha512 b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-headers.zip.sha512
new file mode 100644
index 0000000..5f879e1
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-headers.zip.sha512
@@ -0,0 +1 @@
+876f5ad34c4432a53d94b9d966485841babf8513dc17b812b5332de392b0d6e3641928ffcf5b0a79e777ac15bf64ed94d5def88a7fd581d2ca4720295d8c7a08
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-sources.zip b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-sources.zip
new file mode 100644
index 0000000..8b39308
Binary files /dev/null and b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-sources.zip differ
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-sources.zip.md5 b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-sources.zip.md5
new file mode 100644
index 0000000..652194a
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-sources.zip.md5
@@ -0,0 +1 @@
+a884767781648034695405bfd16808eb
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-sources.zip.sha1 b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-sources.zip.sha1
new file mode 100644
index 0000000..5ed6adb
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-sources.zip.sha1
@@ -0,0 +1 @@
+0938e82b7149a828fc2938f60c050b3c7362ed9b
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-sources.zip.sha256 b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-sources.zip.sha256
new file mode 100644
index 0000000..bbfa2c5
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-sources.zip.sha256
@@ -0,0 +1 @@
+273f0a84075bd10e72f425a3b5fd1eb6b3fb86c606ac52d71af991d5a396fb43
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-sources.zip.sha512 b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-sources.zip.sha512
new file mode 100644
index 0000000..5f879e1
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5-sources.zip.sha512
@@ -0,0 +1 @@
+876f5ad34c4432a53d94b9d966485841babf8513dc17b812b5332de392b0d6e3641928ffcf5b0a79e777ac15bf64ed94d5def88a7fd581d2ca4720295d8c7a08
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5.pom b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5.pom
new file mode 100644
index 0000000..e636884
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5.pom
@@ -0,0 +1,9 @@
+
+
+ 4.0.0
+ maniplib
+ ManipLib-cpp
+ 2025.0.0-beta0.5.5
+ pom
+
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5.pom.md5 b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5.pom.md5
new file mode 100644
index 0000000..c07d541
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5.pom.md5
@@ -0,0 +1 @@
+7b94d22f9c0727bc40cf51e71d9551a4
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5.pom.sha1 b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5.pom.sha1
new file mode 100644
index 0000000..c79b0fb
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5.pom.sha1
@@ -0,0 +1 @@
+4f5c6c735a1cbfe1ba69b70486404584b97939b4
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5.pom.sha256 b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5.pom.sha256
new file mode 100644
index 0000000..d91ce81
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5.pom.sha256
@@ -0,0 +1 @@
+98c4333c8f66db39c868b3e60a5d92ae55fc1c86b98860d32d3149088b1a09d8
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5.pom.sha512 b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5.pom.sha512
new file mode 100644
index 0000000..540a3d2
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-cpp/2025.0.0-beta0.5.5/ManipLib-cpp-2025.0.0-beta0.5.5.pom.sha512
@@ -0,0 +1 @@
+3dd04d0ab3023c7794e34f850e51e3c8f7aa81de25db4c70cd620a843dee08cf7b39fb3d7796024dda10000c818a744f66225b7f9bb1e0e9359392af265a4fb3
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml b/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml
index 8697dd5..5f10882 100644
--- a/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml
+++ b/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml
@@ -3,8 +3,8 @@
maniplib
ManipLib-cpp
- 2025.0.0-beta0.5.4
- 2025.0.0-beta0.5.4
+ 2025.0.0-beta0.5.5
+ 2025.0.0-beta0.5.5
test
2025.0.0-beta0
@@ -17,7 +17,8 @@
2025.0.0-beta0.5.2
2025.0.0-beta0.5.3
2025.0.0-beta0.5.4
+ 2025.0.0-beta0.5.5
- 20250301012854
+ 20250302150604
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml.md5 b/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml.md5
index 725bb4c..c4b0e51 100644
--- a/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml.md5
+++ b/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml.md5
@@ -1 +1 @@
-52e350d021b4f393d2fa755b91b91cc1
\ No newline at end of file
+0260e19efacdfd6f1e528a4a504c7818
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml.sha1 b/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml.sha1
index 6d3d1f2..5f901b6 100644
--- a/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml.sha1
+++ b/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml.sha1
@@ -1 +1 @@
-e9f9173b274dfab25bc0cda8f632679f1004f1b1
\ No newline at end of file
+bbab56b8683e91acd82a594d57280fd52778da9c
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml.sha256 b/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml.sha256
index d06d2df..688d4e8 100644
--- a/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml.sha256
+++ b/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml.sha256
@@ -1 +1 @@
-7d92b039a67b03b50b954fc9dc747517c975358a2eb88f63bc173cdf7c7120d6
\ No newline at end of file
+355fb6fc06bd323f1aea9df9c0927679e37277583c8769ce40917a4bf32aea3d
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml.sha512 b/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml.sha512
index b826472..8fd043f 100644
--- a/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml.sha512
+++ b/maniplib/repos/maniplib/ManipLib-cpp/maven-metadata.xml.sha512
@@ -1 +1 @@
-175eb3c5bf034143b0656a06550e4944528d3911b904f0889f046658660536d259aab694ee73d224ad339c50c8575d12c4275789b6b25a778d9a2c173f5683a3
\ No newline at end of file
+b44f716852408cbfe6e5e1b0e61a6af8f420fdb6c11031f76ac42e8eeb5e9e48d351c7ba90c6a4b0d7933ba5aeae200f2b53391310dbbaff11cfc1895accb22f
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar
index c30414f..418f06f 100644
Binary files a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar and b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar differ
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar.md5 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar.md5
index 53acdf1..d5a9d96 100644
--- a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar.md5
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar.md5
@@ -1 +1 @@
-95813d2055a41c79fdc9edb3aec1cd36
\ No newline at end of file
+ac8277cd8947f9b50069716614519ae0
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar.sha1 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar.sha1
index d6857ce..e3bc954 100644
--- a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar.sha1
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar.sha1
@@ -1 +1 @@
-b96fabb961da8ed1fe639590e3c1cca126df3401
\ No newline at end of file
+88908f3dd017dd5053869821153c350b61e8a0c4
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar.sha256 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar.sha256
index 2b16ac9..b7b071d 100644
--- a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar.sha256
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar.sha256
@@ -1 +1 @@
-4197e2c87ef59b7f13c913d3e7c691c2169a46b1c4ccd48ad2e7895325e15f6b
\ No newline at end of file
+1996c7d7dffb1eb8fbfe9a590b55ea95d4199b7502b54636f739a31981bb0d81
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar.sha512 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar.sha512
index 84069c3..b96f082 100644
--- a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar.sha512
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-javadoc.jar.sha512
@@ -1 +1 @@
-d5bf51bc783df51ff66e65148f5e0084bc8ecd170e4b904376215c1eeaf78f88be562d97b529279ca875ae98c422b3ba94dfd2987514698d0005ae2f1966b31d
\ No newline at end of file
+4b267a6f73fd73cfe31f23b033fef3ba42ff63acc52de7b1424cf3a3206bdcf5dee4ecae821bd948a1a044719aea55aa2647c58aea8c878c2a6e34a6f231e61c
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar
index e84bafd..bd03433 100644
Binary files a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar and b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar differ
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar.md5 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar.md5
index 2cb8bc2..e64d061 100644
--- a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar.md5
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar.md5
@@ -1 +1 @@
-286da4c30203635b0a97adca5b61705f
\ No newline at end of file
+83c1fa68b65772d457d0bf80121deb8f
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar.sha1 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar.sha1
index af03bb3..08e295b 100644
--- a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar.sha1
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar.sha1
@@ -1 +1 @@
-201f9d767084b6e67e216d09051c6acd62bb10e7
\ No newline at end of file
+e2cb0b0c201dbbdfc4d23d3b0877ee982a6d55fc
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar.sha256 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar.sha256
index ccbb1c1..9c281cc 100644
--- a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar.sha256
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar.sha256
@@ -1 +1 @@
-7755768f3fcd41e8af201cc1533674e407026c03415d556f06a7cc9eec33ac83
\ No newline at end of file
+76f54fff7578906b80b4b5629cfa944de05491e809e303780a64c15c63ac1754
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar.sha512 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar.sha512
index 44aadf0..5a85ccc 100644
--- a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar.sha512
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4-sources.jar.sha512
@@ -1 +1 @@
-06b2f848099cf8267127717847aa67e6fa252717fd679e034816e435d9a9baffeedf92e7af3b5c1e491b4d5d094ab2b68db4f7b3380c4e1933511cf4e9d69aa8
\ No newline at end of file
+bfc71db8405a32ee43652ac2d75f4ec4be51e242d6fa7cab078c46d2fa9c223a8716306c8ab95b40a4704ae28fec5bef8f7d1d5428293d067367a3796642783c
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar
index 987d656..db8691a 100644
Binary files a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar and b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar differ
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar.md5 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar.md5
index 1d2ed0e..df3aab3 100644
--- a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar.md5
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar.md5
@@ -1 +1 @@
-2bc41da2a8539e050f9b31b73aab741e
\ No newline at end of file
+ce2d79bb2fc5cc5bc33b51052b923261
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar.sha1 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar.sha1
index f8a1693..382293a 100644
--- a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar.sha1
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar.sha1
@@ -1 +1 @@
-32a21123a89d8718f246ee00ef42397c56244bf0
\ No newline at end of file
+04e7aadf33a93f4bff45232b8ab18f18d5d2ad89
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar.sha256 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar.sha256
index 2fdc92b..cb176e9 100644
--- a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar.sha256
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar.sha256
@@ -1 +1 @@
-cc17e56a068ea4d2668a9ee88bef6a1d7f66342246e5931c5c23bf6ea3a8c149
\ No newline at end of file
+0ab51b13af11c5fdff70c75806a7192f3e1f305111b8fd89b871e4a1c47758e8
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar.sha512 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar.sha512
index 4449166..4787d8c 100644
--- a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar.sha512
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.4/ManipLib-java-2025.0.0-beta0.5.4.jar.sha512
@@ -1 +1 @@
-d02f8d0068ec1434f34d4338cbd2b823bbd3df81d0a80d1a9e9d4e1a43bafdde94615a906aab004862dfc46e4544ea51d8ae37a1fef0241705b48de40e9d713e
\ No newline at end of file
+ef3ad4a99ec7c5a926893b6baaa624b47458727a2bd04375dee05db45f431230358625366d58a301d03c999c598e5f392c5b3f6523d282212a23b8991bddcc0d
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-javadoc.jar b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-javadoc.jar
new file mode 100644
index 0000000..418f06f
Binary files /dev/null and b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-javadoc.jar differ
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-javadoc.jar.md5 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-javadoc.jar.md5
new file mode 100644
index 0000000..d5a9d96
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-javadoc.jar.md5
@@ -0,0 +1 @@
+ac8277cd8947f9b50069716614519ae0
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-javadoc.jar.sha1 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-javadoc.jar.sha1
new file mode 100644
index 0000000..e3bc954
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-javadoc.jar.sha1
@@ -0,0 +1 @@
+88908f3dd017dd5053869821153c350b61e8a0c4
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-javadoc.jar.sha256 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-javadoc.jar.sha256
new file mode 100644
index 0000000..b7b071d
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-javadoc.jar.sha256
@@ -0,0 +1 @@
+1996c7d7dffb1eb8fbfe9a590b55ea95d4199b7502b54636f739a31981bb0d81
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-javadoc.jar.sha512 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-javadoc.jar.sha512
new file mode 100644
index 0000000..b96f082
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-javadoc.jar.sha512
@@ -0,0 +1 @@
+4b267a6f73fd73cfe31f23b033fef3ba42ff63acc52de7b1424cf3a3206bdcf5dee4ecae821bd948a1a044719aea55aa2647c58aea8c878c2a6e34a6f231e61c
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-sources.jar b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-sources.jar
new file mode 100644
index 0000000..bd03433
Binary files /dev/null and b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-sources.jar differ
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-sources.jar.md5 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-sources.jar.md5
new file mode 100644
index 0000000..e64d061
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-sources.jar.md5
@@ -0,0 +1 @@
+83c1fa68b65772d457d0bf80121deb8f
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-sources.jar.sha1 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-sources.jar.sha1
new file mode 100644
index 0000000..08e295b
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-sources.jar.sha1
@@ -0,0 +1 @@
+e2cb0b0c201dbbdfc4d23d3b0877ee982a6d55fc
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-sources.jar.sha256 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-sources.jar.sha256
new file mode 100644
index 0000000..9c281cc
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-sources.jar.sha256
@@ -0,0 +1 @@
+76f54fff7578906b80b4b5629cfa944de05491e809e303780a64c15c63ac1754
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-sources.jar.sha512 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-sources.jar.sha512
new file mode 100644
index 0000000..5a85ccc
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5-sources.jar.sha512
@@ -0,0 +1 @@
+bfc71db8405a32ee43652ac2d75f4ec4be51e242d6fa7cab078c46d2fa9c223a8716306c8ab95b40a4704ae28fec5bef8f7d1d5428293d067367a3796642783c
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.jar b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.jar
new file mode 100644
index 0000000..db8691a
Binary files /dev/null and b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.jar differ
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.jar.md5 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.jar.md5
new file mode 100644
index 0000000..df3aab3
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.jar.md5
@@ -0,0 +1 @@
+ce2d79bb2fc5cc5bc33b51052b923261
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.jar.sha1 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.jar.sha1
new file mode 100644
index 0000000..382293a
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.jar.sha1
@@ -0,0 +1 @@
+04e7aadf33a93f4bff45232b8ab18f18d5d2ad89
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.jar.sha256 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.jar.sha256
new file mode 100644
index 0000000..cb176e9
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.jar.sha256
@@ -0,0 +1 @@
+0ab51b13af11c5fdff70c75806a7192f3e1f305111b8fd89b871e4a1c47758e8
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.jar.sha512 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.jar.sha512
new file mode 100644
index 0000000..4787d8c
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.jar.sha512
@@ -0,0 +1 @@
+ef3ad4a99ec7c5a926893b6baaa624b47458727a2bd04375dee05db45f431230358625366d58a301d03c999c598e5f392c5b3f6523d282212a23b8991bddcc0d
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.pom b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.pom
new file mode 100644
index 0000000..23236a8
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.pom
@@ -0,0 +1,8 @@
+
+
+ 4.0.0
+ maniplib
+ ManipLib-java
+ 2025.0.0-beta0.5.5
+
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.pom.md5 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.pom.md5
new file mode 100644
index 0000000..f47af87
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.pom.md5
@@ -0,0 +1 @@
+dbe203c8fbd742daea430570e801cb5d
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.pom.sha1 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.pom.sha1
new file mode 100644
index 0000000..1bc2182
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.pom.sha1
@@ -0,0 +1 @@
+3d4cbcfe7fe128035b01d8ba7bcaf3aa4e71d629
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.pom.sha256 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.pom.sha256
new file mode 100644
index 0000000..d51a5fb
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.pom.sha256
@@ -0,0 +1 @@
+d772dd007e5280b395495358e3a60efde7e761930448ac9757f19df62bdf51e5
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.pom.sha512 b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.pom.sha512
new file mode 100644
index 0000000..cbac526
--- /dev/null
+++ b/maniplib/repos/maniplib/ManipLib-java/2025.0.0-beta0.5.5/ManipLib-java-2025.0.0-beta0.5.5.pom.sha512
@@ -0,0 +1 @@
+d291ded4f4cb5159a59beab6b57357caaa5b67afd3333eeccc512409e6391ea00a7346527620d33b8223736019b449e9154d5807479d0df7e9f1fc4d8301952d
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml b/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml
index 5718b8d..8ff007b 100644
--- a/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml
+++ b/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml
@@ -3,8 +3,8 @@
maniplib
ManipLib-java
- 2025.0.0-beta0.5.4
- 2025.0.0-beta0.5.4
+ 2025.0.0-beta0.5.5
+ 2025.0.0-beta0.5.5
2025.0.0-unreleased
test
@@ -18,7 +18,8 @@
2025.0.0-beta0.5.2
2025.0.0-beta0.5.3
2025.0.0-beta0.5.4
+ 2025.0.0-beta0.5.5
- 20250301012855
+ 20250302150604
diff --git a/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml.md5 b/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml.md5
index 127880d..9a8b74f 100644
--- a/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml.md5
+++ b/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml.md5
@@ -1 +1 @@
-5fe9207667a44990ba78af0cfb62501d
\ No newline at end of file
+ee74021674753697e52729e0ff8ab3dc
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml.sha1 b/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml.sha1
index d212568..f37657d 100644
--- a/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml.sha1
+++ b/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml.sha1
@@ -1 +1 @@
-2d60a23979cd8d5f227e93289e82e1dda8b46db0
\ No newline at end of file
+f1d672b8a10b523664e890f323467013bc99492a
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml.sha256 b/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml.sha256
index 1571459..4b7cbcd 100644
--- a/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml.sha256
+++ b/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml.sha256
@@ -1 +1 @@
-04ca7b53a2dd90854d4f84c67211cd5cdd35ad3ccd82e6d27b20dafb2604a5c0
\ No newline at end of file
+46ddc9a267c34755e76f679d0080b92eef4c81c6e2c2c7801c1dd2873105bdc0
\ No newline at end of file
diff --git a/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml.sha512 b/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml.sha512
index a6a77fc..cb873c3 100644
--- a/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml.sha512
+++ b/maniplib/repos/maniplib/ManipLib-java/maven-metadata.xml.sha512
@@ -1 +1 @@
-0ae243a6c62f6b619c4f499146fc8d6d1c0f3b326d2ee3d542d87afe33ca8d80657bae6853114d718995e37c8e09a69eb73af2639e26cac96a8f695a5260ebb0
\ No newline at end of file
+92233c7aeaf62f38eed214bb0e15d4709283b5b97abf9bae80d79c101788f6f91abf08707ebe9909509a75b964aba4a76f41d620f048e603b53a8379f849dbb6
\ No newline at end of file
diff --git a/publish.gradle b/publish.gradle
index d655a98..3cb183b 100644
--- a/publish.gradle
+++ b/publish.gradle
@@ -2,7 +2,7 @@ apply plugin: 'maven-publish'
ext.licenseFile = files("$rootDir/LICENSE.txt")
-def pubVersion = System.getenv("releaseVersion") ?: "2025.0.0-beta0.5.4"
+def pubVersion = System.getenv("releaseVersion") ?: "2025.0.0-beta0.5.5"
def releasesRepoUrl = "maniplib/repos/"
diff --git a/src/main/java/maniplib/ManipArm.java b/src/main/java/maniplib/ManipArm.java
index 87c6418..631abff 100644
--- a/src/main/java/maniplib/ManipArm.java
+++ b/src/main/java/maniplib/ManipArm.java
@@ -1,7 +1,5 @@
package maniplib;
-import static edu.wpi.first.units.Units.*;
-
import edu.wpi.first.math.controller.ArmFeedforward;
import edu.wpi.first.math.trajectory.TrapezoidProfile;
import edu.wpi.first.units.measure.*;
@@ -27,418 +25,464 @@
import maniplib.utils.ManipMath;
import maniplib.utils.PIDFConfig;
+import static edu.wpi.first.units.Units.*;
+
public class ManipArm extends SubsystemBase {
- // Mutable holders for unit-safe values, persisted to avoid reallocation.
- private final MutVoltage appliedVoltage = Volts.mutable(0);
- private final MutAngle angle = Rotations.mutable(0);
- private final MutAngularVelocity velocity = RPM.mutable(0);
- private final MutAngle absEncoderAngle = Rotations.mutable(0);
- // Mutable holder for a dimensionless value with no scaling. Should be clamped 0-1.
- // Triggers for when reaching max movements.
- private Trigger atMin;
- private Trigger atMax;
- private Trigger goingDown;
- private Trigger goingUp;
- // Booleans for limit switch functions.
- private boolean topLimitBoolean = false;
- private boolean bottomLimitBoolean = false;
- // Triggers for limit switch functions.
- private Trigger topLimit;
- private Trigger bottomLimit;
- // Various booleans to determine what to enable
- private boolean absSetup = false;
- private boolean isAdvancedEnabled = false;
- private boolean syncAbsEncoderInit = true;
- private boolean defaultCommandOverride = false;
- // Universal motor init
- private ManipMotor motor;
- private ArmFeedforward feedforward;
- private ManipArmConstants armConstants;
- // SysId Routine
- private SysIdRoutine sysIdRoutine;
- // Simulation class to help simulate what is going on, including gravity.
- private SingleJointedArmSim armSim;
- private Mechanism2d arm2d;
- // Mechanism for simulation, needs overridden for anything more than a basic arm.
- private MechanismLigament2d armMech;
-
- /**
- * Subsystem constructor, advanced {@link ManipArm} when config.kEnableAdvanced is set to true.
- */
- public ManipArm(ManipMotor motor, ManipArmConstants armConstants) {
-
- if (absSetup && syncAbsEncoderInit) {
- synchronizeAbsoluteEncoder();
+ // Mutable holders for unit-safe values, persisted to avoid reallocation.
+ private final MutVoltage appliedVoltage = Volts.mutable(0);
+ private final MutAngle angle = Rotations.mutable(0);
+ private final MutAngularVelocity velocity = RPM.mutable(0);
+ private final MutAngle absEncoderAngle = Rotations.mutable(0);
+ // Mutable holder for a dimensionless value with no scaling. Should be clamped 0-1.
+ // Triggers for when reaching max movements.
+ private Trigger atMin;
+ private Trigger atMax;
+ private Trigger goingDown;
+ private Trigger goingUp;
+ // Booleans for limit switch functions.
+ private boolean topLimitBoolean = false;
+ private boolean bottomLimitBoolean = false;
+ // Triggers for limit switch functions.
+ private Trigger topLimit;
+ private Trigger bottomLimit;
+ // Various booleans to determine what to enable
+ private boolean absSetup = false;
+ private boolean isAdvancedEnabled = false;
+ private boolean syncAbsEncoderInit = true;
+ private boolean defaultCommandOverride = false;
+ // Universal motor init
+ private ManipMotor motor;
+ private ArmFeedforward feedforward;
+ private ManipArmConstants armConstants;
+ // SysId Routine
+ private SysIdRoutine sysIdRoutine;
+ // Simulation class to help simulate what is going on, including gravity.
+ private SingleJointedArmSim armSim;
+ private Mechanism2d arm2d;
+ // Mechanism for simulation, needs overridden for anything more than a basic arm.
+ private MechanismLigament2d armMech;
+
+ /**
+ * Subsystem constructor, advanced {@link ManipArm} when config.kEnableAdvanced is set to true.
+ */
+ public ManipArm(ManipMotor motor, ManipArmConstants armConstants) {
+
+ if (absSetup && syncAbsEncoderInit) {
+ synchronizeAbsoluteEncoder();
+ }
+
+ if (!armConstants.kEnableAdvanced) {
+ new ManipArm(motor);
+ } else {
+ this.motor = motor;
+ this.armConstants = armConstants;
+ this.isAdvancedEnabled = true;
+
+ this.motor.configureMotor(
+ armConstants.kArmStallCurrentLimitAmps,
+ armConstants.kArmRampRate,
+ true,
+ armConstants.kArmInverted
+ );
+
+ this.topLimit = new Trigger(() -> topLimitBoolean);
+ this.bottomLimit = new Trigger(() -> bottomLimitBoolean);
+
+ this.atMin = new Trigger(() -> getAngle().isNear(this.armConstants.kMinAngle, Degrees.of(3)));
+ this.atMax = new Trigger(() -> getAngle().isNear(this.armConstants.kMaxAngle, Degrees.of(3)));
+ this.goingDown = new Trigger(() -> motor.getAppliedOutput() < 0);
+ this.goingUp = new Trigger(() -> motor.getAppliedOutput() > 0);
+
+ this.atMin.and(goingDown).or(topLimit).onTrue(run(this::stopArm));
+ this.atMax.and(goingUp).or(topLimit).onTrue(run(this::stopArm));
+
+ this.topLimit.onTrue(run(() ->
+ motor.setPosition((ManipMath.Arm.convertAngleToSensorUnits(
+ armConstants.kArmReduction,
+ armConstants.kMaxAngle)).in(Rotations))));
+ this.bottomLimit.onTrue(run(() ->
+ motor.setPosition((ManipMath.Arm.convertAngleToSensorUnits(
+ armConstants.kArmReduction,
+ armConstants.kMinAngle)).in(Rotations))));
+
+ this.motor.setGearbox(armConstants.gearbox);
+
+ this.motor.setupRioPID(
+ new PIDFConfig(armConstants.kArmKp,
+ armConstants.kArmKi,
+ armConstants.kArmKd),
+ armConstants.kArmMaxVelocityRPM,
+ armConstants.kArmMaxAccelerationRPMperSecond,
+ 0.01,
+ true
+ );
+
+
+ this.feedforward = new ArmFeedforward(
+ armConstants.kArmkS,
+ armConstants.kArmkG,
+ armConstants.kArmKv,
+ armConstants.kArmKa
+ );
+
+ this.sysIdRoutine = new SysIdRoutine(
+
+ new SysIdRoutine.Config(Volts.per(Second).of(1), Volts.of(6), Seconds.of(30)),
+ new SysIdRoutine.Mechanism(
+ this::runArmVoltage,
+ log -> {
+ // Record a frame for the arm motor.
+ log.motor("manipArm")
+ .voltage(appliedVoltage.mut_replace(motor.getAppliedOutput() *
+ RobotController.getBatteryVoltage(), Volts))
+ .angularPosition(angle.mut_replace(motor.getPosition(), Rotations))
+ .angularVelocity(velocity.mut_replace(motor.getVelocity(), RPM));
+ },
+ this));
+
+ this.armSim = new SingleJointedArmSim(
+ armConstants.gearbox,
+ armConstants.kArmReduction,
+ SingleJointedArmSim.estimateMOI(
+ armConstants.kArmLength,
+ armConstants.kArmMass),
+ armConstants.kArmLength,
+ armConstants.kMinAngle.in(Radians),
+ armConstants.kMaxAngle.in(Radians),
+ true,
+ armConstants.kArmStartingAngle.in(Radians),
+ 0.02 / 4096.0,
+ 0.0
+ );
+
+ // Mechanism 2d for simulation, needs overridden for anything more than a basic arm.
+ arm2d = new Mechanism2d(
+ armConstants.kArmLength * 2,
+ armConstants.kArmLength * 2
+ );
+
+ // Mechanism root for simulation, needs overridden for anything more than a basic arm.
+ MechanismRoot2d armRoot = arm2d.getRoot("ManipArm Root",
+ armConstants.kArmLength,
+ armConstants.kArmLength);
+
+ this.armMech =
+ armRoot.append(
+ new MechanismLigament2d(
+ "defaultManipArm",
+ armConstants.kArmLength,
+ armConstants.kArmStartingAngle.in(Degrees),
+ 6,
+ new Color8Bit(Color.kOrange)
+ ));
+ }
}
- if (!armConstants.kEnableAdvanced) {
- new ManipArm(motor);
- } else {
- this.motor = motor;
- this.armConstants = armConstants;
- this.isAdvancedEnabled = true;
-
- this.motor.configureMotor(
- armConstants.kArmStallCurrentLimitAmps,
- armConstants.kArmRampRate,
- true,
- armConstants.kArmInverted);
-
- this.topLimit = new Trigger(() -> topLimitBoolean);
- this.bottomLimit = new Trigger(() -> bottomLimitBoolean);
-
- this.atMin = new Trigger(() -> getAngle().isNear(this.armConstants.kMinAngle, Degrees.of(3)));
- this.atMax = new Trigger(() -> getAngle().isNear(this.armConstants.kMaxAngle, Degrees.of(3)));
- this.goingDown = new Trigger(() -> motor.getAppliedOutput() < 0);
- this.goingUp = new Trigger(() -> motor.getAppliedOutput() > 0);
-
- this.atMin.and(goingDown).or(topLimit).onTrue(run(this::stopArm));
- this.atMax.and(goingUp).or(topLimit).onTrue(run(this::stopArm));
-
- this.topLimit.onTrue(
- run(
- () ->
- motor.setPosition(
- (ManipMath.Arm.convertAngleToSensorUnits(
- armConstants.kArmReduction, armConstants.kMaxAngle))
- .in(Rotations))));
- this.bottomLimit.onTrue(
- run(
- () ->
- motor.setPosition(
- (ManipMath.Arm.convertAngleToSensorUnits(
- armConstants.kArmReduction, armConstants.kMinAngle))
- .in(Rotations))));
-
- this.motor.setGearbox(armConstants.gearbox);
-
- this.motor.setupRioPID(
- new PIDFConfig(armConstants.kArmKp, armConstants.kArmKi, armConstants.kArmKd),
- armConstants.kArmMaxVelocityRPM,
- armConstants.kArmMaxAccelerationRPMperSecond,
- 0.01,
- true);
-
- this.feedforward =
- new ArmFeedforward(
- armConstants.kArmkS, armConstants.kArmkG, armConstants.kArmKv, armConstants.kArmKa);
-
- this.sysIdRoutine =
- new SysIdRoutine(
- new SysIdRoutine.Config(Volts.per(Second).of(1), Volts.of(6), Seconds.of(30)),
- new SysIdRoutine.Mechanism(
- this::runArmVoltage,
- log -> {
- // Record a frame for the arm motor.
- log.motor("manipArm")
- .voltage(
- appliedVoltage.mut_replace(
- motor.getAppliedOutput() * RobotController.getBatteryVoltage(),
- Volts))
- .angularPosition(angle.mut_replace(motor.getPosition(), Rotations))
- .angularVelocity(velocity.mut_replace(motor.getVelocity(), RPM));
- },
- this));
-
- this.armSim =
- new SingleJointedArmSim(
- armConstants.gearbox,
- armConstants.kArmReduction,
- SingleJointedArmSim.estimateMOI(armConstants.kArmLength, armConstants.kArmMass),
- armConstants.kArmLength,
- armConstants.kMinAngle.in(Radians),
- armConstants.kMaxAngle.in(Radians),
- true,
- armConstants.kArmStartingAngle.in(Radians),
- 0.02 / 4096.0,
- 0.0);
-
- // Mechanism 2d for simulation, needs overridden for anything more than a basic arm.
- arm2d = new Mechanism2d(armConstants.kArmLength * 2, armConstants.kArmLength * 2);
-
- // Mechanism root for simulation, needs overridden for anything more than a basic arm.
- MechanismRoot2d armRoot =
- arm2d.getRoot("ManipArm Root", armConstants.kArmLength, armConstants.kArmLength);
-
- this.armMech =
- armRoot.append(
- new MechanismLigament2d(
- "defaultManipArm",
- armConstants.kArmLength,
- armConstants.kArmStartingAngle.in(Degrees),
- 6,
- new Color8Bit(Color.kOrange)));
+ /**
+ * Subsystem constructor, basic {@link ManipArm} with a {@link PIDFConfig}.
+ */
+ public ManipArm(ManipMotor motor, PIDFConfig pidfConfig) {
+ this(motor);
+ motor.configurePIDF(pidfConfig);
}
- }
-
- /** Subsystem constructor, basic {@link ManipArm} with a {@link PIDFConfig}. */
- public ManipArm(ManipMotor motor, PIDFConfig pidfConfig) {
- this(motor);
- motor.configurePIDF(pidfConfig);
- }
-
- /** Subsystem constructor, basic {@link ManipArm}. */
- public ManipArm(ManipMotor motor) {
- this.motor = motor;
- }
-
- @Override
- public void periodic() {
- if (Telemetry.manipVerbosity.ordinal() <= Telemetry.ManipTelemetry.LOW.ordinal()) {
- if (RobotBase.isSimulation()) {
- SmartDashboard.putData("Arm Side View", arm2d);
- }
+
+ /**
+ * Subsystem constructor, basic {@link ManipArm}.
+ */
+ public ManipArm(ManipMotor motor) {
+ this.motor = motor;
}
- if (Telemetry.manipVerbosity.ordinal() <= Telemetry.ManipTelemetry.HIGH.ordinal()) {
- SmartDashboard.putNumber("Arm Angle", getAngle().in(Degrees));
- SmartDashboard.putNumber("Arm Motor Rotations", motor.getPosition());
- SmartDashboard.putNumber("Arm Applied Output", motor.getAppliedOutput());
- SmartDashboard.putBoolean("Top Limit", topLimit.getAsBoolean());
- SmartDashboard.putBoolean("Bottom Limit", topLimit.getAsBoolean());
+ @Override
+ public void periodic() {
+ if (Telemetry.manipVerbosity.ordinal() <= Telemetry.ManipTelemetry.LOW.ordinal()) {
+ if (RobotBase.isSimulation()) {
+ SmartDashboard.putData("Arm Side View", arm2d);
+ }
+ }
+ if (Telemetry.manipVerbosity.ordinal() <= Telemetry.ManipTelemetry.HIGH.ordinal()) {
+ SmartDashboard.putNumber("Arm Angle", getAngle().in(Degrees));
+ SmartDashboard.putNumber("Arm Motor Rotations", motor.getPosition());
+ SmartDashboard.putNumber("Arm Applied Output", motor.getAppliedOutput());
+
+ SmartDashboard.putBoolean("Top Limit", topLimit.getAsBoolean());
+ SmartDashboard.putBoolean("Bottom Limit", topLimit.getAsBoolean());
+ }
}
- }
-
- /** Ran periodically in simulation. Controls the arm simulation. */
- @Override
- public void simulationPeriodic() {
- // Set the armSim input, we use volts for this.
- armSim.setInput(motor.getAppliedOutput() * RoboRioSim.getVInVoltage());
-
- // Update the arm sim, Standard loop time is 20ms.
- armSim.update(0.02);
-
- motor.iterateRevSim(
- RotationsPerSecond.of(
- ManipMath.Arm.convertAngleToSensorUnits(
- armConstants.kArmReduction, Radians.of(armSim.getVelocityRadPerSec()))
- .in(Rotations))
- .in(RPM),
- RoboRioSim.getVInVoltage(), // Simulated battery voltage, in Volts
- 0.02); // Time interval, in Seconds
-
- // Not implemented, will error when implemented.
- motor.iterateCTRESim();
-
- // Finally, we set our simulated encoder's readings and simulated battery voltage
- motor.setPosition(
- ManipMath.Arm.convertAngleToSensorUnits(
- armConstants.kArmReduction, Radians.of(armSim.getAngleRads()))
- .in(Rotations));
-
- motor.setVelocity(
- ManipMath.Arm.convertAngleToSensorUnits(
- armConstants.kArmReduction, Radians.of(armSim.getVelocityRadPerSec()))
- .in(Rotations)
- * 60);
-
- // SimBattery estimates loaded battery voltages
- RoboRioSim.setVInVoltage(
- BatterySim.calculateDefaultBatteryLoadedVoltage(armSim.getCurrentDrawAmps()));
-
- // Update the Arm Mechanism based on simulated arm angle
- armMech.setAngle(Degrees.convertFrom(armSim.getAngleRads(), Radians));
- }
-
- /**
- * @return The angle used to update an arm {@link MechanismLigament2d}.
- */
- public double getMechAngle() {
- return Degrees.convertFrom(armSim.getAngleRads(), Radians);
- }
-
- /**
- * Sets the {@link ManipMotor} to follow another {@link ManipMotor}.
- *
- * @param followerMotor {@link ManipMotor} to follow the lead motor.
- * @param isInverted whether to invert the follower or not.
- */
- public void addFollower(ManipMotor followerMotor, boolean isInverted) {
- followerMotor.setAsFollower(motor, isInverted);
- }
-
- /**
- * Adds an absolute encoder to sync to on init. This is not used for actual control but
- * recommended to keep arm position on boot. Can be called in init.
- */
- public void addAbsoluteEncoderValue(double absEncoderDegrees) {
- absEncoderAngle.mut_replace(absEncoderDegrees, Degrees);
- this.absSetup = true;
- }
-
- /**
- * Determines whether to sync the absolute encoder in the {@link ManipArm} class or not. This is
- * enabled by default.
- */
- public void setSyncAbsEncoderInit(boolean syncAbsEncoderInit) {
- if (absSetup) {
- this.syncAbsEncoderInit = syncAbsEncoderInit;
- } else {
- DriverStation.reportWarning(
- "Absolute encoder for ManipArm is not set, cannot run setSyncAbsEncoderInit", true);
+
+ /**
+ * Ran periodically in simulation.
+ * Controls the arm simulation.
+ */
+ @Override
+ public void simulationPeriodic() {
+ // Set the armSim input, we use volts for this.
+ armSim.setInput(motor.getAppliedOutput() * RoboRioSim.getVInVoltage());
+
+ // Update the arm sim, Standard loop time is 20ms.
+ armSim.update(0.02);
+
+ motor.iterateRevSim(
+ RotationsPerSecond.of(ManipMath.Arm.convertAngleToSensorUnits(
+ armConstants.kArmReduction,
+ Radians.of(armSim.getVelocityRadPerSec())).in(Rotations))
+ .in(RPM),
+ RoboRioSim.getVInVoltage(), // Simulated battery voltage, in Volts
+ 0.02); // Time interval, in Seconds
+
+ // Not implemented, will error when implemented.
+ motor.iterateCTRESim();
+
+ // Finally, we set our simulated encoder's readings and simulated battery voltage
+ motor.setPosition(ManipMath.Arm.convertAngleToSensorUnits(
+ armConstants.kArmReduction,
+ Radians.of(armSim.getAngleRads())).in(Rotations));
+
+ motor.setVelocity(ManipMath.Arm.convertAngleToSensorUnits(
+ armConstants.kArmReduction,
+ Radians.of(armSim.getVelocityRadPerSec())).in(Rotations) * 60);
+
+ // SimBattery estimates loaded battery voltages
+ RoboRioSim.setVInVoltage(
+ BatterySim.calculateDefaultBatteryLoadedVoltage(armSim.getCurrentDrawAmps()));
+
+ // Update the Arm Mechanism based on simulated arm angle
+ armMech.setAngle(Degrees.convertFrom(armSim.getAngleRads(), Radians));
}
- }
-
- /** Seeds inbuilt encoder with absolute encoder value. Syncs on init by default. */
- public void synchronizeAbsoluteEncoder() {
- motor.setPosition(
- Rotations.of(absEncoderAngle.in(Degrees))
- .minus(armConstants.kArmOffsetToHorizantalZero)
- .in(Rotations));
- }
-
- /**
- * Near the maximum Angle of the arm within X degrees.
- *
- * @param toleranceDegrees Degrees close to maximum of the Arm.
- * @return is near the maximum of the arm.
- */
- public boolean nearMax(double toleranceDegrees) {
- return getAngle()
- .isNear(armConstants.kMaxAngle, Radians.convertFrom(toleranceDegrees, Degrees));
- }
-
- /**
- * Near the minimum angle of the Arm in within X degrees.
- *
- * @param toleranceDegrees Tolerance of the Arm.
- * @return is near the minimum of the arm.
- */
- public boolean nearMin(double toleranceDegrees) {
- return getAngle()
- .isNear(armConstants.kMaxAngle, Radians.convertFrom(toleranceDegrees, Degrees));
- }
-
- /**
- * Runs the SysId routine to tune the Arm
- *
- * @return SysId Routine command
- */
- public Command runSysIdRoutine() {
- if (isAdvancedEnabled) {
- return (sysIdRoutine.dynamic(SysIdRoutine.Direction.kForward).until(atMax))
- .andThen(sysIdRoutine.dynamic(SysIdRoutine.Direction.kReverse).until(atMin))
- .andThen(sysIdRoutine.quasistatic(SysIdRoutine.Direction.kForward).until(atMax))
- .andThen(sysIdRoutine.quasistatic(SysIdRoutine.Direction.kReverse).until(atMin))
- .andThen(Commands.print("DONE"));
- } else {
- DriverStation.reportWarning(
- "Advanced ManipArm is not setup, for safety SysID is disabled", true);
- return Commands.none();
+
+ /**
+ * @return The angle used to update an arm {@link MechanismLigament2d}.
+ */
+ public double getMechAngle() {
+ return Degrees.convertFrom(armSim.getAngleRads(), Radians);
}
- }
-
- /** Run the control loop to reach and maintain the setpoint from the preferences. */
- public void reachSetpoint(double setpoint) {
- if (isAdvancedEnabled) {
- double goalPosition =
- ManipMath.Arm.convertAngleToSensorUnits(armConstants.kArmReduction, Degrees.of(setpoint))
- .in(Rotations);
- double pidOutput = motor.getRioController().calculate(motor.getPosition(), goalPosition);
- TrapezoidProfile.State setpointState = motor.getRioController().getSetpoint();
-
- motor.setVoltage(
- pidOutput + feedforward.calculate(setpointState.position, setpointState.velocity));
-
- } else {
- motor.setReference(setpoint);
+
+ /**
+ * Sets the {@link ManipMotor} to follow another {@link ManipMotor}.
+ *
+ * @param followerMotor {@link ManipMotor} to follow the lead motor.
+ * @param isInverted whether to invert the follower or not.
+ */
+ public void addFollower(ManipMotor followerMotor, boolean isInverted) {
+ followerMotor.setAsFollower(motor, isInverted);
+ }
+
+ /**
+ * Adds an absolute encoder to sync to on init. This is not used for actual control
+ * but recommended to keep arm position on boot. Can be called in init.
+ * Value must be in 0-360.
+ */
+ public void addAbsoluteEncoderValue(double absEncoderDegrees) {
+ absEncoderAngle.mut_replace(absEncoderDegrees, Degrees);
+ this.absSetup = true;
}
- }
-
- /** Basic method to run the arm at commanded speed. This does not stop!! */
- public void runArmSpeed(double speed) {
- motor.set(speed);
- }
-
- /** Basic method to run the arm at commanded voltage. This does not stop!! */
- public void runArmVoltage(Voltage volts) {
- motor.setVoltage(volts);
- }
-
- /**
- * Get the Angle of the Arm.
- *
- * @return Angle of the Arm.
- */
- public Angle getAngle() {
- if (isAdvancedEnabled) {
- angle.mut_replace(
- ManipMath.Arm.convertSensorUnitsToAngle(
- armConstants.kArmReduction, angle.mut_replace(motor.getPosition(), Rotations)));
- } else {
- DriverStation.reportWarning("Advanced ManipArm is required for getAngle()", true);
+
+ /**
+ * Determines whether to sync the absolute encoder in the
+ * {@link ManipArm} class or not. This is enabled by default.
+ */
+ public void setSyncAbsEncoderInit(boolean syncAbsEncoderInit) {
+ if (absSetup) {
+ this.syncAbsEncoderInit = syncAbsEncoderInit;
+ } else {
+ DriverStation.reportWarning("Absolute encoder for ManipArm is not set, cannot run setSyncAbsEncoderInit", true);
+ }
}
- return angle;
- }
-
- /**
- * Get the velocity of Arm.
- *
- * @return Velocity of the Arm.
- */
- public AngularVelocity getVelocity() {
- if (!isAdvancedEnabled) {
- DriverStation.reportWarning(
- "Advanced ManipArm is required for getVelocity(), returning 0", true);
+
+ /**
+ * Seeds inbuilt encoder with absolute encoder value.
+ * Syncs on init by default.
+ */
+ public void synchronizeAbsoluteEncoder() {
+ motor.setPosition(
+ Rotations.of(absEncoderAngle.in(Degrees))
+ .minus(armConstants.kArmOffsetToHorizantalZero)
+ .in(Rotations));
}
- return velocity.mut_replace(
- ManipMath.Arm.convertSensorUnitsToAngle(
- armConstants.kArmReduction, Rotations.of(motor.getVelocity()))
- .per(Minute));
- }
-
- /** Runs reachSetpoint as a {@link Command}. */
- public Command setGoal(double degrees) {
- return run(() -> reachSetpoint(degrees));
- }
-
- /** Runs runArmSpeed as a {@link Command}. This stops after command is finished. */
- public Command runArmSpeedCommand(double speed) {
- return runEnd(() -> runArmSpeed(speed), this::stopArm);
- }
-
- /** Runs runArmVoltage as a {@link Command}. This stops after command is finished. */
- public Command runArmVoltageCommand(Voltage volts) {
- return runEnd(() -> runArmVoltage(volts), this::stopArm);
- }
-
- /** Sets the {@link Boolean} for when the top limit switch is hit for {@link ManipArm}. */
- public void setTopLimitSwitch(boolean topLimit) {
- this.topLimitBoolean = topLimit;
- }
-
- /** Sets the {@link Boolean} for when the bottom limit switch is hit for {@link ManipArm}. */
- public void setBottomLimitSwitch(boolean bottomLimit) {
- this.bottomLimitBoolean = bottomLimit;
- }
-
- /**
- * A command to be used as a default command to stow the arm. Use toggleAutoStow() to toggle it on
- * and off. It's good for if you want it to stow but want safety or to be able to control
- * manually.
- */
- public Command autoStowWithOverride(double stowAngle) {
- return run(
- () -> {
- if (!defaultCommandOverride) {
- reachSetpoint(stowAngle);
- } else {
- Commands.none();
- }
+
+ /**
+ * Near the maximum Angle of the arm within X degrees.
+ *
+ * @param toleranceDegrees Degrees close to maximum of the Arm.
+ * @return is near the maximum of the arm.
+ */
+ public boolean nearMax(double toleranceDegrees) {
+ return getAngle().isNear(armConstants.kMaxAngle, Radians.convertFrom(toleranceDegrees, Degrees));
+
+ }
+
+ /**
+ * Near the minimum angle of the Arm in within X degrees.
+ *
+ * @param toleranceDegrees Tolerance of the Arm.
+ * @return is near the minimum of the arm.
+ */
+ public boolean nearMin(double toleranceDegrees) {
+ return getAngle().isNear(armConstants.kMaxAngle, Radians.convertFrom(toleranceDegrees, Degrees));
+
+ }
+
+ /**
+ * Runs the SysId routine to tune the Arm
+ *
+ * @return SysId Routine command
+ */
+ public Command runSysIdRoutine() {
+ if (isAdvancedEnabled) {
+ return (sysIdRoutine.dynamic(SysIdRoutine.Direction.kForward).until(atMax))
+ .andThen(sysIdRoutine.dynamic(SysIdRoutine.Direction.kReverse).until(atMin))
+ .andThen(sysIdRoutine.quasistatic(SysIdRoutine.Direction.kForward).until(atMax))
+ .andThen(sysIdRoutine.quasistatic(SysIdRoutine.Direction.kReverse).until(atMin))
+ .andThen(Commands.print("DONE"));
+ } else {
+ DriverStation.reportWarning("Advanced ManipArm is not setup, for safety SysID is disabled", true);
+ return Commands.none();
+ }
+ }
+
+ /**
+ * Run the control loop to reach and maintain the setpoint from the preferences.
+ */
+ public void reachSetpoint(double setpoint) {
+ if (isAdvancedEnabled) {
+ double goalPosition = ManipMath.Arm.convertAngleToSensorUnits(armConstants.kArmReduction, Degrees.of(setpoint)).in(Rotations);
+ double pidOutput = motor.getRioController().calculate(motor.getPosition(), goalPosition);
+ TrapezoidProfile.State setpointState = motor.getRioController().getSetpoint();
+
+ motor.setVoltage(pidOutput +
+ feedforward.calculate(setpointState.position,
+ setpointState.velocity));
+
+ } else {
+ motor.setReference(setpoint);
+ }
+ }
+
+ /**
+ * Basic method to run the arm at commanded speed.
+ * This does not stop!!
+ */
+ public void runArmSpeed(double speed) {
+ motor.set(speed);
+ }
+
+ /**
+ * Basic method to run the arm at commanded voltage.
+ * This does not stop!!
+ */
+ public void runArmVoltage(Voltage volts) {
+ motor.setVoltage(volts);
+ }
+
+ /**
+ * Powers the motor with the kG feedforward value.
+ * "Voltage required to counteract gravity".
+ */
+ public void runkG() {
+ motor.setVoltage(armConstants.kArmkG);
+ }
+
+ /**
+ * Powers the motor with the kG feedforward value as a command.
+ * "Voltage required to counteract gravity".
+ */
+ public Command runkGCommand() {
+ return run(this::runkG);
+ }
+
+ /**
+ * Get the Angle of the Arm.
+ *
+ * @return Angle of the Arm.
+ */
+ public Angle getAngle() {
+ if (isAdvancedEnabled) {
+ angle.mut_replace(ManipMath.Arm.convertSensorUnitsToAngle(armConstants.kArmReduction, angle.mut_replace(motor.getPosition(), Rotations)));
+ } else {
+ DriverStation.reportWarning("Advanced ManipArm is required for getAngle()", true);
+ }
+ return angle;
+ }
+
+ /**
+ * Get the velocity of Arm.
+ *
+ * @return Velocity of the Arm.
+ */
+ public AngularVelocity getVelocity() {
+ if (!isAdvancedEnabled) {
+ DriverStation.reportWarning("Advanced ManipArm is required for getVelocity(), returning 0", true);
+ }
+ return velocity.mut_replace(ManipMath.Arm.convertSensorUnitsToAngle(armConstants.kArmReduction, Rotations.of(motor.getVelocity())).per(Minute));
+ }
+
+ /**
+ * Runs reachSetpoint as a {@link Command}.
+ */
+ public Command setGoal(double degrees) {
+ return run(() -> reachSetpoint(degrees));
+ }
+
+ /**
+ * Runs runArmSpeed as a {@link Command}.
+ * This stops after command is finished.
+ */
+ public Command runArmSpeedCommand(double speed) {
+ return runEnd(() -> runArmSpeed(speed), this::stopArm);
+ }
+
+ /**
+ * Runs runArmVoltage as a {@link Command}.
+ * This stops after command is finished.
+ */
+ public Command runArmVoltageCommand(Voltage volts) {
+ return runEnd(() -> runArmVoltage(volts), this::stopArm);
+ }
+
+ /**
+ * Sets the {@link Boolean} for when the top limit switch is hit for {@link ManipArm}.
+ */
+ public void setTopLimitSwitch(boolean topLimit) {
+ this.topLimitBoolean = topLimit;
+ }
+
+ /**
+ * Sets the {@link Boolean} for when the bottom limit switch is hit for {@link ManipArm}.
+ */
+ public void setBottomLimitSwitch(boolean bottomLimit) {
+ this.bottomLimitBoolean = bottomLimit;
+ }
+
+ /**
+ * A command to be used as a default command to stow the arm.
+ * Use toggleAutoStow() to toggle it on and off.
+ * It's good for if you want it to stow but want safety or to be able to control manually.
+ */
+ public Command autoStowWithOverride(double stowAngle) {
+ return run(() -> {
+ if (!defaultCommandOverride) {
+ reachSetpoint(stowAngle);
+ } else {
+ Commands.none();
+ }
});
- }
+ }
- /** Toggles auto-stow of defaultCommandOverride */
- public void toggleAutoStow() {
- this.defaultCommandOverride = !defaultCommandOverride;
- }
+ /**
+ * Toggles auto-stow of defaultCommandOverride
+ */
+ public void toggleAutoStow() {
+ this.defaultCommandOverride = !defaultCommandOverride;
+ }
- public void setAutoStow(boolean autoStow) {
- this.defaultCommandOverride = autoStow;
- }
+ public void setAutoStow(boolean autoStow) {
+ this.defaultCommandOverride = autoStow;
+ }
- /** Stops the arm. */
- public void stopArm() {
- runArmSpeed(0.0);
- }
+ /**
+ * Stops the arm.
+ */
+ public void stopArm() {
+ runArmSpeed(0.0);
+ }
}
diff --git a/src/main/java/maniplib/ManipElevator.java b/src/main/java/maniplib/ManipElevator.java
index 612fa96..1b64221 100644
--- a/src/main/java/maniplib/ManipElevator.java
+++ b/src/main/java/maniplib/ManipElevator.java
@@ -1,7 +1,5 @@
package maniplib;
-import static edu.wpi.first.units.Units.*;
-
import edu.wpi.first.math.MathUtil;
import edu.wpi.first.math.controller.ElevatorFeedforward;
import edu.wpi.first.units.measure.*;
@@ -26,462 +24,488 @@
import maniplib.utils.ManipMath;
import maniplib.utils.PIDFConfig;
+import static edu.wpi.first.units.Units.*;
+
public class ManipElevator extends SubsystemBase {
- // Mutable holders for unit-safe values, persisted to avoid reallocation.
- private final MutVoltage appliedVoltage = Volts.mutable(0);
- private final MutLinearVelocity velocity = MetersPerSecond.mutable(0);
- private final MutDistance distance = Meters.mutable(0);
- private final MutAngle absEncoderAngle = Rotations.mutable(0);
- // Universal motor init
- private final ManipMotor motor;
- // Triggers for when reaching max movements.
- private Trigger atMin;
- private Trigger atMax;
- private Trigger goingDown;
- private Trigger goingUp;
- // Booleans for limit switch functions.
- private boolean topLimitBoolean = false;
- private boolean bottomLimitBoolean = false;
- // Triggers for limit switch functions.
- private Trigger topLimit;
- private Trigger bottomLimit;
- // Various booleans to determine what to enable
- private boolean absSetup = false;
- private boolean isAdvancedEnabled = false;
- private boolean syncAbsEncoderInit = true;
- private boolean defaultCommandOverride = false;
- private ElevatorFeedforward feedforward;
- private ManipElevatorConstants elevatorConstants;
- // SysId Routine
- private SysIdRoutine sysIdRoutine;
- // Simulation class to help simulate what is going on, including gravity.
- private ElevatorSim elevatorSim;
- private Mechanism2d elevator2d;
- // Mechanism for simulation, needs overridden for anything more than a basic elevator.
- private MechanismLigament2d elevatorMech;
-
- /**
- * Subsystem constructor, advanced {@link ManipElevator} when config.kEnableAdvanced is set to
- * true.
- */
- public ManipElevator(ManipMotor motor, ManipElevatorConstants config) {
-
- if (absSetup && syncAbsEncoderInit) {
- synchronizeAbsoluteEncoder();
- }
-
- if (!config.kEnableAdvanced) {
- this.motor = motor;
- } else {
- this.motor = motor;
- this.elevatorConstants = config;
- this.isAdvancedEnabled = true;
-
- this.topLimit = new Trigger(() -> topLimitBoolean);
- this.bottomLimit = new Trigger(() -> bottomLimitBoolean);
-
- this.atMin = new Trigger(() -> getLinearPosition().isNear(config.kMinHeight, Inches.of(1)));
- this.atMax = new Trigger(() -> getLinearPosition().isNear(config.kMaxHeight, Inches.of(1)));
- this.goingDown = new Trigger(() -> motor.getAppliedOutput() < 0);
- this.goingUp = new Trigger(() -> motor.getAppliedOutput() > 0);
-
- this.atMin.and(goingDown).or(topLimit).onTrue(run(this::stopElevator));
- this.atMax.and(goingUp).or(topLimit).onTrue(run(this::stopElevator));
-
- this.topLimit.onTrue(
- run(
- () ->
- motor.setPosition(
- ManipMath.Elevator.convertDistanceToRotations(
- config.kElevatorDrumRadius,
- config.kElevatorGearing,
- config.kMaxHeight)
- .in(Rotations))));
- this.bottomLimit.onTrue(
- run(
- () ->
- motor.setPosition(
- ManipMath.Elevator.convertDistanceToRotations(
- config.kElevatorDrumRadius,
- config.kElevatorGearing,
- config.kMaxHeight)
- .in(Rotations))));
-
- this.motor.setGearbox(elevatorConstants.gearbox);
-
- this.motor.configureMotor(
- elevatorConstants.kElevatorCurrentLimit,
- elevatorConstants.kElevatorRampRate,
- true,
- elevatorConstants.kIsInverted);
-
- motor.setupRioPID(
- new PIDFConfig(config.kElevatorKp, config.kElevatorKi, config.kElevatorKd),
- config.kMaxVelocity,
- config.kMaxAcceleration,
- 0.01,
- true);
-
- this.feedforward =
- new ElevatorFeedforward(
- config.kElevatorkS, config.kElevatorkG, config.kElevatorkV, config.kElevatorkA);
-
- this.sysIdRoutine =
- new SysIdRoutine(
- new SysIdRoutine.Config(Volts.per(Second).of(1), Volts.of(6), Seconds.of(30)),
- new SysIdRoutine.Mechanism(
- this::runElevatorVoltage,
- log -> {
- // Record a frame for the elevator motor.
- log.motor("manipElevator")
- .voltage(
- appliedVoltage.mut_replace(
- motor.getAppliedOutput() * RobotController.getBatteryVoltage(),
- Volts))
- .linearPosition(
- distance.mut_replace(
- getHeightMeters(), Meters)) // Records Height in Meters via
- // SysIdRoutineLog.linearPosition
- .linearVelocity(
- velocity.mut_replace(
- getVelocityMetersPerSecond(),
- MetersPerSecond)); // Records velocity in MetersPerSecond via
- // SysIdRoutineLog.linearVelocity
- },
- this));
-
- this.elevatorSim =
- new ElevatorSim(
- config.gearbox,
- config.kElevatorGearing,
- config.kElevatorCarriageMass,
- config.kElevatorDrumRadius,
- config.kMinHeight.in(Meters),
- config.kMaxHeight.in(Meters),
- true,
- config.kStartingHeightSim.in(Meters),
- 0.01,
- 0.0);
-
- // Mechanism 2d for simulation, needs overridden for anything more than a basic elevator.
- this.elevator2d =
- new Mechanism2d(
- (config.kMaxHeight.in(Meters) / 5),
- config.kMaxHeight.in(Meters) + (config.kMaxHeight.in(Meters) / 10));
-
- // Mechanism root for simulation, needs overridden for anything more than a basic elevator.
- MechanismRoot2d elevatorRoot =
- elevator2d.getRoot(
- "ManipElevator Root",
- (config.kMaxHeight.in(Meters) / 10),
- config.kMinHeight.in(Meters));
-
- this.elevatorMech =
- elevatorRoot.append(
- new MechanismLigament2d(
- "defaultManipElevator",
- config.kStartingHeightSim.in(Meters),
- 90,
- 6,
- new Color8Bit(Color.kYellow)));
- }
- }
-
- /** Subsystem constructor, basic {@link ManipElevator} with a {@link PIDFConfig}. */
- public ManipElevator(ManipMotor motor, PIDFConfig pidfConfig) {
- this(motor);
- motor.configurePIDF(pidfConfig);
- }
-
- /** Subsystem constructor, basic {@link ManipElevator}. */
- public ManipElevator(ManipMotor motor) {
- this.motor = motor;
- }
-
- @Override
- public void periodic() {
- if (Telemetry.manipVerbosity.ordinal() <= Telemetry.ManipTelemetry.LOW.ordinal()) {
- SmartDashboard.putData("Elevator Side", elevator2d);
- }
- if (Telemetry.manipVerbosity.ordinal() <= Telemetry.ManipTelemetry.HIGH.ordinal()) {
- SmartDashboard.putNumber("Elevator Height", getLinearPosition().in(Inches));
- SmartDashboard.putNumber("Elevator Applied Output", motor.getAppliedOutput());
- }
- }
-
- /** Ran periodically in simulation. Controls the elevator simulation. */
- @Override
- public void simulationPeriodic() {
- // Set the elevatorSim input, we use volts for this.
- elevatorSim.setInput(motor.getAppliedOutput() * RoboRioSim.getVInVoltage());
-
- // Update the elevator sim, Standard loop time is 20ms.
- elevatorSim.update(0.02);
-
- motor.iterateRevSim(
- ManipMath.Elevator.convertDistanceToRotations(
+ // Mutable holders for unit-safe values, persisted to avoid reallocation.
+ private final MutVoltage appliedVoltage = Volts.mutable(0);
+ private final MutLinearVelocity velocity = MetersPerSecond.mutable(0);
+ private final MutDistance distance = Meters.mutable(0);
+ private final MutAngle absEncoderAngle = Rotations.mutable(0);
+ // Universal motor init
+ private final ManipMotor motor;
+ // Triggers for when reaching max movements.
+ private Trigger atMin;
+ private Trigger atMax;
+ private Trigger goingDown;
+ private Trigger goingUp;
+ // Booleans for limit switch functions.
+ private boolean topLimitBoolean = false;
+ private boolean bottomLimitBoolean = false;
+ // Triggers for limit switch functions.
+ private Trigger topLimit;
+ private Trigger bottomLimit;
+ // Various booleans to determine what to enable
+ private boolean absSetup = false;
+ private boolean isAdvancedEnabled = false;
+ private boolean syncAbsEncoderInit = true;
+ private boolean defaultCommandOverride = false;
+ private ElevatorFeedforward feedforward;
+ private ManipElevatorConstants elevatorConstants;
+ // SysId Routine
+ private SysIdRoutine sysIdRoutine;
+ // Simulation class to help simulate what is going on, including gravity.
+ private ElevatorSim elevatorSim;
+ private Mechanism2d elevator2d;
+ // Mechanism for simulation, needs overridden for anything more than a basic elevator.
+ private MechanismLigament2d elevatorMech;
+
+ /**
+ * Subsystem constructor, advanced {@link ManipElevator} when config.kEnableAdvanced is set to true.
+ */
+ public ManipElevator(ManipMotor motor, ManipElevatorConstants config) {
+
+ if (absSetup && syncAbsEncoderInit) {
+ synchronizeAbsoluteEncoder();
+ }
+
+ if (!config.kEnableAdvanced) {
+ this.motor = motor;
+ } else {
+ this.motor = motor;
+ this.elevatorConstants = config;
+ this.isAdvancedEnabled = true;
+
+ this.topLimit = new Trigger(() -> topLimitBoolean);
+ this.bottomLimit = new Trigger(() -> bottomLimitBoolean);
+
+ this.atMin = new Trigger(() -> getLinearPosition().isNear(config.kMinHeight, Inches.of(1)));
+ this.atMax = new Trigger(() -> getLinearPosition().isNear(config.kMaxHeight, Inches.of(1)));
+ this.goingDown = new Trigger(() -> motor.getAppliedOutput() < 0);
+ this.goingUp = new Trigger(() -> motor.getAppliedOutput() > 0);
+
+ this.atMin.and(goingDown).or(topLimit).onTrue(run(this::stopElevator));
+ this.atMax.and(goingUp).or(topLimit).onTrue(run(this::stopElevator));
+
+ this.topLimit.onTrue(run(() ->
+ motor.setPosition(ManipMath.Elevator.convertDistanceToRotations(
+ config.kElevatorDrumRadius,
+ config.kElevatorGearing,
+ config.kMaxHeight
+ ).in(Rotations))));
+ this.bottomLimit.onTrue(run(() ->
+ motor.setPosition(ManipMath.Elevator.convertDistanceToRotations(
+ config.kElevatorDrumRadius,
+ config.kElevatorGearing,
+ config.kMaxHeight
+ ).in(Rotations))));
+
+ this.motor.setGearbox(elevatorConstants.gearbox);
+
+ this.motor.configureMotor(
+ elevatorConstants.kElevatorCurrentLimit,
+ elevatorConstants.kElevatorRampRate,
+ true,
+ elevatorConstants.kIsInverted
+ );
+
+ motor.setupRioPID(
+ new PIDFConfig(config.kElevatorKp,
+ config.kElevatorKi,
+ config.kElevatorKd),
+ config.kMaxVelocity,
+ config.kMaxAcceleration,
+ 0.01,
+ true
+ );
+
+ this.feedforward = new ElevatorFeedforward(
+ config.kElevatorkS,
+ config.kElevatorkG,
+ config.kElevatorkV,
+ config.kElevatorkA
+ );
+
+ this.sysIdRoutine = new SysIdRoutine(
+
+ new SysIdRoutine.Config(Volts.per(Second).of(1), Volts.of(6), Seconds.of(30)),
+ new SysIdRoutine.Mechanism(
+ this::runElevatorVoltage,
+ log -> {
+ // Record a frame for the elevator motor.
+ log.motor("manipElevator")
+ .voltage(appliedVoltage.mut_replace(motor.getAppliedOutput() *
+ RobotController.getBatteryVoltage(), Volts))
+ .linearPosition(distance.mut_replace(getHeightMeters(),
+ Meters)) // Records Height in Meters via SysIdRoutineLog.linearPosition
+ .linearVelocity(velocity.mut_replace(getVelocityMetersPerSecond(),
+ MetersPerSecond)); // Records velocity in MetersPerSecond via SysIdRoutineLog.linearVelocity
+ },
+ this));
+
+ this.elevatorSim = new ElevatorSim(
+ config.gearbox,
+ config.kElevatorGearing,
+ config.kElevatorCarriageMass,
+ config.kElevatorDrumRadius,
+ config.kMinHeight.in(Meters),
+ config.kMaxHeight.in(Meters),
+ true,
+ config.kStartingHeightSim.in(Meters),
+ 0.01,
+ 0.0
+ );
+
+ // Mechanism 2d for simulation, needs overridden for anything more than a basic elevator.
+ this.elevator2d = new Mechanism2d(
+ (config.kMaxHeight.in(Meters) / 5),
+ config.kMaxHeight.in(Meters) + (config.kMaxHeight.in(Meters) / 10)
+ );
+
+ // Mechanism root for simulation, needs overridden for anything more than a basic elevator.
+ MechanismRoot2d elevatorRoot = elevator2d.getRoot("ManipElevator Root",
+ (config.kMaxHeight.in(Meters) / 10),
+ config.kMinHeight.in(Meters));
+
+ this.elevatorMech =
+ elevatorRoot.append(
+ new MechanismLigament2d(
+ "defaultManipElevator",
+ config.kStartingHeightSim.in(Meters),
+ 90,
+ 6,
+ new Color8Bit(Color.kYellow)
+ ));
+ }
+
+ }
+
+ /**
+ * Subsystem constructor, basic {@link ManipElevator} with a {@link PIDFConfig}.
+ */
+ public ManipElevator(ManipMotor motor, PIDFConfig pidfConfig) {
+ this(motor);
+ motor.configurePIDF(pidfConfig);
+ }
+
+ /**
+ * Subsystem constructor, basic {@link ManipElevator}.
+ */
+ public ManipElevator(ManipMotor motor) {
+ this.motor = motor;
+ }
+
+ @Override
+ public void periodic() {
+ if (Telemetry.manipVerbosity.ordinal() <= Telemetry.ManipTelemetry.LOW.ordinal()) {
+ SmartDashboard.putData("Elevator Side", elevator2d);
+ }
+ if (Telemetry.manipVerbosity.ordinal() <= Telemetry.ManipTelemetry.HIGH.ordinal()) {
+ SmartDashboard.putNumber("Elevator Height", getLinearPosition().in(Inches));
+ SmartDashboard.putNumber("Elevator Applied Output", motor.getAppliedOutput());
+ }
+ }
+
+ /**
+ * Ran periodically in simulation.
+ * Controls the elevator simulation.
+ */
+ @Override
+ public void simulationPeriodic() {
+ // Set the elevatorSim input, we use volts for this.
+ elevatorSim.setInput(motor.getAppliedOutput() * RoboRioSim.getVInVoltage());
+
+ // Update the elevator sim, Standard loop time is 20ms.
+ elevatorSim.update(0.02);
+
+ motor.iterateRevSim(
+ ManipMath.Elevator.convertDistanceToRotations(
+ elevatorConstants.kElevatorDrumRadius,
+ elevatorConstants.kElevatorGearing,
+ Meters.of(elevatorSim.getVelocityMetersPerSecond())).per(Second).in(RPM),
+ RoboRioSim.getVInVoltage(),
+ 0.020);
+
+ // Not implemented will error
+ motor.iterateCTRESim();
+
+ // Finally, we set our simulated encoder's readings and simulated battery voltage
+ motor.setPosition(ManipMath.Elevator.convertDistanceToRotations(
elevatorConstants.kElevatorDrumRadius,
elevatorConstants.kElevatorGearing,
- Meters.of(elevatorSim.getVelocityMetersPerSecond()))
- .per(Second)
- .in(RPM),
- RoboRioSim.getVInVoltage(),
- 0.020);
-
- // Not implemented will error
- motor.iterateCTRESim();
-
- // Finally, we set our simulated encoder's readings and simulated battery voltage
- motor.setPosition(
- ManipMath.Elevator.convertDistanceToRotations(
+ Meters.of(elevatorSim.getPositionMeters())).in(Rotations));
+
+ motor.setVelocity(ManipMath.Elevator.convertDistanceToRotations(
elevatorConstants.kElevatorDrumRadius,
elevatorConstants.kElevatorGearing,
- Meters.of(elevatorSim.getPositionMeters()))
- .in(Rotations));
-
- motor.setVelocity(
- ManipMath.Elevator.convertDistanceToRotations(
- elevatorConstants.kElevatorDrumRadius,
- elevatorConstants.kElevatorGearing,
- Meters.of(elevatorSim.getVelocityMetersPerSecond()))
- .in(Rotations)
- * 60);
-
- // SimBattery estimates loaded battery voltages
- RoboRioSim.setVInVoltage(
- BatterySim.calculateDefaultBatteryLoadedVoltage(elevatorSim.getCurrentDrawAmps()));
-
- // Update the Elevator Mechanism based on simulated elevator height
- elevatorMech.setLength(getLinearPosition().in(Meters));
- }
-
- /**
- * @return The length used to update a elevator {@link MechanismLigament2d}
- */
- public double getMechLength() {
- return getLinearPosition().in(Meters);
- }
-
- /**
- * Sets the {@link ManipMotor} to follow another {@link ManipMotor}.
- *
- * @param followerMotor {@link ManipMotor} to follow the lead motor.
- * @param isInverted whether to invert the follower or not.
- */
- public void addFollower(ManipMotor followerMotor, boolean isInverted) {
- followerMotor.setAsFollower(motor, isInverted);
- }
-
- /**
- * Adds an absolute encoder to sync to on init. This is not used for actual control but
- * recommended to keep elevator position on boot. Can be called in init.
- */
- public void addAbsoluteEncoderValue(double absEncoderDegrees) {
- absEncoderAngle.mut_replace(absEncoderDegrees - elevatorConstants.kAbsEncoderOffset, Degrees);
- this.absSetup = true;
- }
-
- /**
- * Determines whether to sync the absolute encoder in the {@link ManipElevator} class or not. This
- * is enabled by default.
- */
- public void setSyncAbsEncoderInit(boolean syncAbsEncoderInit) {
- if (absSetup) {
- this.syncAbsEncoderInit = syncAbsEncoderInit;
- } else {
- DriverStation.reportWarning(
- "Absolute encoder for ManipElevator is not set, cannot run setSyncAbsEncoderInit", true);
- }
- }
-
- /** Seeds inbuilt encoder with absolute encoder value. Syncs on init by default. */
- public void synchronizeAbsoluteEncoder() {
- motor.setPosition(Rotations.of(absEncoderAngle.in(Degrees)).in(Rotations));
- }
-
- /**
- * Runs the SysId routine to tune the elevator
- *
- * @return SysId Routine command
- */
- public Command runSysIdRoutine() {
- if (isAdvancedEnabled) {
- return (sysIdRoutine.dynamic(SysIdRoutine.Direction.kForward).until(atMax))
- .andThen(sysIdRoutine.dynamic(SysIdRoutine.Direction.kReverse).until(atMin))
- .andThen(sysIdRoutine.quasistatic(SysIdRoutine.Direction.kForward).until(atMax))
- .andThen(sysIdRoutine.quasistatic(SysIdRoutine.Direction.kReverse).until(atMin))
- .andThen(Commands.print("DONE"));
- } else {
- DriverStation.reportWarning(
- "Advanced ManipElevator is not setup, for safety SysID is disabled", true);
- return Commands.none();
- }
- }
-
- /**
- * Get Elevator Velocity
- *
- * @return Elevator Velocity
- */
- public LinearVelocity getLinearVelocity() {
- return ManipMath.Elevator.convertRotationsToDistance(
- elevatorConstants.kElevatorDrumRadius,
- elevatorConstants.kElevatorGearing,
- Rotations.of(motor.getVelocity()))
- .per(Minute);
- }
-
- /**
- * Get the height of the Elevator
- *
- * @return Height of the elevator
- */
- public Distance getLinearPosition() {
- return ManipMath.Elevator.convertRotationsToDistance(
- elevatorConstants.kElevatorDrumRadius,
- elevatorConstants.kElevatorGearing,
- Rotations.of(motor.getPosition()));
- }
-
- /**
- * Get the height in meters.
- *
- * @return Height in meters
- */
- public double getHeightMeters() {
- return (motor.getPosition() / elevatorConstants.kElevatorGearing)
- * (2 * Math.PI * elevatorConstants.kElevatorDrumRadius);
- }
-
- /**
- * The velocity of the elevator in meters per second.
- *
- * @return velocity in meters per second
- */
- public double getVelocityMetersPerSecond() {
- return ((motor.getVelocity() / 60) / elevatorConstants.kElevatorGearing)
- * (2 * Math.PI * elevatorConstants.kElevatorDrumRadius);
- }
-
- /**
- * A trigger for when the height is at an acceptable tolerance.
- *
- * @param height Height in Meters
- * @param tolerance Tolerance in meters.
- * @return {@link Trigger}
- */
- public Trigger atHeight(double height, double tolerance) {
- return new Trigger(() -> MathUtil.isNear(height, getHeightMeters(), tolerance));
- }
-
- /**
- * Near the maximum height of the elevator within X millimeters.
- *
- * @param toleranceMillimeters Tolerance of the Elevator.
- * @return is near the maximum of the elevator.
- */
- public boolean nearMax(double toleranceMillimeters) {
- return getLinearPosition()
- .isNear(
- elevatorConstants.kMaxHeight, Meters.convertFrom(toleranceMillimeters, Millimeters));
- }
-
- /**
- * Near the minimum height of the elevator in within X millimeters.
- *
- * @param toleranceMillimeters Tolerance of the Elevator.
- * @return is near the minimum of the elevator.
- */
- public boolean nearMin(double toleranceMillimeters) {
- return getLinearPosition()
- .isNear(
- elevatorConstants.kMinHeight, Meters.convertFrom(toleranceMillimeters, Millimeters));
- }
-
- /**
- * Run the control loop to reach and maintain the setpoint from the preferences. If using basic
- * control setpoint is in sensor units.
- */
- public void reachSetpoint(double setpointInches) {
- if (isAdvancedEnabled) {
- motor.setVoltage(
- MathUtil.clamp(
- motor
- .getRioController()
- .calculate(getHeightMeters(), Meters.convertFrom(setpointInches, Inches))
- + feedforward.calculateWithVelocities(
- getVelocityMetersPerSecond(),
- motor.getRioController().getSetpoint().velocity),
- -7,
- 7));
-
- } else {
- motor.setReference(setpointInches);
- }
- }
-
- /** Basic method to run the elevator at commanded speed. This does not stop!! */
- public void runElevatorSpeed(double speed) {
- motor.set(speed);
- }
-
- /** Basic method to run the elevator at commanded voltage. This does not stop!! */
- public void runElevatorVoltage(Voltage volts) {
- motor.setVoltage(volts);
- }
-
- /** Runs reachSetpoint as a {@link Command}. */
- public Command setGoal(double setpointInches) {
- return run(() -> reachSetpoint(setpointInches));
- }
-
- /** Runs runElevatorSpeed as a {@link Command}. This stops after command is finished. */
- public Command runElevatorSpeedCommand(double speed) {
- return runEnd(() -> runElevatorSpeed(speed), this::stopElevator);
- }
-
- /** Runs runElevatorVoltage as a {@link Command}. This stops after command is finished. */
- public Command runElevatorVoltageCommand(Voltage volts) {
- return runEnd(() -> runElevatorVoltage(volts), this::stopElevator);
- }
-
- /** Sets the {@link Boolean} for when the top limit switch is hit for {@link ManipElevator}. */
- public void setTopLimitSwitch(boolean topLimit) {
- this.topLimitBoolean = topLimit;
- }
-
- /** Sets the {@link Boolean} for when the bottom limit switch is hit for {@link ManipElevator}. */
- public void setBottomLimitSwitch(boolean bottomLimit) {
- this.bottomLimitBoolean = bottomLimit;
- }
-
- /**
- * A command to be used as a default command to stow the elevator. Use toggleAutoStow() to toggle
- * it on and off. It's good for if you want it to stow but want safety or to be able to control
- * manually.
- */
- public Command autoStowWithOverride(double stowHeight) {
- return run(
- () -> {
- if (!this.defaultCommandOverride) {
- reachSetpoint(stowHeight);
- } else {
- Commands.none();
- }
+ Meters.of(elevatorSim.getVelocityMetersPerSecond())).in(Rotations) * 60);
+
+ // SimBattery estimates loaded battery voltages
+ RoboRioSim.setVInVoltage(
+ BatterySim.calculateDefaultBatteryLoadedVoltage(elevatorSim.getCurrentDrawAmps()));
+
+ // Update the Elevator Mechanism based on simulated elevator height
+ elevatorMech.setLength(getLinearPosition().in(Meters));
+ }
+
+ /**
+ * @return The length used to update a elevator {@link MechanismLigament2d}
+ */
+ public double getMechLength() {
+ return getLinearPosition().in(Meters);
+ }
+
+ /**
+ * Sets the {@link ManipMotor} to follow another {@link ManipMotor}.
+ *
+ * @param followerMotor {@link ManipMotor} to follow the lead motor.
+ * @param isInverted whether to invert the follower or not.
+ */
+ public void addFollower(ManipMotor followerMotor, boolean isInverted) {
+ followerMotor.setAsFollower(motor, isInverted);
+ }
+
+ /**
+ * Adds an absolute encoder to sync to on init. This is not used for actual control
+ * but recommended to keep elevator position on boot. Can be called in init.
+ */
+ public void addAbsoluteEncoderValue(double absEncoderDegrees) {
+ absEncoderAngle.mut_replace(absEncoderDegrees - elevatorConstants.kAbsEncoderOffset, Degrees);
+ this.absSetup = true;
+ }
+
+ /**
+ * Determines whether to sync the absolute encoder in the
+ * {@link ManipElevator} class or not. This is enabled by default.
+ */
+ public void setSyncAbsEncoderInit(boolean syncAbsEncoderInit) {
+ if (absSetup) {
+ this.syncAbsEncoderInit = syncAbsEncoderInit;
+ } else {
+ DriverStation.reportWarning("Absolute encoder for ManipElevator is not set, cannot run setSyncAbsEncoderInit", true);
+ }
+ }
+
+ /**
+ * Seeds inbuilt encoder with absolute encoder value.
+ * Syncs on init by default.
+ */
+ public void synchronizeAbsoluteEncoder() {
+ motor.setPosition(Rotations.of(absEncoderAngle.in(Degrees)).in(Rotations));
+ }
+
+ /**
+ * Runs the SysId routine to tune the elevator
+ *
+ * @return SysId Routine command
+ */
+ public Command runSysIdRoutine() {
+ if (isAdvancedEnabled) {
+ return (sysIdRoutine.dynamic(SysIdRoutine.Direction.kForward).until(atMax))
+ .andThen(sysIdRoutine.dynamic(SysIdRoutine.Direction.kReverse).until(atMin))
+ .andThen(sysIdRoutine.quasistatic(SysIdRoutine.Direction.kForward).until(atMax))
+ .andThen(sysIdRoutine.quasistatic(SysIdRoutine.Direction.kReverse).until(atMin))
+ .andThen(Commands.print("DONE"));
+ } else {
+ DriverStation.reportWarning("Advanced ManipElevator is not setup, for safety SysID is disabled", true);
+ return Commands.none();
+ }
+ }
+
+ /**
+ * Get Elevator Velocity
+ *
+ * @return Elevator Velocity
+ */
+ public LinearVelocity getLinearVelocity() {
+ return ManipMath.Elevator.convertRotationsToDistance(
+ elevatorConstants.kElevatorDrumRadius,
+ elevatorConstants.kElevatorGearing,
+ Rotations.of(motor.getVelocity())).per(Minute);
+ }
+
+ /**
+ * Get the height of the Elevator
+ *
+ * @return Height of the elevator
+ */
+ public Distance getLinearPosition() {
+ return ManipMath.Elevator.convertRotationsToDistance(
+ elevatorConstants.kElevatorDrumRadius,
+ elevatorConstants.kElevatorGearing,
+ Rotations.of(motor.getPosition()));
+ }
+
+ /**
+ * Get the height in meters.
+ *
+ * @return Height in meters
+ */
+ public double getHeightMeters() {
+ return (motor.getPosition() / elevatorConstants.kElevatorGearing) *
+ (2 * Math.PI * elevatorConstants.kElevatorDrumRadius);
+ }
+
+ /**
+ * The velocity of the elevator in meters per second.
+ *
+ * @return velocity in meters per second
+ */
+ public double getVelocityMetersPerSecond() {
+ return ((motor.getVelocity() / 60) / elevatorConstants.kElevatorGearing) *
+ (2 * Math.PI * elevatorConstants.kElevatorDrumRadius);
+ }
+
+ /**
+ * A trigger for when the height is at an acceptable tolerance.
+ *
+ * @param height Height in Meters
+ * @param tolerance Tolerance in meters.
+ * @return {@link Trigger}
+ */
+ public Trigger atHeight(double height, double tolerance) {
+ return new Trigger(() -> MathUtil.isNear(height,
+ getHeightMeters(),
+ tolerance));
+ }
+
+ /**
+ * Near the maximum height of the elevator within X millimeters.
+ *
+ * @param toleranceMillimeters Tolerance of the Elevator.
+ * @return is near the maximum of the elevator.
+ */
+ public boolean nearMax(double toleranceMillimeters) {
+ return getLinearPosition().isNear(elevatorConstants.kMaxHeight, Meters.convertFrom(toleranceMillimeters, Millimeters));
+
+ }
+
+ /**
+ * Near the minimum height of the elevator in within X millimeters.
+ *
+ * @param toleranceMillimeters Tolerance of the Elevator.
+ * @return is near the minimum of the elevator.
+ */
+ public boolean nearMin(double toleranceMillimeters) {
+ return getLinearPosition().isNear(elevatorConstants.kMinHeight, Meters.convertFrom(toleranceMillimeters, Millimeters));
+
+ }
+
+ /**
+ * Run the control loop to reach and maintain the setpoint from the preferences.
+ * If using basic control setpoint is in sensor units.
+ */
+ public void reachSetpoint(double setpointInches) {
+ if (isAdvancedEnabled) {
+ motor.setVoltage(MathUtil.clamp(
+ motor.getRioController().calculate(getHeightMeters(), Meters.convertFrom(setpointInches, Inches)) +
+ feedforward.calculateWithVelocities(getVelocityMetersPerSecond(),
+ motor.getRioController().getSetpoint().velocity), -7, 7));
+
+ } else {
+ motor.setReference(setpointInches);
+ }
+ }
+
+ /**
+ * Basic method to run the elevator at commanded speed.
+ * This does not stop!!
+ */
+ public void runElevatorSpeed(double speed) {
+ motor.set(speed);
+ }
+
+ /**
+ * Basic method to run the elevator at commanded voltage.
+ * This does not stop!!
+ */
+ public void runElevatorVoltage(Voltage volts) {
+ motor.setVoltage(volts);
+ }
+
+ /**
+ * Runs reachSetpoint as a {@link Command}.
+ */
+ public Command setGoal(double setpointInches) {
+ return run(() -> reachSetpoint(setpointInches));
+ }
+
+ /**
+ * Runs runElevatorSpeed as a {@link Command}.
+ * This stops after command is finished.
+ */
+ public Command runElevatorSpeedCommand(double speed) {
+ return runEnd(() -> runElevatorSpeed(speed), this::stopElevator);
+ }
+
+ /**
+ * Runs runElevatorVoltage as a {@link Command}.
+ * This stops after command is finished.
+ */
+ public Command runElevatorVoltageCommand(Voltage volts) {
+ return runEnd(() -> runElevatorVoltage(volts), this::stopElevator);
+ }
+
+ /**
+ * Powers the motor with the kG feedforward value.
+ * "Voltage required to counteract gravity".
+ */
+ public void runkG() {
+ motor.setVoltage(elevatorConstants.kElevatorkG);
+ }
+
+ /**
+ * Powers the motor with the kG feedforward value as a command.
+ * "Voltage required to counteract gravity".
+ */
+ public Command runkGCommand() {
+ return run(this::runkG);
+ }
+
+ /**
+ * Sets the {@link Boolean} for when the top limit switch is hit for {@link ManipElevator}.
+ */
+ public void setTopLimitSwitch(boolean topLimit) {
+ this.topLimitBoolean = topLimit;
+ }
+
+ /**
+ * Sets the {@link Boolean} for when the bottom limit switch is hit for {@link ManipElevator}.
+ */
+ public void setBottomLimitSwitch(boolean bottomLimit) {
+ this.bottomLimitBoolean = bottomLimit;
+ }
+
+ /**
+ * A command to be used as a default command to stow the elevator.
+ * Use toggleAutoStow() to toggle it on and off.
+ * It's good for if you want it to stow but want safety or to be able to control manually.
+ */
+ public Command autoStowWithOverride(double stowHeight) {
+ return run(() -> {
+ if (!this.defaultCommandOverride) {
+ reachSetpoint(stowHeight);
+ } else {
+ Commands.none();
+ }
});
- }
+ }
- /** Toggles auto-stow of defaultCommandOverride */
- public void toggleAutoStow() {
- this.defaultCommandOverride = !defaultCommandOverride;
- }
+ /**
+ * Toggles auto-stow of defaultCommandOverride
+ */
+ public void toggleAutoStow() {
+ this.defaultCommandOverride = !defaultCommandOverride;
+ }
- public void setAutoStow(boolean autoStow) {
- this.defaultCommandOverride = autoStow;
- }
+ public void setAutoStow(boolean autoStow) {
+ this.defaultCommandOverride = autoStow;
+ }
- /** Stops the elevator. */
- public void stopElevator() {
- runElevatorSpeed(0.0);
- }
+ /**
+ * Stops the elevator.
+ */
+ public void stopElevator() {
+ runElevatorSpeed(0.0);
+ }
}
diff --git a/src/main/java/maniplib/ManipShooterIntake.java b/src/main/java/maniplib/ManipShooterIntake.java
index e6a4c92..430ff35 100644
--- a/src/main/java/maniplib/ManipShooterIntake.java
+++ b/src/main/java/maniplib/ManipShooterIntake.java
@@ -7,65 +7,100 @@
public class ManipShooterIntake extends SubsystemBase {
- private final ManipMotor motor;
+ private final ManipMotor motor;
- /**
- * Initialize the {@link ManipShooterIntake} to be used.
- *
- * @param motor motor to set as the lead motor for this {@link ManipShooterIntake}
- */
- public ManipShooterIntake(ManipMotor motor) {
- this.motor = motor;
- motor.setPIDControlType(PIDControlType.ControlType.VELOCITY);
- }
+ /**
+ * Initialize the {@link ManipShooterIntake} to be used.
+ *
+ * @param motor motor to set as the lead motor for this {@link ManipShooterIntake}
+ */
+ public ManipShooterIntake(ManipMotor motor) {
+ this.motor = motor;
+ motor.setPIDControlType(PIDControlType.ControlType.VELOCITY);
+ }
- /**
- * Sets the {@link ManipMotor} to follow another {@link ManipMotor}.
- *
- * @param followerMotor {@link ManipMotor} to follow the lead motor.
- * @param isInverted whether to invert the follower or not.
- */
- public void addFollower(ManipMotor followerMotor, boolean isInverted) {
- followerMotor.setAsFollower(motor, isInverted);
- }
+ /**
+ * Sets the {@link ManipMotor} to follow another {@link ManipMotor}.
+ *
+ * @param followerMotor {@link ManipMotor} to follow the lead motor.
+ * @param isInverted whether to invert the follower or not.
+ */
+ public void addFollower(ManipMotor followerMotor, boolean isInverted) {
+ followerMotor.setAsFollower(motor, isInverted);
+ }
- /**
- * Set the percentage output.
- *
- * @param speed percent out for the motor controller.
- */
- public Command setSpeed(double speed) {
- return runEnd(
- () -> {
- motor.set(speed);
- },
- motor::stopMotor);
- }
+ /**
+ * Set the motor voltage.
+ *
+ * @param voltage to run the motor at.
+ */
+ public void runVoltage(double voltage) {
+ motor.setVoltage(voltage);
+ }
- /**
- * Set the closed loop PID controller reference point.
- *
- * @param setpoint Setpoint, value type changes with ControlType.
- */
- public Command setReference(double setpoint) {
- return runEnd(
- () -> {
- motor.setReference(setpoint);
- },
- motor::stopMotor);
- }
+ /**
+ * Set the motor voltage as a command.
+ *
+ * @param voltage to run the motor at.
+ */
+ public Command runVoltageCommand(double voltage) {
+ return runEnd(
+ () -> {
+ motor.setVoltage(voltage);
+ }, this::stopShooter
+ );
+ }
- /** Stop the {@link ManipShooterIntake} */
- public void stopShooter() {
- motor.stopMotor();
- }
+ /**
+ * Set the percentage output as a command.
+ *
+ * @param speed percent out for the motor controller.
+ */
+ public void runSpeed(double speed) {
+ motor.set(speed);
+ }
+
+ /**
+ * Set the percentage output.
+ *
+ * @param speed percent out for the motor controller as a command.
+ */
+ public Command runSpeedCommand(double speed) {
+ return runEnd(
+ () -> {
+ runSpeed(speed);
+ },
+ motor::stopMotor);
+ }
+
+ /**
+ * Set the closed loop PID controller reference point.
+ *
+ * @param setpoint Setpoint, value type changes with ControlType.
+ */
+ public Command setReference(double setpoint) {
+ return runEnd(
+ () -> {
+ motor.setReference(setpoint);
+ },
+ motor::stopMotor
+ );
+ }
+
+ /**
+ * Stop the {@link ManipShooterIntake}
+ */
+ public void stopShooter() {
+ motor.stopMotor();
+ }
+
+ /**
+ * A command that stops the {@link ManipShooterIntake}
+ *
+ * @return a command that stops the {@link ManipShooterIntake}
+ */
+ public Command stopShooterCommand() {
+ return motor.stopMotorCommand();
+ }
- /**
- * A command that stops the {@link ManipShooterIntake}
- *
- * @return a command that stops the {@link ManipShooterIntake}
- */
- public Command stopShooterCommand() {
- return motor.stopMotorCommand();
- }
}
diff --git a/src/main/java/maniplib/Telemetry.java b/src/main/java/maniplib/Telemetry.java
index 68b993d..90dc676 100644
--- a/src/main/java/maniplib/Telemetry.java
+++ b/src/main/java/maniplib/Telemetry.java
@@ -4,22 +4,23 @@
public class Telemetry extends SubsystemBase {
- public static ManipTelemetry manipVerbosity = ManipTelemetry.HIGH;
+ public static ManipTelemetry manipVerbosity = ManipTelemetry.HIGH;
- public enum ManipTelemetry {
- /*
- * No telemetry data is sent to dashboard. Including sim.
- */
- NONE,
+ public enum ManipTelemetry {
+ /*
+ * No telemetry data is sent to dashboard. Including sim.
+ */
+ NONE,
- /*
- * Only basic telemetry data is sent to dashboard.
- */
- LOW,
+ /*
+ * Only basic telemetry data is sent to dashboard.
+ */
+ LOW,
+
+ /*
+ * All telemetry data is sent to dashboard.
+ */
+ HIGH
+ }
- /*
- * All telemetry data is sent to dashboard.
- */
- HIGH
- }
}
diff --git a/src/main/java/maniplib/motors/ManipMotor.java b/src/main/java/maniplib/motors/ManipMotor.java
index 04b8048..7a9a446 100644
--- a/src/main/java/maniplib/motors/ManipMotor.java
+++ b/src/main/java/maniplib/motors/ManipMotor.java
@@ -12,224 +12,240 @@
*/
public abstract class ManipMotor {
- /*
- Custom methods needed for each controller :
- getSimMotor, custom simMotor code for each added motor support.
- */
-
- /**
- * The maximum amount of times the swerve motor will attempt to configure a motor if failures
- * occur.
- */
- public final int maximumRetries = 5;
-
- /** Configure the factory defaults. */
- public abstract void factoryDefaults();
-
- /** Clear the sticky faults on the motor controller. */
- public abstract void clearStickyFaults();
-
- /** Used to internally set motor constants. */
- public abstract void configureMotor(
- int stallCurrent, double rampRate, boolean isBrake, boolean isInverted);
-
- /** Used to pass the mechanism gearbox to the motor for sim. */
- public abstract void setGearbox(DCMotor gearbox);
-
- /** Iterates Rev's sim, does nothing on CTRE devices. */
- public abstract void iterateRevSim(double velocity, double vbus, double dt);
-
- /** Not implemented, does nothing on Rev devices, */
- public abstract void iterateCTRESim();
-
- /**
- * Sets up the {@link ManipSparkMax} to use rioPID.
- *
- * @param pidfConfig pid settings to use.
- * @param maxVelocity maximum velocity for trapezoid profiling.
- * @param maxAcceleration maximum acceleration for trapezoid profiling.
- * @param useRioPID boolean to enable rioPID.
- */
- public abstract void setupRioPID(
- PIDFConfig pidfConfig,
- double maxVelocity,
- double maxAcceleration,
- double tolerance,
- boolean useRioPID);
-
- /**
- * Whether to use rioPID or revPID
- *
- * @param useRioPID boolean to enable rioPID
- */
- public abstract void useRioPID(boolean useRioPID);
-
- public abstract ProfiledPIDController getRioController();
-
- /** Sets the {@link PIDControlType} to use on the motor. */
- public abstract void setPIDControlType(PIDControlType.ControlType controlType);
-
- /**
- * Configure the PIDF values for the closed loop controller. 0 is disabled or off.
- *
- * @param config Configuration class holding the PIDF values.
- */
- public abstract void configurePIDF(PIDFConfig config);
-
- /**
- * Configure the PID wrapping for the position closed loop controller.
- *
- * @param minInput Minimum PID input.
- * @param maxInput Maximum PID input.
- */
- public abstract void configurePIDWrapping(double minInput, double maxInput);
-
- /**
- * Set the idle mode.
- *
- * @param isBrakeMode Set the brake mode.
- */
- public abstract void setMotorBrake(boolean isBrakeMode);
-
- /**
- * Set the motor to be inverted.
- *
- * @param inverted State of inversion.
- */
- public abstract void setInverted(boolean inverted);
-
- /** Save the configurations from flash to EEPROM. */
- public abstract void burnFlash();
-
- /**
- * Sets the {@link ManipMotor} to follow another {@link ManipMotor}.
- *
- * @param leadMotor lead {@link ManipMotor} to follow.
- * @param isInverted whether to invert the follower or not.
- */
- public abstract void setAsFollower(ManipMotor leadMotor, Boolean isInverted);
-
- /**
- * Set the percentage output.
- *
- * @param percentOutput percent out for the motor controller.
- */
- public abstract void set(double percentOutput);
-
- /**
- * Set the closed loop PID controller reference point.
- *
- * @param setpoint Setpoint in meters per second or angle in degrees.
- * @param feedforward Feedforward in volt-meter-per-second or kV.
- */
- public abstract void setReference(double setpoint, double feedforward);
-
- /**
- * Set the closed loop PID controller reference point.
- *
- * @param setpoint Setpoint in meters per second or angle in degrees.
- */
- public abstract void setReference(double setpoint);
-
- /** Stop the motor. */
- public abstract void stopMotor();
-
- /**
- * A command to stop the motor.
- *
- * @return a command to stop the motor.
- */
- public abstract Command stopMotorCommand();
-
- /**
- * Get the voltage output of the motor controller.
- *
- * @return Voltage output.
- */
- public abstract double getVoltage();
-
- /**
- * Set the voltage of the motor.
- *
- * @param voltage Voltage to set.
- */
- public abstract void setVoltage(double voltage);
-
- /**
- * Set the voltage of the motor using {@link Voltage} units.
- *
- * @param voltage units to set the motor with.
- */
- public abstract void setVoltage(Voltage voltage);
-
- /**
- * Returns the canid of the motor.
- *
- * @return the canid of the motor.
- */
- public abstract int getMotorID();
-
- /**
- * Get the applied dutycycle output.
- *
- * @return Applied dutycycle output to the motor.
- */
- public abstract double getAppliedOutput();
-
- /**
- * Get the velocity of the integrated encoder.
- *
- * @return velocity in meters per second or degrees per second.
- */
- public abstract double getVelocity();
-
- /**
- * Set the integrated encoder velocity.
- *
- * @param velocity Integrated encoder velocity. Should be meters per second or degrees per second.
- */
- public abstract void setVelocity(double velocity);
-
- /**
- * Get the position of the integrated encoder.
- *
- * @return Position in meters or degrees.
- */
- public abstract double getPosition();
-
- /**
- * Set the integrated encoder position.
- *
- * @param position Integrated encoder position. Should be angle in degrees or meters per second.
- */
- public abstract void setPosition(double position);
-
- /**
- * Set the voltage compensation for the swerve module motor.
- *
- * @param nominalVoltage Nominal voltage for operation to output to.
- */
- public abstract void setVoltageCompensation(double nominalVoltage);
-
- /**
- * Set the current limit for the swerve drive motor, remember this may cause jumping if used in
- * conjunction with voltage compensation. This is useful to protect the motor from current spikes.
- *
- * @param currentLimit Current limit in AMPS at free speed.
- */
- public abstract void setCurrentLimit(int currentLimit);
-
- /**
- * Set the maximum rate the open/closed loop output can change by.
- *
- * @param rampRate Time in seconds to go from 0 to full throttle.
- */
- public abstract void setLoopRampRate(double rampRate);
-
- /**
- * Get the motor object from the module.
- *
- * @return Motor object.
- */
- public abstract Object getMotor();
+ /*
+ Custom methods needed for each controller :
+ getSimMotor, custom simMotor code for each added motor support.
+ */
+
+ /**
+ * The maximum amount of times the swerve motor will attempt to configure a motor if failures occur.
+ */
+ public final int maximumRetries = 5;
+
+ /**
+ * Configure the factory defaults.
+ */
+ public abstract void factoryDefaults();
+
+ /**
+ * Clear the sticky faults on the motor controller.
+ */
+ public abstract void clearStickyFaults();
+
+ /**
+ * Used to internally set motor constants.
+ */
+ public abstract void configureMotor(
+ int stallCurrent,
+ double rampRate,
+ boolean isBrake,
+ boolean isInverted
+ );
+
+ /**
+ * Used to pass the mechanism gearbox to the motor for sim.
+ */
+ public abstract void setGearbox(DCMotor gearbox);
+
+ /**
+ * Iterates Rev's sim, does nothing on CTRE devices.
+ */
+ public abstract void iterateRevSim(double velocity, double vbus, double dt);
+
+ /**
+ * Not implemented, does nothing on Rev devices,
+ */
+ public abstract void iterateCTRESim();
+
+ /**
+ * Sets up the {@link ManipSparkMax} to use rioPID.
+ *
+ * @param pidfConfig pid settings to use.
+ * @param maxVelocity maximum velocity for trapezoid profiling.
+ * @param maxAcceleration maximum acceleration for trapezoid profiling.
+ * @param useRioPID boolean to enable rioPID.
+ */
+ public abstract void setupRioPID(PIDFConfig pidfConfig, double maxVelocity, double maxAcceleration, double tolerance, boolean useRioPID);
+
+ /**
+ * Whether to use rioPID or revPID
+ *
+ * @param useRioPID boolean to enable rioPID
+ */
+ public abstract void useRioPID(boolean useRioPID);
+
+ public abstract ProfiledPIDController getRioController();
+
+ /**
+ * Sets the {@link PIDControlType} to use on the motor.
+ */
+ public abstract void setPIDControlType(PIDControlType.ControlType controlType);
+
+ /**
+ * Configure the PIDF values for the closed loop controller. 0 is disabled or off.
+ *
+ * @param config Configuration class holding the PIDF values.
+ */
+ public abstract void configurePIDF(PIDFConfig config);
+
+ /**
+ * Configure the PID wrapping for the position closed loop controller.
+ *
+ * @param minInput Minimum PID input.
+ * @param maxInput Maximum PID input.
+ */
+ public abstract void configurePIDWrapping(double minInput, double maxInput);
+
+ /**
+ * Set the idle mode.
+ *
+ * @param isBrakeMode Set the brake mode.
+ */
+ public abstract void setMotorBrake(boolean isBrakeMode);
+
+ /**
+ * Set the motor to be inverted.
+ *
+ * @param inverted State of inversion.
+ */
+ public abstract void setInverted(boolean inverted);
+
+ /**
+ * Save the configurations from flash to EEPROM.
+ */
+ public abstract void burnFlash();
+
+ /**
+ * Sets the {@link ManipMotor} to follow another {@link ManipMotor}.
+ *
+ * @param leadMotor lead {@link ManipMotor} to follow.
+ * @param isInverted whether to invert the follower or not.
+ */
+ public abstract void setAsFollower(ManipMotor leadMotor, Boolean isInverted);
+
+ /**
+ * Set the percentage output.
+ *
+ * @param percentOutput percent out for the motor controller.
+ */
+ public abstract void set(double percentOutput);
+
+ /**
+ * Set the closed loop PID controller reference point.
+ *
+ * @param setpoint Setpoint in meters per second or angle in degrees.
+ * @param feedforward Feedforward in volt-meter-per-second or kV.
+ */
+ public abstract void setReference(double setpoint, double feedforward);
+
+ /**
+ * Set the closed loop PID controller reference point.
+ *
+ * @param setpoint Setpoint in meters per second or angle in degrees.
+ */
+ public abstract void setReference(double setpoint);
+
+ /**
+ * Stop the motor.
+ */
+ public abstract void stopMotor();
+
+ /**
+ * A command to stop the motor.
+ *
+ * @return a command to stop the motor.
+ */
+ public abstract Command stopMotorCommand();
+
+ /**
+ * Get the voltage output of the motor controller.
+ *
+ * @return Voltage output.
+ */
+ public abstract double getVoltage();
+
+ /**
+ * Set the voltage of the motor.
+ *
+ * @param voltage Voltage to set.
+ */
+ public abstract void setVoltage(double voltage);
+
+ /**
+ * Set the voltage of the motor using {@link Voltage} units.
+ *
+ * @param voltage units to set the motor with.
+ */
+ public abstract void setVoltage(Voltage voltage);
+
+ /**
+ * Returns the canid of the motor.
+ *
+ * @return the canid of the motor.
+ */
+ public abstract int getMotorID();
+
+ /**
+ * Get the applied dutycycle output.
+ *
+ * @return Applied dutycycle output to the motor.
+ */
+ public abstract double getAppliedOutput();
+
+ /**
+ * Get the velocity of the integrated encoder.
+ *
+ * @return velocity in meters per second or degrees per second.
+ */
+ public abstract double getVelocity();
+
+ /**
+ * Set the integrated encoder velocity.
+ *
+ * @param velocity Integrated encoder velocity. Should be meters per second or degrees per second.
+ */
+ public abstract void setVelocity(double velocity);
+
+ /**
+ * Get the position of the integrated encoder.
+ *
+ * @return Position in meters or degrees.
+ */
+ public abstract double getPosition();
+
+ /**
+ * Set the integrated encoder position.
+ *
+ * @param position Integrated encoder position. Should be angle in degrees or meters per second.
+ */
+ public abstract void setPosition(double position);
+
+ /**
+ * Set the voltage compensation for the swerve module motor.
+ *
+ * @param nominalVoltage Nominal voltage for operation to output to.
+ */
+ public abstract void setVoltageCompensation(double nominalVoltage);
+
+ /**
+ * Set the current limit for the swerve drive motor, remember this may cause jumping if used in conjunction with
+ * voltage compensation. This is useful to protect the motor from current spikes.
+ *
+ * @param currentLimit Current limit in AMPS at free speed.
+ */
+ public abstract void setCurrentLimit(int currentLimit);
+
+ /**
+ * Set the maximum rate the open/closed loop output can change by.
+ *
+ * @param rampRate Time in seconds to go from 0 to full throttle.
+ */
+ public abstract void setLoopRampRate(double rampRate);
+
+ /**
+ * Get the motor object from the module.
+ *
+ * @return Motor object.
+ */
+ public abstract Object getMotor();
}
diff --git a/src/main/java/maniplib/motors/ManipSparkMax.java b/src/main/java/maniplib/motors/ManipSparkMax.java
index 5ab1040..989344e 100644
--- a/src/main/java/maniplib/motors/ManipSparkMax.java
+++ b/src/main/java/maniplib/motors/ManipSparkMax.java
@@ -1,9 +1,5 @@
package maniplib.motors;
-import static edu.wpi.first.units.Units.Milliseconds;
-import static edu.wpi.first.units.Units.Seconds;
-import static edu.wpi.first.wpilibj2.command.Commands.run;
-
import com.revrobotics.REVLibError;
import com.revrobotics.RelativeEncoder;
import com.revrobotics.sim.SparkMaxSim;
@@ -25,473 +21,512 @@
import edu.wpi.first.wpilibj.RobotBase;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj2.command.Command;
-import java.util.function.Supplier;
import maniplib.utils.PIDControlType;
import maniplib.utils.PIDFConfig;
-/** An implementation of {@link SparkMax} as a {@link ManipMotor}. */
+import java.util.function.Supplier;
+
+import static edu.wpi.first.units.Units.Milliseconds;
+import static edu.wpi.first.units.Units.Seconds;
+import static edu.wpi.first.wpilibj2.command.Commands.run;
+
+/**
+ * An implementation of {@link SparkMax} as a {@link ManipMotor}.
+ */
public class ManipSparkMax extends ManipMotor {
- /** Config retry delay. */
- private final double configDelay = Milliseconds.of(5).in(Seconds);
- /** {@link SparkMax} Instance. */
- private final SparkMax motor;
- /** Supplier for the position of the motor controller. */
- private final Supplier position;
- /** Configuration object for {@link SparkMax} motor. */
- private final SparkMaxConfig cfg = new SparkMaxConfig();
- /** Integrated encoder. */
- public RelativeEncoder encoder;
- /** Closed-loop PID controller. */
- public SparkClosedLoopController pid;
- /** Rio Closed-Loop PID Controller */
- public ProfiledPIDController rioPID;
- /** Determine whether to use revPID or rioPID control. */
- public boolean useRioPID = false;
- /** Supplier for the velocity of the motor controller. */
- private Supplier velocity;
- /** {@link ControlType} for the spark to use */
- private ControlType sparkControlType = ControlType.kPosition;
- /** {@link SparkMaxSim} for the mechanism. */
- private SparkMaxSim sparkMaxSim = null;
-
- /**
- * Initialize the manip motor.
- *
- * @param motor The ManipMotor as a SparkMax object.
- */
- public ManipSparkMax(SparkMax motor) {
- this.motor = motor;
- factoryDefaults();
- clearStickyFaults();
-
- encoder = motor.getEncoder();
- pid = motor.getClosedLoopController();
-
- cfg.closedLoop.feedbackSensor(
- FeedbackSensor
- .kPrimaryEncoder); // Configure feedback of the PID controller as the integrated
- // encoder.
- velocity = encoder::getVelocity;
- position = encoder::getPosition;
- }
-
- /**
- * Initialize the {@link ManipMotor} as a {@link SparkMax} connected to a Brushless Motor.
- *
- * @param id CAN ID of the SparkMax.
- */
- public ManipSparkMax(int id) {
- this(new SparkMax(id, MotorType.kBrushless));
- }
-
- /**
- * Sets up the {@link ManipSparkMax} to use rioPID.
- *
- * @param pidfConfig pid settings to use.
- * @param maxVelocity maximum velocity for trapezoid profiling.
- * @param maxAcceleration maximum acceleration for trapezoid profiling.
- * @param useRioPID boolean to enable rioPID.
- */
- public void setupRioPID(
- PIDFConfig pidfConfig,
- double maxVelocity,
- double maxAcceleration,
- double tolerance,
- boolean useRioPID) {
- rioPID =
- new ProfiledPIDController(
- pidfConfig.p,
- pidfConfig.i,
- pidfConfig.d,
- new TrapezoidProfile.Constraints(maxVelocity, maxAcceleration));
- rioPID.setTolerance(tolerance);
- useRioPID(useRioPID);
- }
-
- /**
- * Whether to use rioPID or revPID
- *
- * @param useRioPID boolean to enable rioPID
- */
- public void useRioPID(boolean useRioPID) {
- this.useRioPID = useRioPID;
- }
-
- @Override
- public ProfiledPIDController getRioController() {
- return rioPID;
- }
-
- public SparkClosedLoopController getSparkController() {
- return motor.getClosedLoopController();
- }
-
- public void setPIDControlType(PIDControlType.ControlType controlType) {
- if (controlType == PIDControlType.ControlType.POSITION) {
- sparkControlType = ControlType.kPosition;
- } else if (controlType == PIDControlType.ControlType.VELOCITY) {
- sparkControlType = ControlType.kVelocity;
- }
- }
-
- /**
- * Run the configuration until it succeeds or times out.
- *
- * @param config Lambda supplier returning the error state.
- */
- private void configureSparkMax(Supplier config) {
- for (int i = 0; i < maximumRetries; i++) {
- if (config.get() == REVLibError.kOk) {
- return;
- }
- Timer.delay(configDelay);
- }
- DriverStation.reportWarning("Failure configuring motor " + motor.getDeviceId(), true);
- }
-
- /**
- * Get the current configuration of the {@link SparkMax}
- *
- * @return {@link SparkMaxConfig}
- */
- public SparkMaxConfig getConfig() {
- return cfg;
- }
-
- /**
- * Update the config for the {@link SparkMax}
- *
- * @param cfgGiven Given {@link SparkMaxConfig} which should have minimal modifications.
- */
- public void updateConfig(SparkMaxConfig cfgGiven) {
- if (!DriverStation.isDisabled()) {
- throw new RuntimeException(
- "Configuration changes cannot be applied while the robot is enabled.");
- }
- cfg.apply(cfgGiven);
- configureSparkMax(
- () ->
- motor.configure(cfg, ResetMode.kNoResetSafeParameters, PersistMode.kPersistParameters));
- }
-
- /**
- * Set the voltage compensation for the motor.
- *
- * @param nominalVoltage Nominal voltage for operation to output to.
- */
- @Override
- public void setVoltageCompensation(double nominalVoltage) {
- cfg.voltageCompensation(nominalVoltage);
- }
-
- /**
- * Set the current limit for the motor, remember this may cause jumping if used in conjunction
- * with voltage compensation. This is useful to protect the motor from current spikes.
- *
- * @param currentLimit Current limit in AMPS at free speed.
- */
- @Override
- public void setCurrentLimit(int currentLimit) {
- cfg.smartCurrentLimit(currentLimit);
- }
-
- /**
- * Set the maximum rate the open/closed loop output can change by.
- *
- * @param rampRate Time in seconds to go from 0 to full throttle.
- */
- @Override
- public void setLoopRampRate(double rampRate) {
- cfg.closedLoopRampRate(rampRate).openLoopRampRate(rampRate);
- }
-
- /**
- * Get the motor object from the module.
- *
- * @return Motor object.
- */
- @Override
- public Object getMotor() {
- return motor;
- }
-
- /**
- * Returns {@link SparkMax} used for {@link ManipSparkMax}.
- *
- * @return {@link SparkMax} used for {@link ManipSparkMax}.
- */
- public SparkMax getSparkMax() {
- return motor;
- }
-
- /** Configure the factory defaults. */
- @Override
- public void factoryDefaults() {
- // Do nothing
- }
-
- /** Clear the sticky faults on the motor controller. */
- @Override
- public void clearStickyFaults() {
- configureSparkMax(motor::clearFaults);
- }
-
- @Override
- public void configureMotor(
- int stallCurrent, double rampRate, boolean isBrake, boolean isInverted) {
- SparkMaxConfig config = getConfig();
- config
- .smartCurrentLimit(stallCurrent)
- .closedLoopRampRate(rampRate)
- .idleMode(isBrake ? IdleMode.kBrake : IdleMode.kCoast)
- .inverted(isInverted);
- updateConfig(config);
- }
-
- @Override
- public void setGearbox(DCMotor gearbox) {
- this.sparkMaxSim = new SparkMaxSim(motor, gearbox);
- }
-
- @Override
- public void iterateRevSim(double velocity, double vbus, double dt) {
- if (sparkMaxSim != null) {
- sparkMaxSim.iterate(velocity, vbus, dt);
- }
- }
-
- @Override
- public void iterateCTRESim() {
- // Do nothing, this is a rev device.
- }
-
- /**
- * Configure the PIDF values for the closed loop controller.
- *
- * @param config Configuration class holding the PIDF values.
- */
- @Override
- public void configurePIDF(PIDFConfig config) {
- cfg.closedLoop
- .pidf(config.p, config.i, config.d, config.f)
- .iZone(config.iz)
- .outputRange(config.output.min, config.output.max);
-
- rioPID.setPID(config.p, config.i, config.d);
- }
-
- /**
- * Configure the PID wrapping for the position closed loop controller.
- *
- * @param minInput Minimum PID input.
- * @param maxInput Maximum PID input.
- */
- @Override
- public void configurePIDWrapping(double minInput, double maxInput) {
- cfg.closedLoop.positionWrappingEnabled(true).positionWrappingInputRange(minInput, maxInput);
-
- rioPID.enableContinuousInput(minInput, maxInput);
- }
-
- /**
- * Set the idle mode.
- *
- * @param isBrakeMode Set the brake mode.
- */
- @Override
- public void setMotorBrake(boolean isBrakeMode) {
- cfg.idleMode(isBrakeMode ? IdleMode.kBrake : IdleMode.kCoast);
- }
-
- /**
- * Set the motor to be inverted.
- *
- * @param inverted State of inversion.
- */
- @Override
- public void setInverted(boolean inverted) {
- cfg.inverted(inverted);
- }
-
- /** Save the configurations from flash to EEPROM. */
- @Override
- public void burnFlash() {
- if (!DriverStation.isDisabled()) {
- throw new RuntimeException("Config updates cannot be applied while the robot is Enabled!");
- }
- configureSparkMax(
- () -> {
- return motor.configure(
- cfg, ResetMode.kNoResetSafeParameters, PersistMode.kPersistParameters);
+ /**
+ * Config retry delay.
+ */
+ private final double configDelay = Milliseconds.of(5).in(Seconds);
+ /**
+ * {@link SparkMax} Instance.
+ */
+ private final SparkMax motor;
+ /**
+ * Supplier for the position of the motor controller.
+ */
+ private final Supplier position;
+ /**
+ * Configuration object for {@link SparkMax} motor.
+ */
+ private final SparkMaxConfig cfg = new SparkMaxConfig();
+ /**
+ * Integrated encoder.
+ */
+ public RelativeEncoder encoder;
+ /**
+ * Closed-loop PID controller.
+ */
+ public SparkClosedLoopController pid;
+ /**
+ * Rio Closed-Loop PID Controller
+ */
+ public ProfiledPIDController rioPID;
+ /**
+ * Determine whether to use revPID or rioPID control.
+ */
+ public boolean useRioPID = false;
+ /**
+ * Supplier for the velocity of the motor controller.
+ */
+ private Supplier velocity;
+ /**
+ * {@link ControlType} for the spark to use
+ */
+ private ControlType sparkControlType = ControlType.kPosition;
+ /**
+ * {@link SparkMaxSim} for the mechanism.
+ */
+ private SparkMaxSim sparkMaxSim = null;
+
+ /**
+ * Initialize the manip motor.
+ *
+ * @param motor The ManipMotor as a SparkMax object.
+ */
+ public ManipSparkMax(SparkMax motor) {
+ this.motor = motor;
+ factoryDefaults();
+ clearStickyFaults();
+
+ encoder = motor.getEncoder();
+ pid = motor.getClosedLoopController();
+
+ cfg.closedLoop.feedbackSensor(FeedbackSensor.kPrimaryEncoder); // Configure feedback of the PID controller as the integrated encoder.
+ velocity = encoder::getVelocity;
+ position = encoder::getPosition;
+ }
+
+ /**
+ * Initialize the {@link ManipMotor} as a {@link SparkMax} connected to a Brushless Motor.
+ *
+ * @param id CAN ID of the SparkMax.
+ */
+ public ManipSparkMax(int id) {
+ this(new SparkMax(id, MotorType.kBrushless));
+ }
+
+ /**
+ * Sets up the {@link ManipSparkMax} to use rioPID.
+ *
+ * @param pidfConfig pid settings to use.
+ * @param maxVelocity maximum velocity for trapezoid profiling.
+ * @param maxAcceleration maximum acceleration for trapezoid profiling.
+ * @param useRioPID boolean to enable rioPID.
+ */
+ public void setupRioPID(PIDFConfig pidfConfig, double maxVelocity, double maxAcceleration, double tolerance, boolean useRioPID) {
+ rioPID = new ProfiledPIDController(
+ pidfConfig.p,
+ pidfConfig.i,
+ pidfConfig.d,
+ new TrapezoidProfile.Constraints(
+ maxVelocity,
+ maxAcceleration));
+ rioPID.setTolerance(tolerance);
+ useRioPID(useRioPID);
+ }
+
+ /**
+ * Whether to use rioPID or revPID
+ *
+ * @param useRioPID boolean to enable rioPID
+ */
+ public void useRioPID(boolean useRioPID) {
+ this.useRioPID = useRioPID;
+ }
+
+ @Override
+ public ProfiledPIDController getRioController() {
+ return rioPID;
+ }
+
+ public SparkClosedLoopController getSparkController() {
+ return motor.getClosedLoopController();
+ }
+
+ public void setPIDControlType(PIDControlType.ControlType controlType) {
+ if (controlType == PIDControlType.ControlType.POSITION) {
+ sparkControlType = ControlType.kPosition;
+ } else if (controlType == PIDControlType.ControlType.VELOCITY) {
+ sparkControlType = ControlType.kVelocity;
+ }
+ }
+
+ /**
+ * Run the configuration until it succeeds or times out.
+ *
+ * @param config Lambda supplier returning the error state.
+ */
+ private void configureSparkMax(Supplier config) {
+ for (int i = 0; i < maximumRetries; i++) {
+ if (config.get() == REVLibError.kOk) {
+ return;
+ }
+ Timer.delay(configDelay);
+ }
+ DriverStation.reportWarning("Failure configuring motor " + motor.getDeviceId(), true);
+ }
+
+ /**
+ * Get the current configuration of the {@link SparkMax}
+ *
+ * @return {@link SparkMaxConfig}
+ */
+ public SparkMaxConfig getConfig() {
+ return cfg;
+ }
+
+ /**
+ * Update the config for the {@link SparkMax}
+ *
+ * @param cfgGiven Given {@link SparkMaxConfig} which should have minimal modifications.
+ */
+ public void updateConfig(SparkMaxConfig cfgGiven) {
+ if (!DriverStation.isDisabled()) {
+ throw new RuntimeException("Configuration changes cannot be applied while the robot is enabled.");
+ }
+ cfg.apply(cfgGiven);
+ configureSparkMax(() -> motor.configure(cfg, ResetMode.kNoResetSafeParameters, PersistMode.kPersistParameters));
+ }
+
+ /**
+ * Set the voltage compensation for the motor.
+ *
+ * @param nominalVoltage Nominal voltage for operation to output to.
+ */
+ @Override
+ public void setVoltageCompensation(double nominalVoltage) {
+ cfg.voltageCompensation(nominalVoltage);
+ }
+
+ /**
+ * Set the current limit for the motor, remember this may cause jumping if used in conjunction with
+ * voltage compensation. This is useful to protect the motor from current spikes.
+ *
+ * @param currentLimit Current limit in AMPS at free speed.
+ */
+ @Override
+ public void setCurrentLimit(int currentLimit) {
+ cfg.smartCurrentLimit(currentLimit);
+
+ }
+
+ /**
+ * Set the maximum rate the open/closed loop output can change by.
+ *
+ * @param rampRate Time in seconds to go from 0 to full throttle.
+ */
+ @Override
+ public void setLoopRampRate(double rampRate) {
+ cfg.closedLoopRampRate(rampRate)
+ .openLoopRampRate(rampRate);
+
+ }
+
+ /**
+ * Get the motor object from the module.
+ *
+ * @return Motor object.
+ */
+ @Override
+ public Object getMotor() {
+ return motor;
+ }
+
+ /**
+ * Returns {@link SparkMax} used for {@link ManipSparkMax}.
+ *
+ * @return {@link SparkMax} used for {@link ManipSparkMax}.
+ */
+ public SparkMax getSparkMax() {
+ return motor;
+ }
+
+ /**
+ * Configure the factory defaults.
+ */
+ @Override
+ public void factoryDefaults() {
+ // Do nothing
+ }
+
+ /**
+ * Clear the sticky faults on the motor controller.
+ */
+ @Override
+ public void clearStickyFaults() {
+ configureSparkMax(motor::clearFaults);
+ }
+
+ @Override
+ public void configureMotor(int stallCurrent, double rampRate, boolean isBrake, boolean isInverted) {
+ SparkMaxConfig config = getConfig();
+ config
+ .smartCurrentLimit(stallCurrent)
+ .closedLoopRampRate(rampRate)
+ .idleMode(isBrake ? IdleMode.kBrake : IdleMode.kCoast)
+ .inverted(isInverted);
+ updateConfig(config);
+
+ }
+
+ @Override
+ public void setGearbox(DCMotor gearbox) {
+ this.sparkMaxSim = new SparkMaxSim(motor, gearbox);
+ }
+
+ @Override
+ public void iterateRevSim(double velocity, double vbus, double dt) {
+ if (sparkMaxSim != null) {
+ sparkMaxSim.iterate(velocity, vbus, dt);
+ }
+ }
+
+ @Override
+ public void iterateCTRESim() {
+ // Do nothing, this is a rev device.
+ }
+
+ /**
+ * Configure the PIDF values for the closed loop controller.
+ *
+ * @param config Configuration class holding the PIDF values.
+ */
+ @Override
+ public void configurePIDF(PIDFConfig config) {
+ cfg.closedLoop.pidf(config.p, config.i, config.d, config.f)
+ .iZone(config.iz)
+ .outputRange(config.output.min, config.output.max);
+
+ rioPID.setPID(config.p, config.i, config.d);
+ }
+
+ /**
+ * Configure the PID wrapping for the position closed loop controller.
+ *
+ * @param minInput Minimum PID input.
+ * @param maxInput Maximum PID input.
+ */
+ @Override
+ public void configurePIDWrapping(double minInput, double maxInput) {
+ cfg.closedLoop
+ .positionWrappingEnabled(true)
+ .positionWrappingInputRange(minInput, maxInput);
+
+ rioPID.enableContinuousInput(minInput, maxInput);
+ }
+
+ /**
+ * Set the idle mode.
+ *
+ * @param isBrakeMode Set the brake mode.
+ */
+ @Override
+ public void setMotorBrake(boolean isBrakeMode) {
+ cfg.idleMode(isBrakeMode ? IdleMode.kBrake : IdleMode.kCoast);
+
+ }
+
+ /**
+ * Set the motor to be inverted.
+ *
+ * @param inverted State of inversion.
+ */
+ @Override
+ public void setInverted(boolean inverted) {
+ cfg.inverted(inverted);
+ }
+
+ /**
+ * Save the configurations from flash to EEPROM.
+ */
+ @Override
+ public void burnFlash() {
+ if (!DriverStation.isDisabled()) {
+ throw new RuntimeException("Config updates cannot be applied while the robot is Enabled!");
+ }
+ configureSparkMax(() -> {
+ return motor.configure(cfg, ResetMode.kNoResetSafeParameters, PersistMode.kPersistParameters);
});
- }
-
- /**
- * Sets the {@link ManipSparkMax} to follow another {@link ManipMotor}.
- *
- * @param leadMotor lead {@link ManipMotor} to follow.
- * @param isInverted whether to invert the follower or not.
- */
- @Override
- public void setAsFollower(ManipMotor leadMotor, Boolean isInverted) {
- if (!DriverStation.isDisabled()) {
- throw new RuntimeException("Config updates cannot be applied while the robot is Enabled!");
- }
- configureSparkMax(
- () ->
- motor.configure(
- cfg.follow(leadMotor.getMotorID(), isInverted),
- ResetMode.kNoResetSafeParameters,
- PersistMode.kPersistParameters));
- }
-
- /**
- * Set the percentage output.
- *
- * @param percentOutput percent out for the motor controller.
- */
- @Override
- public void set(double percentOutput) {
- motor.set(percentOutput);
- }
-
- /**
- * Set the closed loop PID controller reference point.
- *
- * @param setpoint Setpoint in MPS or Angle in degrees.
- * @param feedforward Feedforward in volt-meter-per-second or kV.
- */
- @Override
- public void setReference(double setpoint, double feedforward) {
- if (useRioPID) {
- rioPID.calculate(setpoint);
- } else {
- configureSparkMax(
- () -> pid.setReference(setpoint, sparkControlType, ClosedLoopSlot.kSlot0, feedforward));
- }
- }
-
- /**
- * Set the closed loop PID controller reference point.
- *
- * @param setpoint Setpoint in MPS or Angle in degrees.
- */
- @Override
- public void setReference(double setpoint) {
- if (useRioPID) {
- rioPID.calculate(setpoint);
- } else {
- configureSparkMax(() -> pid.setReference(setpoint, sparkControlType, ClosedLoopSlot.kSlot0));
- }
- }
-
- /** Stops the motor. */
- @Override
- public void stopMotor() {
- motor.set(0.0);
- }
-
- /**
- * A command to stop the motor.
- *
- * @return a command to stop the motor.
- */
- @Override
- public Command stopMotorCommand() {
- return run(this::stopMotor);
- }
-
- /**
- * Get the voltage output of the motor controller.
- *
- * @return Voltage output.
- */
- @Override
- public double getVoltage() {
- return motor.getAppliedOutput() * motor.getBusVoltage();
- }
-
- /**
- * Set the voltage of the motor.
- *
- * @param voltage Voltage to set.
- */
- @Override
- public void setVoltage(double voltage) {
- motor.setVoltage(voltage);
- }
-
- /**
- * Set the voltage of the motor using {@link Voltage} units.
- *
- * @param voltage units to set the motor with.
- */
- @Override
- public void setVoltage(Voltage voltage) {
- motor.setVoltage(voltage);
- }
-
- /**
- * Returns the canid of the motor.
- *
- * @return the canid of the motor.
- */
- @Override
- public int getMotorID() {
- return motor.getDeviceId();
- }
-
- /**
- * Get the applied dutycycle output.
- *
- * @return Applied dutycycle output to the motor.
- */
- @Override
- public double getAppliedOutput() {
- double output = 0;
- if (RobotBase.isSimulation()) {
- if (sparkMaxSim != null) {
- output = sparkMaxSim.getAppliedOutput();
- }
- } else {
- output = motor.getAppliedOutput();
- }
- return output;
- }
-
- /**
- * Get the velocity of the integrated encoder.
- *
- * @return velocity
- */
- @Override
- public double getVelocity() {
- return velocity.get();
- }
-
- @Override
- public void setVelocity(double velocity) {
- this.velocity = () -> velocity;
- }
-
- /**
- * Get the position of the integrated encoder.
- *
- * @return Position
- */
- @Override
- public double getPosition() {
- return position.get();
- }
-
- /**
- * Set the integrated encoder position.
- *
- * @param position Integrated encoder position.
- */
- @Override
- public void setPosition(double position) {
- configureSparkMax(() -> encoder.setPosition(position));
- }
+ }
+
+ /**
+ * Sets the {@link ManipSparkMax} to follow another {@link ManipMotor}.
+ *
+ * @param leadMotor lead {@link ManipMotor} to follow.
+ * @param isInverted whether to invert the follower or not.
+ */
+ @Override
+ public void setAsFollower(ManipMotor leadMotor, Boolean isInverted) {
+ if (!DriverStation.isDisabled()) {
+ throw new RuntimeException("Config updates cannot be applied while the robot is Enabled!");
+ }
+ configureSparkMax(() ->
+ motor.configure(
+ cfg.follow(leadMotor.getMotorID(),
+ isInverted),
+ ResetMode.kNoResetSafeParameters,
+ PersistMode.kPersistParameters
+ ));
+ }
+
+ /**
+ * Set the percentage output.
+ *
+ * @param percentOutput percent out for the motor controller.
+ */
+ @Override
+ public void set(double percentOutput) {
+ motor.set(percentOutput);
+ }
+
+ /**
+ * Set the closed loop PID controller reference point.
+ *
+ * @param setpoint Setpoint in MPS or Angle in degrees.
+ * @param feedforward Feedforward in volt-meter-per-second or kV.
+ */
+ @Override
+ public void setReference(double setpoint, double feedforward) {
+ if (useRioPID) {
+ rioPID.calculate(setpoint);
+ } else {
+ configureSparkMax(() ->
+ pid.setReference(
+ setpoint,
+ sparkControlType,
+ ClosedLoopSlot.kSlot0,
+ feedforward));
+ }
+ }
+
+ /**
+ * Set the closed loop PID controller reference point.
+ *
+ * @param setpoint Setpoint in MPS or Angle in degrees.
+ */
+ @Override
+ public void setReference(double setpoint) {
+ if (useRioPID) {
+ rioPID.calculate(setpoint);
+ } else {
+ configureSparkMax(() ->
+ pid.setReference(
+ setpoint,
+ sparkControlType,
+ ClosedLoopSlot.kSlot0));
+ }
+ }
+
+ /**
+ * Stops the motor.
+ */
+ @Override
+ public void stopMotor() {
+ motor.set(0.0);
+ }
+
+ /**
+ * A command to stop the motor.
+ *
+ * @return a command to stop the motor.
+ */
+ @Override
+ public Command stopMotorCommand() {
+ return run(this::stopMotor);
+ }
+
+ /**
+ * Get the voltage output of the motor controller.
+ *
+ * @return Voltage output.
+ */
+ @Override
+ public double getVoltage() {
+ return motor.getAppliedOutput() * motor.getBusVoltage();
+ }
+
+ /**
+ * Set the voltage of the motor.
+ *
+ * @param voltage Voltage to set.
+ */
+ @Override
+ public void setVoltage(double voltage) {
+ motor.setVoltage(voltage);
+ }
+
+ /**
+ * Set the voltage of the motor using {@link Voltage} units.
+ *
+ * @param voltage units to set the motor with.
+ */
+ @Override
+ public void setVoltage(Voltage voltage) {
+ motor.setVoltage(voltage);
+ }
+
+ /**
+ * Returns the canid of the motor.
+ *
+ * @return the canid of the motor.
+ */
+ @Override
+ public int getMotorID() {
+ return motor.getDeviceId();
+ }
+
+ /**
+ * Get the applied dutycycle output.
+ *
+ * @return Applied dutycycle output to the motor.
+ */
+ @Override
+ public double getAppliedOutput() {
+ double output = 0;
+ if (RobotBase.isSimulation()) {
+ if (sparkMaxSim != null) {
+ output = sparkMaxSim.getAppliedOutput();
+ }
+ } else {
+ output = motor.getAppliedOutput();
+ }
+ return output;
+ }
+
+ /**
+ * Get the velocity of the integrated encoder.
+ *
+ * @return velocity
+ */
+ @Override
+ public double getVelocity() {
+ return velocity.get();
+ }
+
+ @Override
+ public void setVelocity(double velocity) {
+ this.velocity = () -> velocity;
+ }
+
+ /**
+ * Get the position of the integrated encoder.
+ *
+ * @return Position
+ */
+ @Override
+ public double getPosition() {
+ return position.get();
+ }
+
+ /**
+ * Set the integrated encoder position.
+ *
+ * @param position Integrated encoder position.
+ */
+ @Override
+ public void setPosition(double position) {
+ configureSparkMax(() -> encoder.setPosition(position));
+ }
}
diff --git a/src/main/java/maniplib/utils/ManipArmConstants.java b/src/main/java/maniplib/utils/ManipArmConstants.java
index 38b7e20..929142c 100644
--- a/src/main/java/maniplib/utils/ManipArmConstants.java
+++ b/src/main/java/maniplib/utils/ManipArmConstants.java
@@ -1,124 +1,116 @@
package maniplib.utils;
-import static edu.wpi.first.units.Units.*;
-
import edu.wpi.first.math.system.plant.DCMotor;
import edu.wpi.first.units.measure.Angle;
+import static edu.wpi.first.units.Units.*;
+
public class ManipArmConstants {
- public final DCMotor gearbox;
+ public final DCMotor gearbox;
- // The P gain for the PID controller that drives this arm.
- public final double kArmKp;
- public final double kArmKi;
- public final double kArmKd;
+ // The P gain for the PID controller that drives this arm.
+ public final double kArmKp;
+ public final double kArmKi;
+ public final double kArmKd;
- public final double kArmkS; // volts (V)
- public final double kArmkG; // volts (V)
- public final double kArmKv; // volts per velocity (V/RPM)
- public final double kArmKa; // volts per acceleration (V/(RPM/s))
+ public final double kArmkS; // volts (V)
+ public final double kArmkG; // volts (V)
+ public final double kArmKv; // volts per velocity (V/RPM)
+ public final double kArmKa; // volts per acceleration (V/(RPM/s))
- public final Angle kArmAllowedClosedLoopError;
- public final double kArmReduction;
- public final double kArmMass; // Kilograms
- public final double kArmLength;
- public final Angle kArmStartingAngle;
- public final Angle kMinAngle;
- public final Angle kMaxAngle;
- public final double kArmRampRate;
- public final Angle kArmOffsetToHorizantalZero;
- public final boolean kArmInverted;
+ public final Angle kArmAllowedClosedLoopError;
+ public final double kArmReduction;
+ public final double kArmMass; // Kilograms
+ public final double kArmLength;
+ public final Angle kArmStartingAngle;
+ public final Angle kMinAngle;
+ public final Angle kMaxAngle;
+ public final double kArmRampRate;
+ public final Angle kArmOffsetToHorizantalZero;
+ public final boolean kArmInverted;
- public final double kArmMaxVelocityRPM;
- public final double kArmMaxAccelerationRPMperSecond;
- public final int kArmStallCurrentLimitAmps;
+ public final double kArmMaxVelocityRPM;
+ public final double kArmMaxAccelerationRPMperSecond;
+ public final int kArmStallCurrentLimitAmps;
- // Toggle for enabling advanced features, false will just use basic PID control.
- public boolean kEnableAdvanced = false;
+ // Toggle for enabling advanced features, false will just use basic PID control.
+ public boolean kEnableAdvanced = false;
- /**
- * Sets the constant values for {@link maniplib.ManipArm}.
- *
- * @param gearbox DCMotor used to determine how many of which motor is being used.
- * @param kArmKp PID kP Tuning Value.
- * @param kArmKi PID kI Tuning Value.
- * @param kArmKd PID kD Tuning Value.
- * @param kArmkS FeedForward kS Tuning Value. volts(V)
- * @param kArmkG FeedForward kV Tuning Value. volt per velocity (V/(m/s))
- * @param kArmkV FeedForward kA Tuning Value. volt per acceleration (V/(m/s²))
- * @param kArmkA FeedForward kA Tuning Value. volts(V)
- * @param kArmReduction Gear ratio of the arm, use gearbox and sprockets.
- * @param kArmMassLbs How much the arm weighs in pounds.
- * @param kArmLengthInches How long the arm is in inches. Used in sim.
- * @param kArmStartingAngle Where the arm sim should set the arm on start.
- * @param kMinAngle Arms max height in degrees. Used for soft limits as well.
- * @param kMaxAngle Arms min height in degrees. Used for soft limits as well.
- * @param kArmInverted Whether to invert the drive direction of the arm. runArm(.1); should go up.
- * @param kArmRampRate Elevators ramp rate. 0.5 is recommended for most.
- * @param kArmOffsetToHorizantalZero Absolute encoder offset. Arm should be horizontal to the
- * floor at 0.
- * @param kArmAllowedClosedLoopError Allowed error in the pid control in degrees.
- * @param kArmStallCurrentLimitAmps The arms stall limit. 30 is recommended for most.
- * @param kArmMaxVelocityRPM Arms max velocity in rotations per second.
- * @param kArmMaxAccelerationRPMperSecond Arms max Acceleration in rotations per second. Depends
- * on specific arm config for accurate sim speed.
- * @param kEnableAdvanced Determines whether to use advanced control and sim.
- */
- public ManipArmConstants(
- DCMotor gearbox,
- double kArmKp,
- double kArmKi,
- double kArmKd,
- double kArmkS,
- double kArmkG,
- double kArmkV,
- double kArmkA,
- double kArmReduction,
- double kArmMassLbs,
- double kArmLengthInches,
- double kArmStartingAngle,
- double kMinAngle,
- double kMaxAngle,
- boolean kArmInverted,
- double kArmRampRate,
- double kArmOffsetToHorizantalZero,
- double kArmAllowedClosedLoopError,
- int kArmStallCurrentLimitAmps,
- double kArmMaxVelocityRPM,
- double kArmMaxAccelerationRPMperSecond,
- boolean kEnableAdvanced) {
- this.gearbox = gearbox;
- this.kArmKp = kArmKp;
- this.kArmKi = kArmKi;
- this.kArmKd = kArmKd;
- this.kArmkS = kArmkS;
- this.kArmkG = kArmkG;
- this.kArmKv = kArmkV;
- this.kArmKa = kArmkA;
- this.kArmReduction = kArmReduction;
- this.kArmMass = Kilograms.convertFrom(kArmMassLbs, Pounds);
- this.kArmLength = Inches.of(kArmLengthInches).in(Meters);
- this.kArmStartingAngle = Degrees.of(kArmStartingAngle);
- this.kMinAngle = Degrees.of(kMinAngle);
- this.kMaxAngle = Degrees.of(kMaxAngle);
- this.kArmInverted = kArmInverted;
- this.kArmRampRate = kArmRampRate;
- this.kArmOffsetToHorizantalZero = Degrees.of(kArmOffsetToHorizantalZero);
- this.kArmAllowedClosedLoopError =
- ManipMath.Arm.convertAngleToSensorUnits(
- kArmReduction, Degrees.of(kArmAllowedClosedLoopError));
- this.kArmStallCurrentLimitAmps = kArmStallCurrentLimitAmps;
- this.kArmMaxVelocityRPM =
- ManipMath.Arm.convertAngleToSensorUnits(kArmReduction, Degrees.of(kArmMaxVelocityRPM))
- .per(Second)
- .in(RPM);
- this.kArmMaxAccelerationRPMperSecond =
- ManipMath.Arm.convertAngleToSensorUnits(
- kArmReduction, Degrees.of(kArmMaxAccelerationRPMperSecond))
- .per(Second)
- .per(Second)
- .in(RPM.per(Second));
- this.kEnableAdvanced = kEnableAdvanced;
- }
+ /**
+ * Sets the constant values for {@link maniplib.ManipArm}.
+ *
+ * @param gearbox DCMotor used to determine how many of which motor is being used.
+ * @param kArmKp PID kP Tuning Value.
+ * @param kArmKi PID kI Tuning Value.
+ * @param kArmKd PID kD Tuning Value.
+ * @param kArmkS FeedForward kS Tuning Value. volts(V)
+ * @param kArmkG FeedForward kV Tuning Value. volt per velocity (V/(m/s))
+ * @param kArmkV FeedForward kA Tuning Value. volt per acceleration (V/(m/s²))
+ * @param kArmkA FeedForward kA Tuning Value. volts(V)
+ * @param kArmReduction Gear ratio of the arm, use gearbox and sprockets.
+ * @param kArmMassLbs How much the arm weighs in pounds.
+ * @param kArmLengthInches How long the arm is in inches. Used in sim.
+ * @param kArmStartingAngle Where the arm sim should set the arm on start.
+ * @param kMinAngle Arms max height in degrees. Used for soft limits as well.
+ * @param kMaxAngle Arms min height in degrees. Used for soft limits as well.
+ * @param kArmInverted Whether to invert the drive direction of the arm. runArm(.1); should go up.
+ * @param kArmRampRate Elevators ramp rate. 0.5 is recommended for most.
+ * @param kArmOffsetToHorizantalZero Absolute encoder offset. Arm should be horizontal to the floor at 0.
+ * @param kArmAllowedClosedLoopError Allowed error in the pid control in degrees.
+ * @param kArmStallCurrentLimitAmps The arms stall limit. 30 is recommended for most.
+ * @param kArmMaxVelocityRPM Arms max velocity in rotations per second.
+ * @param kArmMaxAccelerationRPMperSecond Arms max Acceleration in rotations per second. Depends on specific arm config for accurate sim speed.
+ * @param kEnableAdvanced Determines whether to use advanced control and sim.
+ */
+ public ManipArmConstants(
+ DCMotor gearbox,
+ double kArmKp,
+ double kArmKi,
+ double kArmKd,
+ double kArmkS,
+ double kArmkG,
+ double kArmkV,
+ double kArmkA,
+ double kArmReduction,
+ double kArmMassLbs,
+ double kArmLengthInches,
+ double kArmStartingAngle,
+ double kMinAngle,
+ double kMaxAngle,
+ boolean kArmInverted,
+ double kArmRampRate,
+ double kArmOffsetToHorizantalZero,
+ double kArmAllowedClosedLoopError,
+ int kArmStallCurrentLimitAmps,
+ double kArmMaxVelocityRPM,
+ double kArmMaxAccelerationRPMperSecond,
+ boolean kEnableAdvanced
+ ) {
+ this.gearbox = gearbox;
+ this.kArmKp = kArmKp;
+ this.kArmKi = kArmKi;
+ this.kArmKd = kArmKd;
+ this.kArmkS = kArmkS;
+ this.kArmkG = kArmkG;
+ this.kArmKv = kArmkV;
+ this.kArmKa = kArmkA;
+ this.kArmReduction = kArmReduction;
+ this.kArmMass = Kilograms.convertFrom(kArmMassLbs, Pounds);
+ this.kArmLength = Inches.of(kArmLengthInches).in(Meters);
+ this.kArmStartingAngle = Degrees.of(kArmStartingAngle);
+ this.kMinAngle = Degrees.of(kMinAngle);
+ this.kMaxAngle = Degrees.of(kMaxAngle);
+ this.kArmInverted = kArmInverted;
+ this.kArmRampRate = kArmRampRate;
+ this.kArmOffsetToHorizantalZero = Degrees.of(kArmOffsetToHorizantalZero);
+ this.kArmAllowedClosedLoopError = ManipMath.Arm.convertAngleToSensorUnits(kArmReduction, Degrees.of(kArmAllowedClosedLoopError));
+ this.kArmStallCurrentLimitAmps = kArmStallCurrentLimitAmps;
+ this.kArmMaxVelocityRPM = ManipMath.Arm.convertAngleToSensorUnits(kArmReduction, Degrees.of(kArmMaxVelocityRPM)).per(
+ Second).in(RPM);
+ this.kArmMaxAccelerationRPMperSecond = ManipMath.Arm.convertAngleToSensorUnits(kArmReduction, Degrees.of(kArmMaxAccelerationRPMperSecond)).per(
+ Second).per(Second)
+ .in(RPM.per(Second));
+ this.kEnableAdvanced = kEnableAdvanced;
+ }
}
diff --git a/src/main/java/maniplib/utils/ManipElevatorConstants.java b/src/main/java/maniplib/utils/ManipElevatorConstants.java
index 75429a7..1772a31 100644
--- a/src/main/java/maniplib/utils/ManipElevatorConstants.java
+++ b/src/main/java/maniplib/utils/ManipElevatorConstants.java
@@ -1,116 +1,109 @@
package maniplib.utils;
-import static edu.wpi.first.units.Units.*;
-
import edu.wpi.first.math.system.plant.DCMotor;
import edu.wpi.first.units.measure.Distance;
+import static edu.wpi.first.units.Units.*;
+
public class ManipElevatorConstants {
- public final DCMotor gearbox;
- // PID Tuning values
- public final double kElevatorKp;
- public final double kElevatorKi;
- public final double kElevatorKd;
- // FeedForward Values
- public final double kElevatorkS; // volts(V)
- public final double kElevatorkV; // volt per velocity (V/(m/s))
- public final double kElevatorkA; // volt per acceleration (V/(m/s²))
- public final double kElevatorkG; // volts (V)
- // Sim values for calculations
- public final double kElevatorGearing;
- public final double kElevatorDrumRadius;
- public final double kElevatorCarriageMass;
- // Elevator movement constraints
- public final Distance kStartingHeightSim;
- public final Distance kMaxHeight;
- public final Distance kMinHeight;
- // Elevator speed constraints
- public final double kElevatorRampRate;
- public final int kElevatorCurrentLimit;
- public final double kMaxVelocity;
- public final double kMaxAcceleration;
- // Offset for an optional but heavily recommended abs encoder
- public final double kAbsEncoderOffset;
- // Whether to use basic or advanced controls and sim.
- public final boolean kEnableAdvanced;
- public final boolean kIsInverted;
+ public final DCMotor gearbox;
+ // PID Tuning values
+ public final double kElevatorKp;
+ public final double kElevatorKi;
+ public final double kElevatorKd;
+ // FeedForward Values
+ public final double kElevatorkS; // volts(V)
+ public final double kElevatorkV; // volt per velocity (V/(m/s))
+ public final double kElevatorkA; // volt per acceleration (V/(m/s²))
+ public final double kElevatorkG; // volts (V)
+ // Sim values for calculations
+ public final double kElevatorGearing;
+ public final double kElevatorDrumRadius;
+ public final double kElevatorCarriageMass;
+ // Elevator movement constraints
+ public final Distance kStartingHeightSim;
+ public final Distance kMaxHeight;
+ public final Distance kMinHeight;
+ // Elevator speed constraints
+ public final double kElevatorRampRate;
+ public final int kElevatorCurrentLimit;
+ public final double kMaxVelocity;
+ public final double kMaxAcceleration;
+ // Offset for an optional but heavily recommended abs encoder
+ public final double kAbsEncoderOffset;
+ // Whether to use basic or advanced controls and sim.
+ public final boolean kEnableAdvanced;
+ public final boolean kIsInverted;
- /**
- * Sets the constant values for {@link maniplib.ManipElevator}.
- *
- * @param gearbox DCMotor used to determine how many of which motor is being used.
- * @param kElevatorKp PID kP Tuning Value.
- * @param kElevatorKi PID kI Tuning Value.
- * @param kElevatorKd PID kD Tuning Value.
- * @param kElevatorkS FeedForward kS Tuning Value. volts(V)
- * @param kElevatorkV FeedForward kV Tuning Value. volt per velocity (V/(m/s))
- * @param kElevatorkA FeedForward kA Tuning Value. volt per acceleration (V/(m/s²))
- * @param kElevatorkG FeedForward kG Tuning Value. volts (V)
- * @param kElevatorGearing Gear ratio of the elevator, use gearbox w/o sprockets.
- * @param kElevatorDrumRadiusInches Radius of the drum, sprocket radius if using chain.
- * @param kElevatorCarriageMassLbs How much the carriage weighs in pounds.
- * @param kStartingSimHeightInches Where the elevator sim should set the elevator on start, in
- * inches.
- * @param kMaxHeightInches Elevators max height in inches. Used for soft limits as well.
- * @param kMinHeightInches Elevators min height in inches. Used for soft limits as well.
- * @param kIsInverted Whether to invert the lead motor. Positive speed should go up.
- * @param kElevatorRampRate Elevators ramp rate. 0.1 is recommended for most.
- * @param kElevatorCurrentLimit Elevators current limit. 40 is recommended for most.
- * @param kMaxVelocityMps Elevators max velocity in meters per second.
- * @param kMaxAccelerationMps Elevators max acceleration in meters per second.
- * @param kAbsEncoderOffset Offset for an optional but heavily recommended abs encoder. Set
- * elevator to kMinHeight then input the raw abs output.
- * @param kEnableAdvanced Determines whether to use advanced control and sim.
- */
- public ManipElevatorConstants(
- DCMotor gearbox,
- double kElevatorKp,
- double kElevatorKi,
- double kElevatorKd,
- double kElevatorkS,
- double kElevatorkV,
- double kElevatorkA,
- double kElevatorkG,
- double kElevatorGearing,
- double kElevatorDrumRadiusInches,
- double kElevatorCarriageMassLbs,
- double kStartingSimHeightInches,
- double kMaxHeightInches,
- double kMinHeightInches,
- boolean kIsInverted,
- double kElevatorRampRate,
- int kElevatorCurrentLimit,
- double kMaxVelocityMps,
- double kMaxAccelerationMps,
- double kAbsEncoderOffset,
- boolean kEnableAdvanced) {
- this.gearbox = gearbox;
- this.kElevatorKp = kElevatorKp;
- this.kElevatorKi = kElevatorKi;
- this.kElevatorKd = kElevatorKd;
- this.kElevatorkS = kElevatorkS;
- this.kElevatorkV = kElevatorkV;
- this.kElevatorkA = kElevatorkA;
- this.kElevatorkG = kElevatorkG;
- this.kElevatorGearing = kElevatorGearing;
- this.kElevatorDrumRadius =
- Meters.convertFrom(kElevatorDrumRadiusInches, Inches); // // Convert inches to meter double.
- this.kElevatorCarriageMass = Kilograms.convertFrom(kElevatorCarriageMassLbs, Pounds);
- this.kStartingHeightSim =
- Meters.of(
- Meters.convertFrom(kStartingSimHeightInches, Inches)); // Convert inches to meter units.
- this.kMaxHeight =
- Meters.of(Meters.convertFrom(kMaxHeightInches, Inches)); // Convert inches to meter units.
- this.kMinHeight =
- Meters.of(Meters.convertFrom(kMinHeightInches, Inches)); // Convert inches to meter units.
- this.kIsInverted = kIsInverted;
- this.kElevatorRampRate = kElevatorRampRate;
- this.kElevatorCurrentLimit = kElevatorCurrentLimit;
- this.kMaxVelocity = Meters.of(kMaxVelocityMps).per(Second).in(MetersPerSecond);
- this.kMaxAcceleration =
- Meters.of(kMaxAccelerationMps).per(Second).per(Second).in(MetersPerSecondPerSecond);
- this.kAbsEncoderOffset = kAbsEncoderOffset;
- this.kEnableAdvanced = kEnableAdvanced;
- }
+ /**
+ * Sets the constant values for {@link maniplib.ManipElevator}.
+ *
+ * @param gearbox DCMotor used to determine how many of which motor is being used.
+ * @param kElevatorKp PID kP Tuning Value.
+ * @param kElevatorKi PID kI Tuning Value.
+ * @param kElevatorKd PID kD Tuning Value.
+ * @param kElevatorkS FeedForward kS Tuning Value. volts(V)
+ * @param kElevatorkV FeedForward kV Tuning Value. volt per velocity (V/(m/s))
+ * @param kElevatorkA FeedForward kA Tuning Value. volt per acceleration (V/(m/s²))
+ * @param kElevatorkG FeedForward kG Tuning Value. volts (V)
+ * @param kElevatorGearing Gear ratio of the elevator, use gearbox w/o sprockets.
+ * @param kElevatorDrumRadiusInches Radius of the drum, sprocket radius if using chain.
+ * @param kElevatorCarriageMassLbs How much the carriage weighs in pounds.
+ * @param kStartingSimHeightInches Where the elevator sim should set the elevator on start, in inches.
+ * @param kMaxHeightInches Elevators max height in inches. Used for soft limits as well.
+ * @param kMinHeightInches Elevators min height in inches. Used for soft limits as well.
+ * @param kIsInverted Whether to invert the lead motor. Positive speed should go up.
+ * @param kElevatorRampRate Elevators ramp rate. 0.1 is recommended for most.
+ * @param kElevatorCurrentLimit Elevators current limit. 40 is recommended for most.
+ * @param kMaxVelocityMps Elevators max velocity in meters per second.
+ * @param kMaxAccelerationMps Elevators max acceleration in meters per second.
+ * @param kAbsEncoderOffset Offset for an optional but heavily recommended abs encoder. Set elevator to kMinHeight then input the raw abs output.
+ * @param kEnableAdvanced Determines whether to use advanced control and sim.
+ */
+ public ManipElevatorConstants(
+ DCMotor gearbox,
+ double kElevatorKp,
+ double kElevatorKi,
+ double kElevatorKd,
+ double kElevatorkS,
+ double kElevatorkV,
+ double kElevatorkA,
+ double kElevatorkG,
+ double kElevatorGearing,
+ double kElevatorDrumRadiusInches,
+ double kElevatorCarriageMassLbs,
+ double kStartingSimHeightInches,
+ double kMaxHeightInches,
+ double kMinHeightInches,
+ boolean kIsInverted,
+ double kElevatorRampRate,
+ int kElevatorCurrentLimit,
+ double kMaxVelocityMps,
+ double kMaxAccelerationMps,
+ double kAbsEncoderOffset,
+ boolean kEnableAdvanced
+ ) {
+ this.gearbox = gearbox;
+ this.kElevatorKp = kElevatorKp;
+ this.kElevatorKi = kElevatorKi;
+ this.kElevatorKd = kElevatorKd;
+ this.kElevatorkS = kElevatorkS;
+ this.kElevatorkV = kElevatorkV;
+ this.kElevatorkA = kElevatorkA;
+ this.kElevatorkG = kElevatorkG;
+ this.kElevatorGearing = kElevatorGearing;
+ this.kElevatorDrumRadius = Meters.convertFrom(kElevatorDrumRadiusInches, Inches); // // Convert inches to meter double.
+ this.kElevatorCarriageMass = Kilograms.convertFrom(kElevatorCarriageMassLbs, Pounds);
+ this.kStartingHeightSim = Meters.of(Meters.convertFrom(kStartingSimHeightInches, Inches)); // Convert inches to meter units.
+ this.kMaxHeight = Meters.of(Meters.convertFrom(kMaxHeightInches, Inches)); // Convert inches to meter units.
+ this.kMinHeight = Meters.of(Meters.convertFrom(kMinHeightInches, Inches)); // Convert inches to meter units.
+ this.kIsInverted = kIsInverted;
+ this.kElevatorRampRate = kElevatorRampRate;
+ this.kElevatorCurrentLimit = kElevatorCurrentLimit;
+ this.kMaxVelocity = Meters.of(kMaxVelocityMps).per(Second).in(MetersPerSecond);
+ this.kMaxAcceleration = Meters.of(kMaxAccelerationMps).per(Second).per(Second).in(MetersPerSecondPerSecond);
+ this.kAbsEncoderOffset = kAbsEncoderOffset;
+ this.kEnableAdvanced = kEnableAdvanced;
+ }
}
diff --git a/src/main/java/maniplib/utils/ManipMath.java b/src/main/java/maniplib/utils/ManipMath.java
index 6dec99f..3dd30ed 100644
--- a/src/main/java/maniplib/utils/ManipMath.java
+++ b/src/main/java/maniplib/utils/ManipMath.java
@@ -1,57 +1,60 @@
package maniplib.utils;
-import static edu.wpi.first.units.Units.Meters;
-import static edu.wpi.first.units.Units.Rotations;
-
import edu.wpi.first.units.measure.Angle;
import edu.wpi.first.units.measure.Distance;
-public class ManipMath {
+import static edu.wpi.first.units.Units.Meters;
+import static edu.wpi.first.units.Units.Rotations;
- public static class Arm {
+public class ManipMath {
- /**
- * Convert {@link Angle} into motor {@link Angle}
- *
- * @param measurement Angle, to convert.
- * @return {@link Angle} equivalent to rotations of the motor.
- */
- public static Angle convertAngleToSensorUnits(double reduction, Angle measurement) {
- return Rotations.of(measurement.in(Rotations) * reduction);
- }
+ public static class Arm {
+
+ /**
+ * Convert {@link Angle} into motor {@link Angle}
+ *
+ * @param measurement Angle, to convert.
+ * @return {@link Angle} equivalent to rotations of the motor.
+ */
+ public static Angle convertAngleToSensorUnits(double reduction, Angle measurement) {
+ return Rotations.of(measurement.in(Rotations) * reduction);
+ }
+
+ /**
+ * Convert motor rotations {@link Angle} into usable {@link Angle}
+ *
+ * @param measurement Motor rotations
+ * @return Usable angle.
+ */
+ public static Angle convertSensorUnitsToAngle(double reduction, Angle measurement) {
+ return Rotations.of(measurement.in(Rotations) / reduction);
+
+ }
- /**
- * Convert motor rotations {@link Angle} into usable {@link Angle}
- *
- * @param measurement Motor rotations
- * @return Usable angle.
- */
- public static Angle convertSensorUnitsToAngle(double reduction, Angle measurement) {
- return Rotations.of(measurement.in(Rotations) / reduction);
- }
- }
-
- public static class Elevator {
- /**
- * Convert {@link Distance} into {@link Angle}
- *
- * @param distance Distance, usually Meters.
- * @return {@link Angle} equivalent to rotations of the motor.
- */
- public static Angle convertDistanceToRotations(
- double drumRadius, double gearing, Distance distance) {
- return Rotations.of(distance.in(Meters) / (drumRadius * 2 * Math.PI) * gearing);
}
- /**
- * Convert {@link Angle} into {@link Distance}
- *
- * @param rotations Rotations of the motor
- * @return {@link Distance} of the elevator.
- */
- public static Distance convertRotationsToDistance(
- double drumRadius, double gearing, Angle rotations) {
- return Meters.of((rotations.in(Rotations) / gearing) * (drumRadius * 2 * Math.PI));
+ public static class Elevator {
+ /**
+ * Convert {@link Distance} into {@link Angle}
+ *
+ * @param distance Distance, usually Meters.
+ * @return {@link Angle} equivalent to rotations of the motor.
+ */
+ public static Angle convertDistanceToRotations(double drumRadius, double gearing, Distance distance) {
+ return Rotations.of(distance.in(Meters) /
+ (drumRadius * 2 * Math.PI) *
+ gearing);
+ }
+
+ /**
+ * Convert {@link Angle} into {@link Distance}
+ *
+ * @param rotations Rotations of the motor
+ * @return {@link Distance} of the elevator.
+ */
+ public static Distance convertRotationsToDistance(double drumRadius, double gearing, Angle rotations) {
+ return Meters.of((rotations.in(Rotations) / gearing) *
+ (drumRadius * 2 * Math.PI));
+ }
}
- }
}
diff --git a/src/main/java/maniplib/utils/PIDControlType.java b/src/main/java/maniplib/utils/PIDControlType.java
index d5183f8..61f3ea7 100644
--- a/src/main/java/maniplib/utils/PIDControlType.java
+++ b/src/main/java/maniplib/utils/PIDControlType.java
@@ -2,13 +2,20 @@
public class PIDControlType {
- public static ControlType controlType;
-
- /** ControlType to run PIDControllers at. */
- public enum ControlType {
- /** Position Control. */
- POSITION,
- /** Velocity Control. */
- VELOCITY
- }
+ public static ControlType controlType;
+
+ /**
+ * ControlType to run PIDControllers at.
+ */
+ public enum ControlType {
+ /**
+ * Position Control.
+ */
+ POSITION,
+ /**
+ * Velocity Control.
+ */
+ VELOCITY
+ }
+
}
diff --git a/src/main/java/maniplib/utils/PIDFConfig.java b/src/main/java/maniplib/utils/PIDFConfig.java
index 14f92f4..b2facf3 100644
--- a/src/main/java/maniplib/utils/PIDFConfig.java
+++ b/src/main/java/maniplib/utils/PIDFConfig.java
@@ -3,82 +3,99 @@
import edu.wpi.first.math.controller.PIDController;
import maniplib.utils.deserializer.PIDFRange;
-/** Hold the PIDF and Integral Zone values for a PID. */
+/**
+ * Hold the PIDF and Integral Zone values for a PID.
+ */
public class PIDFConfig {
- /** Proportional Gain for PID. */
- public double p;
- /** Integral Gain for PID. */
- public double i;
- /** Derivative Gain for PID. */
- public double d;
- /** Feedforward value for PID. */
- public double f;
- /** Integral zone of the PID. */
- public double iz;
+ /**
+ * Proportional Gain for PID.
+ */
+ public double p;
+ /**
+ * Integral Gain for PID.
+ */
+ public double i;
+ /**
+ * Derivative Gain for PID.
+ */
+ public double d;
+ /**
+ * Feedforward value for PID.
+ */
+ public double f;
+ /**
+ * Integral zone of the PID.
+ */
+ public double iz;
- /** The PIDF output range. */
- public PIDFRange output = new PIDFRange();
+ /**
+ * The PIDF output range.
+ */
+ public PIDFRange output = new PIDFRange();
- /** Used when parsing PIDF values from JSON. */
- public PIDFConfig() {}
+ /**
+ * Used when parsing PIDF values from JSON.
+ */
+ public PIDFConfig() {
+ }
- /**
- * PIDF Config constructor to contain the values.
- *
- * @param p P gain.
- * @param i I gain.
- * @param d D gain.
- * @param f F gain.
- * @param iz Intergral zone.
- */
- public PIDFConfig(double p, double i, double d, double f, double iz) {
- this.p = p;
- this.i = i;
- this.d = d;
- this.f = f;
- this.iz = iz;
- }
+ /**
+ * PIDF Config constructor to contain the values.
+ *
+ * @param p P gain.
+ * @param i I gain.
+ * @param d D gain.
+ * @param f F gain.
+ * @param iz Intergral zone.
+ */
+ public PIDFConfig(double p, double i, double d, double f, double iz) {
+ this.p = p;
+ this.i = i;
+ this.d = d;
+ this.f = f;
+ this.iz = iz;
+ }
- /**
- * PIDF Config constructor to contain the values.
- *
- * @param p P gain.
- * @param i I gain.
- * @param d D gain.
- * @param f F gain.
- */
- public PIDFConfig(double p, double i, double d, double f) {
- this(p, i, d, f, 0);
- }
+ /**
+ * PIDF Config constructor to contain the values.
+ *
+ * @param p P gain.
+ * @param i I gain.
+ * @param d D gain.
+ * @param f F gain.
+ */
+ public PIDFConfig(double p, double i, double d, double f) {
+ this(p, i, d, f, 0);
+ }
- /**
- * PIDF Config constructor to contain the values.
- *
- * @param p P gain.
- * @param i I gain.
- * @param d D gain.
- */
- public PIDFConfig(double p, double i, double d) {
- this(p, i, d, 0, 0);
- }
+ /**
+ * PIDF Config constructor to contain the values.
+ *
+ * @param p P gain.
+ * @param i I gain.
+ * @param d D gain.
+ */
+ public PIDFConfig(double p, double i, double d) {
+ this(p, i, d, 0, 0);
+ }
- /**
- * PIDF Config constructor to contain the values.
- *
- * @param p P gain.
- * @param d D gain.
- */
- public PIDFConfig(double p, double d) {
- this(p, 0, d, 0, 0);
- }
+ /**
+ * PIDF Config constructor to contain the values.
+ *
+ * @param p P gain.
+ * @param d D gain.
+ */
+ public PIDFConfig(double p, double d) {
+ this(p, 0, d, 0, 0);
+ }
- /**
- * Create a PIDController from the PID values.
- *
- * @return PIDController.
- */
- public PIDController createPIDController() {
- return new PIDController(p, i, d);
- }
+ /**
+ * Create a PIDController from the PID values.
+ *
+ * @return PIDController.
+ */
+ public PIDController createPIDController() {
+ return new PIDController(p, i, d);
+ }
}
diff --git a/src/main/java/maniplib/utils/deserializer/PIDFRange.java b/src/main/java/maniplib/utils/deserializer/PIDFRange.java
index 339ad79..2b67aa7 100644
--- a/src/main/java/maniplib/utils/deserializer/PIDFRange.java
+++ b/src/main/java/maniplib/utils/deserializer/PIDFRange.java
@@ -1,10 +1,16 @@
package maniplib.utils.deserializer;
-/** Class to hold the minimum and maximum input or output of the PIDF. */
+/**
+ * Class to hold the minimum and maximum input or output of the PIDF.
+ */
public class PIDFRange {
- /** Minimum value. */
- public double min = -1;
- /** Maximum value. */
- public double max = 1;
+ /**
+ * Minimum value.
+ */
+ public double min = -1;
+ /**
+ * Maximum value.
+ */
+ public double max = 1;
}