From 69edd17103540cddde3b795346983dac1b431555 Mon Sep 17 00:00:00 2001 From: thenetworkgrinch Date: Fri, 24 Feb 2023 19:11:05 -0600 Subject: [PATCH] Updated swervelib telemetry configurability. Reliable gyroscope modulo --- docs/allclasses-index.html | 50 +- docs/allpackages-index.html | 4 +- docs/constant-values.html | 4 +- docs/help-doc.html | 4 +- docs/index-files/index-1.html | 10 +- docs/index-files/index-10.html | 4 +- docs/index-files/index-11.html | 8 +- docs/index-files/index-12.html | 12 +- docs/index-files/index-13.html | 8 +- docs/index-files/index-14.html | 4 +- docs/index-files/index-15.html | 8 +- docs/index-files/index-16.html | 4 +- docs/index-files/index-17.html | 62 +- docs/index-files/index-18.html | 6 +- docs/index-files/index-19.html | 4 +- docs/index-files/index-2.html | 8 +- docs/index-files/index-20.html | 22 +- docs/index-files/index-21.html | 4 +- docs/index-files/index-22.html | 4 +- docs/index-files/index-23.html | 4 +- docs/index-files/index-24.html | 4 +- docs/index-files/index-25.html | 4 +- docs/index-files/index-3.html | 24 +- docs/index-files/index-4.html | 8 +- docs/index-files/index-5.html | 8 +- docs/index-files/index-6.html | 12 +- docs/index-files/index-7.html | 16 +- docs/index-files/index-8.html | 8 +- docs/index-files/index-9.html | 12 +- docs/index.html | 4 +- docs/member-search-index.js | 2 +- docs/overview-summary.html | 4 +- docs/overview-tree.html | 6 +- docs/swervelib/SwerveController.html | 4 +- docs/swervelib/SwerveDrive.html | 240 ++++--- docs/swervelib/SwerveModule.html | 4 +- .../encoders/AnalogAbsoluteEncoderSwerve.html | 4 +- docs/swervelib/encoders/CANCoderSwerve.html | 4 +- .../encoders/SparkMaxEncoderSwerve.html | 4 +- .../encoders/SwerveAbsoluteEncoder.html | 4 +- docs/swervelib/encoders/package-summary.html | 4 +- docs/swervelib/encoders/package-tree.html | 4 +- docs/swervelib/imu/ADIS16448Swerve.html | 4 +- docs/swervelib/imu/ADIS16470Swerve.html | 4 +- docs/swervelib/imu/ADXRS450Swerve.html | 4 +- docs/swervelib/imu/AnalogGyroSwerve.html | 4 +- docs/swervelib/imu/NavXSwerve.html | 4 +- docs/swervelib/imu/Pigeon2Swerve.html | 4 +- docs/swervelib/imu/PigeonSwerve.html | 4 +- docs/swervelib/imu/SwerveIMU.html | 4 +- docs/swervelib/imu/package-summary.html | 4 +- docs/swervelib/imu/package-tree.html | 4 +- docs/swervelib/math/SwerveKinematics2.html | 4 +- docs/swervelib/math/SwerveMath.html | 4 +- docs/swervelib/math/SwerveModuleState2.html | 4 +- docs/swervelib/math/package-summary.html | 4 +- docs/swervelib/math/package-tree.html | 4 +- .../motors/SparkMaxBrushedMotorSwerve.html | 655 ++++++++++++++++++ .../SparkMaxSwerve.SparkMAX_slotIdx.html | 4 +- docs/swervelib/motors/SparkMaxSwerve.html | 4 +- docs/swervelib/motors/SwerveMotor.html | 6 +- docs/swervelib/motors/TalonFXSwerve.html | 4 +- docs/swervelib/motors/TalonSRXSwerve.html | 4 +- docs/swervelib/motors/package-summary.html | 26 +- docs/swervelib/motors/package-tree.html | 5 +- docs/swervelib/package-summary.html | 4 +- docs/swervelib/package-tree.html | 4 +- docs/swervelib/parser/PIDFConfig.html | 4 +- .../parser/SwerveControllerConfiguration.html | 4 +- .../parser/SwerveDriveConfiguration.html | 4 +- .../parser/SwerveModuleConfiguration.html | 4 +- .../SwerveModulePhysicalCharacteristics.html | 4 +- docs/swervelib/parser/SwerveParser.html | 4 +- .../parser/deserializer/PIDFRange.html | 4 +- .../parser/deserializer/package-summary.html | 4 +- .../parser/deserializer/package-tree.html | 4 +- .../parser/json/ControllerPropertiesJson.html | 4 +- docs/swervelib/parser/json/DeviceJson.html | 4 +- docs/swervelib/parser/json/ModuleJson.html | 4 +- .../parser/json/MotorConfigDouble.html | 4 +- .../swervelib/parser/json/MotorConfigInt.html | 4 +- .../parser/json/PIDFPropertiesJson.html | 4 +- .../parser/json/PhysicalPropertiesJson.html | 4 +- .../parser/json/SwerveDriveJson.html | 4 +- .../parser/json/modules/BoolMotorJson.html | 4 +- .../parser/json/modules/LocationJson.html | 4 +- .../parser/json/modules/package-summary.html | 4 +- .../parser/json/modules/package-tree.html | 4 +- .../parser/json/package-summary.html | 4 +- docs/swervelib/parser/json/package-tree.html | 4 +- docs/swervelib/parser/package-summary.html | 4 +- docs/swervelib/parser/package-tree.html | 4 +- .../simulation/SwerveIMUSimulation.html | 4 +- .../simulation/SwerveModuleSimulation.html | 4 +- .../ctre/PhysicsSim.SimProfile.html | 4 +- .../swervelib/simulation/ctre/PhysicsSim.html | 8 +- .../simulation/ctre/TalonFXSimProfile.html | 4 +- .../simulation/ctre/TalonSRXSimProfile.html | 4 +- .../simulation/ctre/VictorSPXSimProfile.html | 4 +- .../simulation/ctre/package-summary.html | 4 +- .../simulation/ctre/package-tree.html | 4 +- .../swervelib/simulation/package-summary.html | 4 +- docs/swervelib/simulation/package-tree.html | 4 +- ...erveDriveTelemetry.TelemetryVerbosity.html | 279 ++++++++ .../telemetry/SwerveDriveTelemetry.html | 97 ++- docs/swervelib/telemetry/package-summary.html | 20 +- docs/swervelib/telemetry/package-tree.html | 18 +- docs/type-search-index.js | 2 +- swervelib/SwerveDrive.java | 258 ++++--- swervelib/SwerveModule.java | 32 +- swervelib/imu/ADIS16448Swerve.java | 10 +- swervelib/imu/ADIS16470Swerve.java | 10 +- swervelib/imu/ADXRS450Swerve.java | 6 +- swervelib/imu/AnalogGyroSwerve.java | 6 +- swervelib/imu/NavXSwerve.java | 11 +- .../motors/SparkMaxBrushedMotorSwerve.java | 382 ++++++++++ swervelib/motors/TalonFXSwerve.java | 10 +- swervelib/motors/TalonSRXSwerve.java | 4 +- swervelib/parser/json/DeviceJson.java | 26 + swervelib/simulation/ctre/PhysicsSim.java | 8 +- swervelib/telemetry/SwerveDriveTelemetry.java | 60 +- 121 files changed, 2280 insertions(+), 501 deletions(-) create mode 100644 docs/swervelib/motors/SparkMaxBrushedMotorSwerve.html create mode 100644 docs/swervelib/telemetry/SwerveDriveTelemetry.TelemetryVerbosity.html create mode 100644 swervelib/motors/SparkMaxBrushedMotorSwerve.java diff --git a/docs/allclasses-index.html b/docs/allclasses-index.html index ec741b6..60f44ff 100644 --- a/docs/allclasses-index.html +++ b/docs/allclasses-index.html @@ -1,11 +1,11 @@ - + All Classes and Interfaces - + @@ -148,46 +148,54 @@ loadScripts(document, 'script');
SwerveIMU interface for the Pigeon.
-
SparkMaxEncoderSwerve
+
SparkMaxBrushedMotorSwerve
+
Brushed motor control with SparkMax.
+
+
SparkMaxEncoderSwerve
+
SparkMax absolute encoder, attached through the data port.
-
SparkMaxSwerve
-
+ +
An implementation of CANSparkMax as a SwerveMotor.
- -
+ +
REV Slots for PID configuration.
- -
+ +
Swerve abstraction class to define a standard interface with absolute encoders for swerve modules..
- -
+ +
Controller class used to convert raw inputs into robot speeds.
- -
+ +
Swerve Controller configuration class which is used to configure SwerveController.
- -
+ +
Swerve Drive class representing and controlling the swerve drive.
- -
+ +
Swerve drive configurations used during SwerveDrive construction.
- -
+ +
SwerveDrive JSON parsed class.
- -
+ +
Telemetry to describe the SwerveDrive following frc-web-components.
+ +
+
Verbosity of telemetry data sent back.
+
Swerve IMU abstraction to define a standard interface with a swerve drive.
diff --git a/docs/allpackages-index.html b/docs/allpackages-index.html index 524a6cc..4b0a9aa 100644 --- a/docs/allpackages-index.html +++ b/docs/allpackages-index.html @@ -1,11 +1,11 @@ - + All Packages - + diff --git a/docs/constant-values.html b/docs/constant-values.html index 4fed973..68ab5f8 100644 --- a/docs/constant-values.html +++ b/docs/constant-values.html @@ -1,11 +1,11 @@ - + Constant Field Values - + diff --git a/docs/help-doc.html b/docs/help-doc.html index aa4b172..741f235 100644 --- a/docs/help-doc.html +++ b/docs/help-doc.html @@ -1,11 +1,11 @@ - + API Help - + diff --git a/docs/index-files/index-1.html b/docs/index-files/index-1.html index c951bb2..02b65cc 100644 --- a/docs/index-files/index-1.html +++ b/docs/index-files/index-1.html @@ -1,11 +1,11 @@ - + A-Index - + @@ -53,6 +53,10 @@ loadScripts(document, 'script'); A B C D E F G H I K L M N O P R S T U V W X Y Z _ 
All Classes and Interfaces|All Packages|Constant Field Values

A

+
absoluteEncoder - Variable in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Absolute encoder attached to the SparkMax (if exists)
+
absoluteEncoder - Variable in class swervelib.motors.SparkMaxSwerve
Absolute encoder attached to the SparkMax (if exists)
@@ -109,7 +113,7 @@ loadScripts(document, 'script');
Adds a VictorSPX controller to the simulator.
-
addVisionMeasurement(Pose2d, double, boolean) - Method in class swervelib.SwerveDrive
+
addVisionMeasurement(Pose2d, double, boolean, double) - Method in class swervelib.SwerveDrive
Add a vision measurement to the SwerveDrivePoseEstimator and update the SwerveIMU gyro reading with the given timestamp of the vision measurement.
diff --git a/docs/index-files/index-10.html b/docs/index-files/index-10.html index 0933274..9dad742 100644 --- a/docs/index-files/index-10.html +++ b/docs/index-files/index-10.html @@ -1,11 +1,11 @@ - + K-Index - + diff --git a/docs/index-files/index-11.html b/docs/index-files/index-11.html index a92f418..9230e0b 100644 --- a/docs/index-files/index-11.html +++ b/docs/index-files/index-11.html @@ -1,11 +1,11 @@ - + L-Index - + @@ -92,6 +92,10 @@ loadScripts(document, 'script');
Point all modules toward the robot center, thus making the robot very difficult to move.
+
LOW - Enum constant in enum class swervelib.telemetry.SwerveDriveTelemetry.TelemetryVerbosity
+
+
Low telemetry data, only post the robot position on the field.
+
A B C D E F G H I K L M N O P R S T U V W X Y Z _ 
All Classes and Interfaces|All Packages|Constant Field Values
diff --git a/docs/index-files/index-12.html b/docs/index-files/index-12.html index 324d709..8675d39 100644 --- a/docs/index-files/index-12.html +++ b/docs/index-files/index-12.html @@ -1,11 +1,11 @@ - + M-Index - + @@ -77,6 +77,10 @@ loadScripts(document, 'script');
Previous CoR
+
MACHINE - Enum constant in enum class swervelib.telemetry.SwerveDriveTelemetry.TelemetryVerbosity
+
+
Only send the machine readable data related to swerve drive.
+
max - Variable in class swervelib.parser.deserializer.PIDFRange
Maximum value.
@@ -167,6 +171,10 @@ loadScripts(document, 'script');
Counter to synchronize the modules relative encoder with absolute encoder when not moving.
+
motor - Variable in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
SparkMAX Instance.
+
motor - Variable in class swervelib.motors.SparkMaxSwerve
SparkMAX Instance.
diff --git a/docs/index-files/index-13.html b/docs/index-files/index-13.html index edb522b..dc5d462 100644 --- a/docs/index-files/index-13.html +++ b/docs/index-files/index-13.html @@ -1,11 +1,11 @@ - + N-Index - + @@ -61,6 +61,10 @@ loadScripts(document, 'script');
Constructor for the NavX swerve.
+
NONE - Enum constant in enum class swervelib.telemetry.SwerveDriveTelemetry.TelemetryVerbosity
+
+
No telemetry data is sent back.
+
normalizeAngle(double) - Static method in class swervelib.math.SwerveMath
Normalize an angle to be within 0 to 360.
diff --git a/docs/index-files/index-14.html b/docs/index-files/index-14.html index 1d9b7d4..4b4d6c9 100644 --- a/docs/index-files/index-14.html +++ b/docs/index-files/index-14.html @@ -1,11 +1,11 @@ - + O-Index - + diff --git a/docs/index-files/index-15.html b/docs/index-files/index-15.html index 238f01c..16fde7b 100644 --- a/docs/index-files/index-15.html +++ b/docs/index-files/index-15.html @@ -1,11 +1,11 @@ - + P-Index - + @@ -81,6 +81,10 @@ loadScripts(document, 'script');
Holds information about a simulated device.
+
pid - Variable in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Closed-loop PID controller.
+
pid - Variable in class swervelib.motors.SparkMaxSwerve
Closed-loop PID controller.
diff --git a/docs/index-files/index-16.html b/docs/index-files/index-16.html index 9cb7a23..1be80da 100644 --- a/docs/index-files/index-16.html +++ b/docs/index-files/index-16.html @@ -1,11 +1,11 @@ - + R-Index - + diff --git a/docs/index-files/index-17.html b/docs/index-files/index-17.html index 27b4725..74ab193 100644 --- a/docs/index-files/index-17.html +++ b/docs/index-files/index-17.html @@ -1,11 +1,11 @@ - + S-Index - + @@ -53,6 +53,10 @@ loadScripts(document, 'script'); A B C D E F G H I K L M N O P R S T U V W X Y Z _ 
All Classes and Interfaces|All Packages|Constant Field Values

S

+
set(double) - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Set the percentage output.
+
set(double) - Method in class swervelib.motors.SparkMaxSwerve
Set the percentage output.
@@ -69,6 +73,10 @@ loadScripts(document, 'script');
Set the percentage output.
+
setAbsoluteEncoder(SwerveAbsoluteEncoder) - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Set the absolute encoder to be a compatible absolute encoder.
+
setAbsoluteEncoder(SwerveAbsoluteEncoder) - Method in class swervelib.motors.SparkMaxSwerve
Set the absolute encoder to be a compatible absolute encoder.
@@ -97,6 +105,11 @@ loadScripts(document, 'script');
Set chassis speeds with closed-loop velocity control.
+
setCurrentLimit(int) - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
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 swervelib.motors.SparkMaxSwerve
Set the current limit for the swerve drive motor, remember this may cause jumping if used in conjunction with @@ -121,6 +134,10 @@ loadScripts(document, 'script');
Set the desired state of the swerve module.
+
setInverted(boolean) - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Set the motor to be inverted.
+
setInverted(boolean) - Method in class swervelib.motors.SparkMaxSwerve
Set the motor to be inverted.
@@ -137,6 +154,10 @@ loadScripts(document, 'script');
Set the motor to be inverted.
+
setLoopRampRate(double) - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Set the maximum rate the open/closed loop output can change by.
+
setLoopRampRate(double) - Method in class swervelib.motors.SparkMaxSwerve
Set the maximum rate the open/closed loop output can change by.
@@ -157,6 +178,10 @@ loadScripts(document, 'script');
Set the module states (azimuth and velocity) directly.
+
setMotorBrake(boolean) - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Set the idle mode.
+
setMotorBrake(boolean) - Method in class swervelib.motors.SparkMaxSwerve
Set the idle mode.
@@ -181,6 +206,10 @@ loadScripts(document, 'script');
Sets the drive motors to brake/coast mode.
+
setPosition(double) - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Set the integrated encoder position.
+
setPosition(double) - Method in class swervelib.motors.SparkMaxSwerve
Set the integrated encoder position.
@@ -197,6 +226,10 @@ loadScripts(document, 'script');
Set the integrated encoder position.
+
setReference(double, double) - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Set the closed loop PID controller reference point.
+
setReference(double, double) - Method in class swervelib.motors.SparkMaxSwerve
Set the closed loop PID controller reference point.
@@ -213,6 +246,10 @@ loadScripts(document, 'script');
Set the closed loop PID controller reference point.
+
setVoltageCompensation(double) - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Set the voltage compensation for the swerve module motor.
+
setVoltageCompensation(double) - Method in class swervelib.motors.SparkMaxSwerve
Set the voltage compensation for the swerve module motor.
@@ -287,6 +324,18 @@ loadScripts(document, 'script');
SparkMAX_slotIdx() - Constructor for enum class swervelib.motors.SparkMaxSwerve.SparkMAX_slotIdx
 
+
SparkMaxBrushedMotorSwerve - Class in swervelib.motors
+
+
Brushed motor control with SparkMax.
+
+
SparkMaxBrushedMotorSwerve(int, boolean, SparkMaxRelativeEncoder.Type, int, boolean) - Constructor for class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Initialize the SwerveMotor as a CANSparkMax connected to a Brushless Motor.
+
+
SparkMaxBrushedMotorSwerve(CANSparkMax, boolean, SparkMaxRelativeEncoder.Type, int, boolean) - Constructor for class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Initialize the swerve motor.
+
SparkMaxEncoderSwerve - Class in swervelib.encoders
SparkMax absolute encoder, attached through the data port.
@@ -319,6 +368,11 @@ loadScripts(document, 'script');
Current simulated swerve module state.
+
stateStdDevs - Variable in class swervelib.SwerveDrive
+
+
Trustworthiness of the internal model of how motors should be moving Measured in expected standard deviation + (meters of position and degrees of rotation)
+
SwerveAbsoluteEncoder - Class in swervelib.encoders
Swerve abstraction class to define a standard interface with absolute encoders for swerve modules..
@@ -390,6 +444,10 @@ loadScripts(document, 'script');
SwerveDriveTelemetry() - Constructor for class swervelib.telemetry.SwerveDriveTelemetry
 
+
SwerveDriveTelemetry.TelemetryVerbosity - Enum Class in swervelib.telemetry
+
+
Verbosity of telemetry data sent back.
+
SwerveIMU - Class in swervelib.imu
Swerve IMU abstraction to define a standard interface with a swerve drive.
diff --git a/docs/index-files/index-18.html b/docs/index-files/index-18.html index 5618f02..e8c1d8b 100644 --- a/docs/index-files/index-18.html +++ b/docs/index-files/index-18.html @@ -1,11 +1,11 @@ - + T-Index - + @@ -97,6 +97,8 @@ loadScripts(document, 'script');
Constructor for TalonSRX swerve motor.
+
TelemetryVerbosity() - Constructor for enum class swervelib.telemetry.SwerveDriveTelemetry.TelemetryVerbosity
+
 
thetaController - Variable in class swervelib.SwerveController
PID Controller for the robot heading.
diff --git a/docs/index-files/index-19.html b/docs/index-files/index-19.html index dec6de6..e3b1169 100644 --- a/docs/index-files/index-19.html +++ b/docs/index-files/index-19.html @@ -1,11 +1,11 @@ - + U-Index - + diff --git a/docs/index-files/index-2.html b/docs/index-files/index-2.html index 36b9019..3e24d9c 100644 --- a/docs/index-files/index-2.html +++ b/docs/index-files/index-2.html @@ -1,11 +1,11 @@ - + B-Index - + @@ -63,6 +63,10 @@ loadScripts(document, 'script');
BoolMotorJson() - Constructor for class swervelib.parser.json.modules.BoolMotorJson
 
+
burnFlash() - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Save the configurations from flash to EEPROM.
+
burnFlash() - Method in class swervelib.motors.SparkMaxSwerve
Save the configurations from flash to EEPROM.
diff --git a/docs/index-files/index-20.html b/docs/index-files/index-20.html index 628ad27..6c78a41 100644 --- a/docs/index-files/index-20.html +++ b/docs/index-files/index-20.html @@ -1,11 +1,11 @@ - + V-Index - + @@ -57,11 +57,20 @@ loadScripts(document, 'script');
Returns the enum constant of this class with the specified name.
+
valueOf(String) - Static method in enum class swervelib.telemetry.SwerveDriveTelemetry.TelemetryVerbosity
+
+
Returns the enum constant of this class with the specified name.
+
values() - Static method in enum class swervelib.motors.SparkMaxSwerve.SparkMAX_slotIdx
Returns an array containing the constants of this enum class, in the order they are declared.
+
values() - Static method in enum class swervelib.telemetry.SwerveDriveTelemetry.TelemetryVerbosity
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
Velocity - Enum constant in enum class swervelib.motors.SparkMaxSwerve.SparkMAX_slotIdx
Slot 2, used for velocity PID's.
@@ -70,6 +79,10 @@ the order they are declared.
PIDF configuration options for the drive motor closed-loop PID controller.
+
verbosity - Static variable in class swervelib.telemetry.SwerveDriveTelemetry
+
+
The current telemetry verbosity level.
+
VictorSPXSimProfile - Class in swervelib.simulation.ctre
Holds information about a simulated VictorSPX.
@@ -78,6 +91,11 @@ the order they are declared.
Creates a new simulation profile for a VictorSPX device.
+
visionMeasurementStdDevs - Variable in class swervelib.SwerveDrive
+
+
Trustworthiness of the vision system Measured in expected standard deviation (meters of position and degrees of + rotation)
+
A B C D E F G H I K L M N O P R S T U V W X Y Z _ 
All Classes and Interfaces|All Packages|Constant Field Values
diff --git a/docs/index-files/index-21.html b/docs/index-files/index-21.html index e2ba980..1362875 100644 --- a/docs/index-files/index-21.html +++ b/docs/index-files/index-21.html @@ -1,11 +1,11 @@ - + W-Index - + diff --git a/docs/index-files/index-22.html b/docs/index-files/index-22.html index 6f55131..e6a9db5 100644 --- a/docs/index-files/index-22.html +++ b/docs/index-files/index-22.html @@ -1,11 +1,11 @@ - + X-Index - + diff --git a/docs/index-files/index-23.html b/docs/index-files/index-23.html index 4dbd656..ce592ad 100644 --- a/docs/index-files/index-23.html +++ b/docs/index-files/index-23.html @@ -1,11 +1,11 @@ - + Y-Index - + diff --git a/docs/index-files/index-24.html b/docs/index-files/index-24.html index 56643e4..4be576c 100644 --- a/docs/index-files/index-24.html +++ b/docs/index-files/index-24.html @@ -1,11 +1,11 @@ - + Z-Index - + diff --git a/docs/index-files/index-25.html b/docs/index-files/index-25.html index 5aaa4aa..bac994b 100644 --- a/docs/index-files/index-25.html +++ b/docs/index-files/index-25.html @@ -1,11 +1,11 @@ - + _-Index - + diff --git a/docs/index-files/index-3.html b/docs/index-files/index-3.html index ad02154..0e4fa0b 100644 --- a/docs/index-files/index-3.html +++ b/docs/index-files/index-3.html @@ -1,11 +1,11 @@ - + C-Index - + @@ -149,6 +149,10 @@ loadScripts(document, 'script');
Clear sticky faults on IMU.
+
clearStickyFaults() - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Clear the sticky faults on the motor controller.
+
clearStickyFaults() - Method in class swervelib.motors.SparkMaxSwerve
Clear the sticky faults on the motor controller.
@@ -202,10 +206,18 @@ loadScripts(document, 'script');
Set the CAN status frames.
+
configureCANStatusFrames(int, int, int, int, int) - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Set the CAN status frames.
+
configureCANStatusFrames(int, int, int, int, int) - Method in class swervelib.motors.SparkMaxSwerve
Set the CAN status frames.
+
configureIntegratedEncoder(double) - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Configure the integrated encoder for the swerve module.
+
configureIntegratedEncoder(double) - Method in class swervelib.motors.SparkMaxSwerve
Configure the integrated encoder for the swerve module.
@@ -222,6 +234,10 @@ loadScripts(document, 'script');
Configure the integrated encoder for the swerve module.
+
configurePIDF(PIDFConfig) - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Configure the PIDF values for the closed loop controller.
+
configurePIDF(PIDFConfig) - Method in class swervelib.motors.SparkMaxSwerve
Configure the PIDF values for the closed loop controller.
@@ -238,6 +254,10 @@ loadScripts(document, 'script');
Configure the PIDF values for the closed loop controller.
+
configurePIDWrapping(double, double) - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Configure the PID wrapping for the position closed loop controller.
+
configurePIDWrapping(double, double) - Method in class swervelib.motors.SparkMaxSwerve
Configure the PID wrapping for the position closed loop controller.
diff --git a/docs/index-files/index-4.html b/docs/index-files/index-4.html index 6366832..011b994 100644 --- a/docs/index-files/index-4.html +++ b/docs/index-files/index-4.html @@ -1,11 +1,11 @@ - + D-Index - + @@ -104,6 +104,10 @@ loadScripts(document, 'script');
The primary method for controlling the drivebase.
+
drive(Translation2d, double, boolean, boolean, boolean) - Method in class swervelib.SwerveDrive
+
+
The primary method for controlling the drivebase.
+
driveEncoderPulsePerRotation - Variable in class swervelib.parser.SwerveModulePhysicalCharacteristics
Drive motor encoder pulse per rotation.
diff --git a/docs/index-files/index-5.html b/docs/index-files/index-5.html index 010379a..c532cb4 100644 --- a/docs/index-files/index-5.html +++ b/docs/index-files/index-5.html @@ -1,11 +1,11 @@ - + E-Index - + @@ -65,6 +65,10 @@ loadScripts(document, 'script');
The AbsoluteEncoder representing the duty cycle encoder attached to the SparkMax.
+
encoder - Variable in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Integrated encoder.
+
encoder - Variable in class swervelib.motors.SparkMaxSwerve
Integrated encoder.
diff --git a/docs/index-files/index-6.html b/docs/index-files/index-6.html index af980c9..c9eafc8 100644 --- a/docs/index-files/index-6.html +++ b/docs/index-files/index-6.html @@ -1,11 +1,11 @@ - + F-Index - + @@ -105,6 +105,10 @@ loadScripts(document, 'script');
Reset IMU to factory default.
+
factoryDefaultOccurred - Variable in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Factory default already occurred.
+
factoryDefaultOccurred - Variable in class swervelib.motors.SparkMaxSwerve
Factory default already occurred.
@@ -117,6 +121,10 @@ loadScripts(document, 'script');
Factory default already occurred.
+
factoryDefaults() - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Configure the factory defaults.
+
factoryDefaults() - Method in class swervelib.motors.SparkMaxSwerve
Configure the factory defaults.
diff --git a/docs/index-files/index-7.html b/docs/index-files/index-7.html index d5c27dd..1161062 100644 --- a/docs/index-files/index-7.html +++ b/docs/index-files/index-7.html @@ -1,11 +1,11 @@ - + G-Index - + @@ -149,6 +149,10 @@ loadScripts(document, 'script');
Gets the current module positions (azimuth and wheel position (meters))
+
getMotor() - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Get the motor object from the module.
+
getMotor() - Method in class swervelib.motors.SparkMaxSwerve
Get the motor object from the module.
@@ -181,6 +185,10 @@ loadScripts(document, 'script');
Gets the current pose (position and rotation) of the robot, as reported by odometry.
+
getPosition() - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Get the position of the integrated encoder.
+
getPosition() - Method in class swervelib.motors.SparkMaxSwerve
Get the position of the integrated encoder.
@@ -269,6 +277,10 @@ loadScripts(document, 'script');
Helper function to get the Translation2d of the chassis speeds given the ChassisSpeeds.
+
getVelocity() - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Get the velocity of the integrated encoder.
+
getVelocity() - Method in class swervelib.motors.SparkMaxSwerve
Get the velocity of the integrated encoder.
diff --git a/docs/index-files/index-8.html b/docs/index-files/index-8.html index b61f99f..1795c25 100644 --- a/docs/index-files/index-8.html +++ b/docs/index-files/index-8.html @@ -1,11 +1,11 @@ - + H-Index - + @@ -65,6 +65,10 @@ loadScripts(document, 'script');
PIDF for the heading of the robot.
+
HIGH - Enum constant in enum class swervelib.telemetry.SwerveDriveTelemetry.TelemetryVerbosity
+
+
Full swerve drive data is sent back in both human and machine readable forms.
+
A B C D E F G H I K L M N O P R S T U V W X Y Z _ 
All Classes and Interfaces|All Packages|Constant Field Values
diff --git a/docs/index-files/index-9.html b/docs/index-files/index-9.html index 211c7ba..328b2e4 100644 --- a/docs/index-files/index-9.html +++ b/docs/index-files/index-9.html @@ -1,11 +1,11 @@ - + I-Index - + @@ -109,6 +109,10 @@ loadScripts(document, 'script');
Invert the imu measurements.
+
isAttachedAbsoluteEncoder() - Method in class swervelib.motors.SparkMaxBrushedMotorSwerve
+
+
Queries whether the absolute encoder is directly attached to the motor controller.
+
isAttachedAbsoluteEncoder() - Method in class swervelib.motors.SparkMaxSwerve
Queries whether the absolute encoder is directly attached to the motor controller.
@@ -129,6 +133,10 @@ loadScripts(document, 'script');
Whether the swerve motor is a drive motor.
+
isSimulation - Static variable in class swervelib.telemetry.SwerveDriveTelemetry
+
+
State of simulation of the Robot, used to optimize retrieval.
+
iz - Variable in class swervelib.parser.PIDFConfig
Integral zone of the PID.
diff --git a/docs/index.html b/docs/index.html index f60c47e..a870c49 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,11 +1,11 @@ - + Overview - + diff --git a/docs/member-search-index.js b/docs/member-search-index.js index 5853dd7..5e1b562 100644 --- a/docs/member-search-index.js +++ b/docs/member-search-index.js @@ -1 +1 @@ -memberSearchIndex = [{"p":"swervelib.simulation.ctre","c":"TalonFXSimProfile","l":"_accelToFullTime"},{"p":"swervelib.simulation.ctre","c":"TalonSRXSimProfile","l":"_accelToFullTime"},{"p":"swervelib.simulation.ctre","c":"TalonFXSimProfile","l":"_falcon"},{"p":"swervelib.simulation.ctre","c":"TalonFXSimProfile","l":"_fullVel"},{"p":"swervelib.simulation.ctre","c":"TalonSRXSimProfile","l":"_fullVel"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim.SimProfile","l":"_lastTime"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim.SimProfile","l":"_running"},{"p":"swervelib.simulation.ctre","c":"TalonFXSimProfile","l":"_sensorPhase"},{"p":"swervelib.simulation.ctre","c":"TalonSRXSimProfile","l":"_sensorPhase"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"_simProfiles"},{"p":"swervelib.simulation.ctre","c":"TalonSRXSimProfile","l":"_talon"},{"p":"swervelib.simulation.ctre","c":"TalonFXSimProfile","l":"_vel"},{"p":"swervelib.simulation.ctre","c":"TalonSRXSimProfile","l":"_vel"},{"p":"swervelib.simulation.ctre","c":"VictorSPXSimProfile","l":"_victor"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"absoluteEncoder"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"absoluteEncoder"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"absoluteEncoder"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"absoluteEncoder"},{"p":"swervelib","c":"SwerveModule","l":"absoluteEncoder"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"absoluteEncoderInverted"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"absoluteEncoderInverted"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"absoluteEncoderOffset"},{"p":"swervelib","c":"SwerveController","l":"addSlewRateLimiters(SlewRateLimiter, SlewRateLimiter, SlewRateLimiter)","u":"addSlewRateLimiters(edu.wpi.first.math.filter.SlewRateLimiter,edu.wpi.first.math.filter.SlewRateLimiter,edu.wpi.first.math.filter.SlewRateLimiter)"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"addTalonFX(TalonFX, double, double)","u":"addTalonFX(com.ctre.phoenix.motorcontrol.can.TalonFX,double,double)"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"addTalonFX(TalonFX, double, double, boolean)","u":"addTalonFX(com.ctre.phoenix.motorcontrol.can.TalonFX,double,double,boolean)"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"addTalonSRX(TalonSRX, double, double)","u":"addTalonSRX(com.ctre.phoenix.motorcontrol.can.TalonSRX,double,double)"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"addTalonSRX(TalonSRX, double, double, boolean)","u":"addTalonSRX(com.ctre.phoenix.motorcontrol.can.TalonSRX,double,double,boolean)"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"addVictorSPX(VictorSPX)","u":"addVictorSPX(com.ctre.phoenix.motorcontrol.can.VictorSPX)"},{"p":"swervelib","c":"SwerveDrive","l":"addVisionMeasurement(Pose2d, double, boolean)","u":"addVisionMeasurement(edu.wpi.first.math.geometry.Pose2d,double,boolean)"},{"p":"swervelib.imu","c":"ADIS16448Swerve","l":"ADIS16448Swerve()","u":"%3Cinit%3E()"},{"p":"swervelib.imu","c":"ADIS16470Swerve","l":"ADIS16470Swerve()","u":"%3Cinit%3E()"},{"p":"swervelib.imu","c":"ADXRS450Swerve","l":"ADXRS450Swerve()","u":"%3Cinit%3E()"},{"p":"swervelib.encoders","c":"AnalogAbsoluteEncoderSwerve","l":"AnalogAbsoluteEncoderSwerve(AnalogInput)","u":"%3Cinit%3E(edu.wpi.first.wpilibj.AnalogInput)"},{"p":"swervelib.encoders","c":"AnalogAbsoluteEncoderSwerve","l":"AnalogAbsoluteEncoderSwerve(int)","u":"%3Cinit%3E(int)"},{"p":"swervelib.imu","c":"AnalogGyroSwerve","l":"AnalogGyroSwerve(int)","u":"%3Cinit%3E(int)"},{"p":"swervelib.math","c":"SwerveModuleState2","l":"angle"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"angle"},{"p":"swervelib.parser.json.modules","c":"BoolMotorJson","l":"angle"},{"p":"swervelib.parser.json","c":"MotorConfigDouble","l":"angle"},{"p":"swervelib.parser.json","c":"MotorConfigInt","l":"angle"},{"p":"swervelib.parser.json","c":"PIDFPropertiesJson","l":"angle"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"angle"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"angleEncoderPulsePerRevolution"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"angleEncoderPulsePerRotation"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"angleGearRatio"},{"p":"swervelib.parser.json","c":"ControllerPropertiesJson","l":"angleJoystickRadiusDeadband"},{"p":"swervelib.parser","c":"SwerveControllerConfiguration","l":"angleJoyStickRadiusDeadband"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"angleKV"},{"p":"swervelib","c":"SwerveController","l":"angleLimiter"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"angleMotor"},{"p":"swervelib","c":"SwerveModule","l":"angleMotor"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"angleMotorCurrentLimit"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"angleMotorEncoderPulsePerRevolution"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"angleMotorFreeSpeedRPM"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"angleMotorFreeSpeedRPM"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"angleMotorFreeSpeedRPM"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"angleMotorInverted"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"angleMotorRampRate"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"angleOffset"},{"p":"swervelib","c":"SwerveModule","l":"angleOffset"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"anglePIDF"},{"p":"swervelib.math","c":"SwerveMath","l":"applyDeadband(double, boolean, double)","u":"applyDeadband(double,boolean,double)"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"bigInverseKinematics"},{"p":"swervelib.parser.json.modules","c":"BoolMotorJson","l":"BoolMotorJson()","u":"%3Cinit%3E()"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"burnFlash()"},{"p":"swervelib.motors","c":"SwerveMotor","l":"burnFlash()"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"burnFlash()"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"burnFlash()"},{"p":"swervelib.math","c":"SwerveMath","l":"calcMaxAccel(Rotation2d, double, double, Translation3d, SwerveDriveConfiguration)","u":"calcMaxAccel(edu.wpi.first.math.geometry.Rotation2d,double,double,edu.wpi.first.math.geometry.Translation3d,swervelib.parser.SwerveDriveConfiguration)"},{"p":"swervelib.math","c":"SwerveMath","l":"calculateAngleKV(double, double, double)","u":"calculateAngleKV(double,double,double)"},{"p":"swervelib.math","c":"SwerveMath","l":"calculateDegreesPerSteeringRotation(double, double)","u":"calculateDegreesPerSteeringRotation(double,double)"},{"p":"swervelib.math","c":"SwerveMath","l":"calculateMaxAcceleration(double)"},{"p":"swervelib.math","c":"SwerveMath","l":"calculateMaxAcceleration(double, double, double, double, double)","u":"calculateMaxAcceleration(double,double,double,double,double)"},{"p":"swervelib.math","c":"SwerveMath","l":"calculateMaxAngularVelocity(double, double, double)","u":"calculateMaxAngularVelocity(double,double,double)"},{"p":"swervelib.math","c":"SwerveMath","l":"calculateMetersPerRotation(double, double, double)","u":"calculateMetersPerRotation(double,double,double)"},{"p":"swervelib.parser.json","c":"DeviceJson","l":"canbus"},{"p":"swervelib.encoders","c":"CANCoderSwerve","l":"CANCoderSwerve(int)","u":"%3Cinit%3E(int)"},{"p":"swervelib.encoders","c":"CANCoderSwerve","l":"CANCoderSwerve(int, String)","u":"%3Cinit%3E(int,java.lang.String)"},{"p":"swervelib.parser","c":"SwerveParser","l":"checkDirectory(File)","u":"checkDirectory(java.io.File)"},{"p":"swervelib.encoders","c":"AnalogAbsoluteEncoderSwerve","l":"clearStickyFaults()"},{"p":"swervelib.encoders","c":"CANCoderSwerve","l":"clearStickyFaults()"},{"p":"swervelib.encoders","c":"SparkMaxEncoderSwerve","l":"clearStickyFaults()"},{"p":"swervelib.encoders","c":"SwerveAbsoluteEncoder","l":"clearStickyFaults()"},{"p":"swervelib.imu","c":"ADIS16448Swerve","l":"clearStickyFaults()"},{"p":"swervelib.imu","c":"ADIS16470Swerve","l":"clearStickyFaults()"},{"p":"swervelib.imu","c":"ADXRS450Swerve","l":"clearStickyFaults()"},{"p":"swervelib.imu","c":"AnalogGyroSwerve","l":"clearStickyFaults()"},{"p":"swervelib.imu","c":"NavXSwerve","l":"clearStickyFaults()"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"clearStickyFaults()"},{"p":"swervelib.imu","c":"PigeonSwerve","l":"clearStickyFaults()"},{"p":"swervelib.imu","c":"SwerveIMU","l":"clearStickyFaults()"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"clearStickyFaults()"},{"p":"swervelib.motors","c":"SwerveMotor","l":"clearStickyFaults()"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"clearStickyFaults()"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"clearStickyFaults()"},{"p":"swervelib","c":"SwerveController","l":"config"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"configChanged"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"configuration"},{"p":"swervelib","c":"SwerveModule","l":"configuration"},{"p":"swervelib.encoders","c":"AnalogAbsoluteEncoderSwerve","l":"configure(boolean)"},{"p":"swervelib.encoders","c":"CANCoderSwerve","l":"configure(boolean)"},{"p":"swervelib.encoders","c":"SparkMaxEncoderSwerve","l":"configure(boolean)"},{"p":"swervelib.encoders","c":"SwerveAbsoluteEncoder","l":"configure(boolean)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"configureCANStatusFrames(int)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"configureCANStatusFrames(int, int, int, int, int)","u":"configureCANStatusFrames(int,int,int,int,int)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"configureIntegratedEncoder(double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"configureIntegratedEncoder(double)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"configureIntegratedEncoder(double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"configureIntegratedEncoder(double)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"configurePIDF(PIDFConfig)","u":"configurePIDF(swervelib.parser.PIDFConfig)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"configurePIDF(PIDFConfig)","u":"configurePIDF(swervelib.parser.PIDFConfig)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"configurePIDF(PIDFConfig)","u":"configurePIDF(swervelib.parser.PIDFConfig)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"configurePIDF(PIDFConfig)","u":"configurePIDF(swervelib.parser.PIDFConfig)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"configurePIDWrapping(double, double)","u":"configurePIDWrapping(double,double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"configurePIDWrapping(double, double)","u":"configurePIDWrapping(double,double)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"configurePIDWrapping(double, double)","u":"configurePIDWrapping(double,double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"configurePIDWrapping(double, double)","u":"configurePIDWrapping(double,double)"},{"p":"swervelib.parser","c":"SwerveParser","l":"controllerPropertiesJson"},{"p":"swervelib.parser.json","c":"ControllerPropertiesJson","l":"ControllerPropertiesJson()","u":"%3Cinit%3E()"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"convertToNativeSensorUnits(double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"convertToNativeSensorUnits(double)"},{"p":"swervelib.parser.json","c":"ControllerPropertiesJson","l":"createControllerConfiguration(SwerveDriveConfiguration)","u":"createControllerConfiguration(swervelib.parser.SwerveDriveConfiguration)"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"createDriveFeedforward()"},{"p":"swervelib.parser.json","c":"DeviceJson","l":"createEncoder()"},{"p":"swervelib.parser.json","c":"DeviceJson","l":"createIMU()"},{"p":"swervelib.parser.json","c":"DeviceJson","l":"createIntegratedEncoder(SwerveMotor)","u":"createIntegratedEncoder(swervelib.motors.SwerveMotor)"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"createModuleConfiguration(PIDFConfig, PIDFConfig, double, SwerveModulePhysicalCharacteristics)","u":"createModuleConfiguration(swervelib.parser.PIDFConfig,swervelib.parser.PIDFConfig,double,swervelib.parser.SwerveModulePhysicalCharacteristics)"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"createModules(SwerveModuleConfiguration[])","u":"createModules(swervelib.parser.SwerveModuleConfiguration[])"},{"p":"swervelib.parser.json","c":"DeviceJson","l":"createMotor(boolean)"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"createPhysicalProperties(double)"},{"p":"swervelib.parser","c":"PIDFConfig","l":"createPIDController()"},{"p":"swervelib.parser","c":"SwerveParser","l":"createSwerveDrive()"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"currentLimit"},{"p":"swervelib.parser","c":"PIDFConfig","l":"d"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"desaturateWheelSpeeds(SwerveModuleState2[], ChassisSpeeds, double, double, double)","u":"desaturateWheelSpeeds(swervelib.math.SwerveModuleState2[],edu.wpi.first.math.kinematics.ChassisSpeeds,double,double,double)"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"desaturateWheelSpeeds(SwerveModuleState2[], double)","u":"desaturateWheelSpeeds(swervelib.math.SwerveModuleState2[],double)"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"desiredChassisSpeeds"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"desiredStates"},{"p":"swervelib.parser.json","c":"DeviceJson","l":"DeviceJson()","u":"%3Cinit%3E()"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"drive"},{"p":"swervelib.parser.json.modules","c":"BoolMotorJson","l":"drive"},{"p":"swervelib.parser.json","c":"MotorConfigDouble","l":"drive"},{"p":"swervelib.parser.json","c":"MotorConfigInt","l":"drive"},{"p":"swervelib.parser.json","c":"PIDFPropertiesJson","l":"drive"},{"p":"swervelib","c":"SwerveDrive","l":"drive(Translation2d, double, boolean, boolean)","u":"drive(edu.wpi.first.math.geometry.Translation2d,double,boolean,boolean)"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"driveEncoderPulsePerRotation"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"driveGearRatio"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"driveMotor"},{"p":"swervelib","c":"SwerveModule","l":"driveMotor"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"driveMotorCurrentLimit"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"driveMotorInverted"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"driveMotorRampRate"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"dt"},{"p":"swervelib.encoders","c":"AnalogAbsoluteEncoderSwerve","l":"encoder"},{"p":"swervelib.encoders","c":"CANCoderSwerve","l":"encoder"},{"p":"swervelib.encoders","c":"SparkMaxEncoderSwerve","l":"encoder"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"encoder"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"encoder"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"encoderPulsePerRotation"},{"p":"swervelib.parser","c":"PIDFConfig","l":"f"},{"p":"swervelib.encoders","c":"AnalogAbsoluteEncoderSwerve","l":"factoryDefault()"},{"p":"swervelib.encoders","c":"CANCoderSwerve","l":"factoryDefault()"},{"p":"swervelib.encoders","c":"SparkMaxEncoderSwerve","l":"factoryDefault()"},{"p":"swervelib.encoders","c":"SwerveAbsoluteEncoder","l":"factoryDefault()"},{"p":"swervelib.imu","c":"ADIS16448Swerve","l":"factoryDefault()"},{"p":"swervelib.imu","c":"ADIS16470Swerve","l":"factoryDefault()"},{"p":"swervelib.imu","c":"ADXRS450Swerve","l":"factoryDefault()"},{"p":"swervelib.imu","c":"AnalogGyroSwerve","l":"factoryDefault()"},{"p":"swervelib.imu","c":"NavXSwerve","l":"factoryDefault()"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"factoryDefault()"},{"p":"swervelib.imu","c":"PigeonSwerve","l":"factoryDefault()"},{"p":"swervelib.imu","c":"SwerveIMU","l":"factoryDefault()"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"factoryDefaultOccurred"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"factoryDefaultOccurred"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"factoryDefaultOccurred"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"factoryDefaults()"},{"p":"swervelib.motors","c":"SwerveMotor","l":"factoryDefaults()"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"factoryDefaults()"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"factoryDefaults()"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"fakePos"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"fakeSpeed"},{"p":"swervelib","c":"SwerveModule","l":"feedforward"},{"p":"swervelib","c":"SwerveDrive","l":"field"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"forwardDirection"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"fscalar"},{"p":"swervelib.parser","c":"PIDFConfig","l":"fscalar"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"gearRatio"},{"p":"swervelib.encoders","c":"AnalogAbsoluteEncoderSwerve","l":"getAbsoluteEncoder()"},{"p":"swervelib.encoders","c":"CANCoderSwerve","l":"getAbsoluteEncoder()"},{"p":"swervelib.encoders","c":"SparkMaxEncoderSwerve","l":"getAbsoluteEncoder()"},{"p":"swervelib.encoders","c":"SwerveAbsoluteEncoder","l":"getAbsoluteEncoder()"},{"p":"swervelib.encoders","c":"AnalogAbsoluteEncoderSwerve","l":"getAbsolutePosition()"},{"p":"swervelib.encoders","c":"CANCoderSwerve","l":"getAbsolutePosition()"},{"p":"swervelib.encoders","c":"SparkMaxEncoderSwerve","l":"getAbsolutePosition()"},{"p":"swervelib.encoders","c":"SwerveAbsoluteEncoder","l":"getAbsolutePosition()"},{"p":"swervelib","c":"SwerveModule","l":"getAbsolutePosition()"},{"p":"swervelib","c":"SwerveDrive","l":"getFieldVelocity()"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"getGyroRotation3d()"},{"p":"swervelib","c":"SwerveDrive","l":"getGyroRotation3d()"},{"p":"swervelib.imu","c":"ADIS16448Swerve","l":"getIMU()"},{"p":"swervelib.imu","c":"ADIS16470Swerve","l":"getIMU()"},{"p":"swervelib.imu","c":"ADXRS450Swerve","l":"getIMU()"},{"p":"swervelib.imu","c":"AnalogGyroSwerve","l":"getIMU()"},{"p":"swervelib.imu","c":"NavXSwerve","l":"getIMU()"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"getIMU()"},{"p":"swervelib.imu","c":"PigeonSwerve","l":"getIMU()"},{"p":"swervelib.imu","c":"SwerveIMU","l":"getIMU()"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"getInstance()"},{"p":"swervelib.parser","c":"SwerveParser","l":"getModuleConfigurationByName(String, SwerveDriveConfiguration)","u":"getModuleConfigurationByName(java.lang.String,swervelib.parser.SwerveDriveConfiguration)"},{"p":"swervelib","c":"SwerveDrive","l":"getModulePositions()"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"getMotor()"},{"p":"swervelib.motors","c":"SwerveMotor","l":"getMotor()"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"getMotor()"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"getMotor()"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim.SimProfile","l":"getPeriod()"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"getPitch()"},{"p":"swervelib","c":"SwerveDrive","l":"getPitch()"},{"p":"swervelib","c":"SwerveDrive","l":"getPose()"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"getPosition()"},{"p":"swervelib.motors","c":"SwerveMotor","l":"getPosition()"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"getPosition()"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"getPosition()"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"getPosition()"},{"p":"swervelib","c":"SwerveModule","l":"getPosition()"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"getPositionEncoderConversion(boolean)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"getRawPosition()"},{"p":"swervelib","c":"SwerveController","l":"getRawTargetSpeeds(double, double, double)","u":"getRawTargetSpeeds(double,double,double)"},{"p":"swervelib","c":"SwerveController","l":"getRawTargetSpeeds(double, double, double, double)","u":"getRawTargetSpeeds(double,double,double,double)"},{"p":"swervelib","c":"SwerveModule","l":"getRelativePosition()"},{"p":"swervelib","c":"SwerveDrive","l":"getRobotVelocity()"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"getRoll()"},{"p":"swervelib","c":"SwerveDrive","l":"getRoll()"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"getState()"},{"p":"swervelib","c":"SwerveModule","l":"getState()"},{"p":"swervelib","c":"SwerveDrive","l":"getStates()"},{"p":"swervelib.math","c":"SwerveMath","l":"getSwerveModule(SwerveModule[], boolean, boolean)","u":"getSwerveModule(swervelib.SwerveModule[],boolean,boolean)"},{"p":"swervelib","c":"SwerveDrive","l":"getSwerveModulePoses(Pose2d)","u":"getSwerveModulePoses(edu.wpi.first.math.geometry.Pose2d)"},{"p":"swervelib","c":"SwerveController","l":"getTargetSpeeds(double, double, double, double)","u":"getTargetSpeeds(double,double,double,double)"},{"p":"swervelib","c":"SwerveController","l":"getTargetSpeeds(double, double, double, double, double)","u":"getTargetSpeeds(double,double,double,double,double)"},{"p":"swervelib","c":"SwerveController","l":"getTranslation2d(ChassisSpeeds)","u":"getTranslation2d(edu.wpi.first.math.kinematics.ChassisSpeeds)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"getVelocity()"},{"p":"swervelib.motors","c":"SwerveMotor","l":"getVelocity()"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"getVelocity()"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"getVelocity()"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"getYaw()"},{"p":"swervelib","c":"SwerveDrive","l":"getYaw()"},{"p":"swervelib.imu","c":"ADIS16448Swerve","l":"getYawPitchRoll(double[])"},{"p":"swervelib.imu","c":"ADIS16470Swerve","l":"getYawPitchRoll(double[])"},{"p":"swervelib.imu","c":"ADXRS450Swerve","l":"getYawPitchRoll(double[])"},{"p":"swervelib.imu","c":"AnalogGyroSwerve","l":"getYawPitchRoll(double[])"},{"p":"swervelib.imu","c":"NavXSwerve","l":"getYawPitchRoll(double[])"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"getYawPitchRoll(double[])"},{"p":"swervelib.imu","c":"PigeonSwerve","l":"getYawPitchRoll(double[])"},{"p":"swervelib.imu","c":"SwerveIMU","l":"getYawPitchRoll(double[])"},{"p":"swervelib.imu","c":"AnalogGyroSwerve","l":"gyro"},{"p":"swervelib.imu","c":"NavXSwerve","l":"gyro"},{"p":"swervelib.parser.json","c":"ControllerPropertiesJson","l":"heading"},{"p":"swervelib","c":"SwerveController","l":"headingCalculate(double, double)","u":"headingCalculate(double,double)"},{"p":"swervelib.parser","c":"SwerveControllerConfiguration","l":"headingPIDF"},{"p":"swervelib.parser","c":"PIDFConfig","l":"i"},{"p":"swervelib.parser.json","c":"DeviceJson","l":"id"},{"p":"swervelib.imu","c":"ADIS16448Swerve","l":"imu"},{"p":"swervelib.imu","c":"ADIS16470Swerve","l":"imu"},{"p":"swervelib.imu","c":"ADXRS450Swerve","l":"imu"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"imu"},{"p":"swervelib.imu","c":"PigeonSwerve","l":"imu"},{"p":"swervelib.parser.json","c":"SwerveDriveJson","l":"imu"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"imu"},{"p":"swervelib","c":"SwerveDrive","l":"imu"},{"p":"swervelib.encoders","c":"AnalogAbsoluteEncoderSwerve","l":"inverted"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"inverted"},{"p":"swervelib.parser.json","c":"SwerveDriveJson","l":"invertedIMU"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"invertedIMU"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"isAttachedAbsoluteEncoder()"},{"p":"swervelib.motors","c":"SwerveMotor","l":"isAttachedAbsoluteEncoder()"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"isAttachedAbsoluteEncoder()"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"isAttachedAbsoluteEncoder()"},{"p":"swervelib.motors","c":"SwerveMotor","l":"isDriveMotor"},{"p":"swervelib.parser","c":"PIDFConfig","l":"iz"},{"p":"swervelib","c":"SwerveDrive","l":"kinematics"},{"p":"swervelib","c":"SwerveModule","l":"lastAngle"},{"p":"swervelib","c":"SwerveController","l":"lastAngleScalar"},{"p":"swervelib","c":"SwerveDrive","l":"lastHeadingRadians"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"lastTime"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"lastTime"},{"p":"swervelib.math","c":"SwerveMath","l":"limitVelocity(Translation2d, ChassisSpeeds, Pose2d, double, double, double, Translation3d, SwerveDriveConfiguration)","u":"limitVelocity(edu.wpi.first.math.geometry.Translation2d,edu.wpi.first.math.kinematics.ChassisSpeeds,edu.wpi.first.math.geometry.Pose2d,double,double,double,edu.wpi.first.math.geometry.Translation3d,swervelib.parser.SwerveDriveConfiguration)"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"location"},{"p":"swervelib.parser.json.modules","c":"LocationJson","l":"LocationJson()","u":"%3Cinit%3E()"},{"p":"swervelib","c":"SwerveDrive","l":"lockPose()"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"m_forwardKinematics"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"m_inverseKinematics"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"m_modules"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"m_moduleStates"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"m_numModules"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"m_prevCoR"},{"p":"swervelib.parser.deserializer","c":"PIDFRange","l":"max"},{"p":"swervelib.parser","c":"SwerveControllerConfiguration","l":"maxAngularVelocity"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"maxAngularVelocity"},{"p":"swervelib.parser.json","c":"SwerveDriveJson","l":"maxSpeed"},{"p":"swervelib.parser","c":"SwerveControllerConfiguration","l":"maxSpeed"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"maxSpeed"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"maxSpeed"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"maxSpeed"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"measuredChassisSpeeds"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"measuredStates"},{"p":"swervelib.parser.deserializer","c":"PIDFRange","l":"min"},{"p":"swervelib.parser","c":"SwerveParser","l":"moduleConfigs"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"moduleCount"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"moduleCount"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"ModuleJson()","u":"%3Cinit%3E()"},{"p":"swervelib.parser","c":"SwerveParser","l":"moduleJsons"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"moduleLocation"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"moduleLocationsMeters"},{"p":"swervelib","c":"SwerveModule","l":"moduleNumber"},{"p":"swervelib.parser.json","c":"SwerveDriveJson","l":"modules"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"modules"},{"p":"swervelib","c":"SwerveDrive","l":"moduleSynchronizationCounter"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"motor"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"motor"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"motor"},{"p":"swervelib.parser.json","c":"MotorConfigDouble","l":"MotorConfigDouble()","u":"%3Cinit%3E()"},{"p":"swervelib.parser.json","c":"MotorConfigDouble","l":"MotorConfigDouble(double, double)","u":"%3Cinit%3E(double,double)"},{"p":"swervelib.parser.json","c":"MotorConfigInt","l":"MotorConfigInt()","u":"%3Cinit%3E()"},{"p":"swervelib.parser.json","c":"MotorConfigInt","l":"MotorConfigInt(int, int)","u":"%3Cinit%3E(int,int)"},{"p":"swervelib.imu","c":"NavXSwerve","l":"NavXSwerve(SerialPort.Port)","u":"%3Cinit%3E(edu.wpi.first.wpilibj.SerialPort.Port)"},{"p":"swervelib.math","c":"SwerveMath","l":"normalizeAngle(double)"},{"p":"swervelib.math","c":"SwerveModuleState2","l":"omegaRadPerSecond"},{"p":"swervelib.parser","c":"SwerveParser","l":"openJson(File)","u":"openJson(java.io.File)"},{"p":"swervelib.parser.json","c":"SwerveDriveJson","l":"optimalVoltage"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"optimalVoltage"},{"p":"swervelib.parser","c":"PIDFConfig","l":"output"},{"p":"swervelib.parser","c":"PIDFConfig","l":"p"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"physicalCharacteristics"},{"p":"swervelib.parser","c":"SwerveParser","l":"physicalPropertiesJson"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"PhysicalPropertiesJson()","u":"%3Cinit%3E()"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"PhysicsSim()","u":"%3Cinit%3E()"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"pid"},{"p":"swervelib.parser","c":"PIDFConfig","l":"PIDFConfig()","u":"%3Cinit%3E()"},{"p":"swervelib.parser","c":"PIDFConfig","l":"PIDFConfig(double, double)","u":"%3Cinit%3E(double,double)"},{"p":"swervelib.parser","c":"PIDFConfig","l":"PIDFConfig(double, double, double)","u":"%3Cinit%3E(double,double,double)"},{"p":"swervelib.parser","c":"PIDFConfig","l":"PIDFConfig(double, double, double, double)","u":"%3Cinit%3E(double,double,double,double)"},{"p":"swervelib.parser","c":"PIDFConfig","l":"PIDFConfig(double, double, double, double, double)","u":"%3Cinit%3E(double,double,double,double,double)"},{"p":"swervelib.parser","c":"SwerveParser","l":"pidfPropertiesJson"},{"p":"swervelib.parser.json","c":"PIDFPropertiesJson","l":"PIDFPropertiesJson()","u":"%3Cinit%3E()"},{"p":"swervelib.parser.deserializer","c":"PIDFRange","l":"PIDFRange()","u":"%3Cinit%3E()"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"Pigeon2Swerve(int)","u":"%3Cinit%3E(int)"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"Pigeon2Swerve(int, String)","u":"%3Cinit%3E(int,java.lang.String)"},{"p":"swervelib.imu","c":"PigeonSwerve","l":"PigeonSwerve(int)","u":"%3Cinit%3E(int)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"placeInAppropriate0To360Scope(double, double)","u":"placeInAppropriate0To360Scope(double,double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"placeInAppropriate0To360Scope(double, double)","u":"placeInAppropriate0To360Scope(double,double)"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"Position"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"positionConversionFactor"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"positionConversionFactor"},{"p":"swervelib","c":"SwerveDrive","l":"postTrajectory(Trajectory)","u":"postTrajectory(edu.wpi.first.math.trajectory.Trajectory)"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"rampRate"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"random(double)"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"random(double, double)","u":"random(double,double)"},{"p":"swervelib.encoders","c":"SwerveAbsoluteEncoder","l":"readingError"},{"p":"swervelib","c":"SwerveDrive","l":"replaceSwerveModuleFeedforward(SimpleMotorFeedforward)","u":"replaceSwerveModuleFeedforward(edu.wpi.first.math.controller.SimpleMotorFeedforward)"},{"p":"swervelib","c":"SwerveDrive","l":"resetOdometry(Pose2d)","u":"resetOdometry(edu.wpi.first.math.geometry.Pose2d)"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"robotRotation"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"rotationUnit"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"run()"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim.SimProfile","l":"run()"},{"p":"swervelib.simulation.ctre","c":"TalonFXSimProfile","l":"run()"},{"p":"swervelib.simulation.ctre","c":"TalonSRXSimProfile","l":"run()"},{"p":"swervelib.simulation.ctre","c":"VictorSPXSimProfile","l":"run()"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"set(double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"set(double)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"set(double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"set(double)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setAbsoluteEncoder(SwerveAbsoluteEncoder)","u":"setAbsoluteEncoder(swervelib.encoders.SwerveAbsoluteEncoder)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setAbsoluteEncoder(SwerveAbsoluteEncoder)","u":"setAbsoluteEncoder(swervelib.encoders.SwerveAbsoluteEncoder)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setAbsoluteEncoder(SwerveAbsoluteEncoder)","u":"setAbsoluteEncoder(swervelib.encoders.SwerveAbsoluteEncoder)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setAbsoluteEncoder(SwerveAbsoluteEncoder)","u":"setAbsoluteEncoder(swervelib.encoders.SwerveAbsoluteEncoder)"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"setAngle(double)"},{"p":"swervelib","c":"SwerveModule","l":"setAngle(double)"},{"p":"swervelib","c":"SwerveDrive","l":"setChassisSpeeds(ChassisSpeeds)","u":"setChassisSpeeds(edu.wpi.first.math.kinematics.ChassisSpeeds)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setCurrentLimit(int)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setCurrentLimit(int)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setCurrentLimit(int)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setCurrentLimit(int)"},{"p":"swervelib","c":"SwerveModule","l":"setDesiredState(SwerveModuleState2, boolean)","u":"setDesiredState(swervelib.math.SwerveModuleState2,boolean)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setInverted(boolean)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setInverted(boolean)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setInverted(boolean)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setInverted(boolean)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setLoopRampRate(double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setLoopRampRate(double)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setLoopRampRate(double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setLoopRampRate(double)"},{"p":"swervelib","c":"SwerveDrive","l":"setModuleStates(SwerveModuleState2[], boolean)","u":"setModuleStates(swervelib.math.SwerveModuleState2[],boolean)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setMotorBrake(boolean)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setMotorBrake(boolean)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setMotorBrake(boolean)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setMotorBrake(boolean)"},{"p":"swervelib","c":"SwerveModule","l":"setMotorBrake(boolean)"},{"p":"swervelib","c":"SwerveDrive","l":"setMotorIdleMode(boolean)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setPosition(double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setPosition(double)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setPosition(double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setPosition(double)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setReference(double, double)","u":"setReference(double,double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setReference(double, double)","u":"setReference(double,double)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setReference(double, double)","u":"setReference(double,double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setReference(double, double)","u":"setReference(double,double)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setVoltageCompensation(double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setVoltageCompensation(double)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setVoltageCompensation(double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setVoltageCompensation(double)"},{"p":"swervelib.imu","c":"ADIS16448Swerve","l":"setYaw(double)"},{"p":"swervelib.imu","c":"ADIS16470Swerve","l":"setYaw(double)"},{"p":"swervelib.imu","c":"ADXRS450Swerve","l":"setYaw(double)"},{"p":"swervelib.imu","c":"AnalogGyroSwerve","l":"setYaw(double)"},{"p":"swervelib.imu","c":"NavXSwerve","l":"setYaw(double)"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"setYaw(double)"},{"p":"swervelib.imu","c":"PigeonSwerve","l":"setYaw(double)"},{"p":"swervelib.imu","c":"SwerveIMU","l":"setYaw(double)"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"sim"},{"p":"swervelib","c":"SwerveDrive","l":"simIMU"},{"p":"swervelib","c":"SwerveModule","l":"simModule"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim.SimProfile","l":"SimProfile()","u":"%3Cinit%3E()"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"Simulation"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"sizeFrontBack"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"sizeLeftRight"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"SparkMAX_slotIdx()","u":"%3Cinit%3E()"},{"p":"swervelib.encoders","c":"SparkMaxEncoderSwerve","l":"SparkMaxEncoderSwerve(SwerveMotor)","u":"%3Cinit%3E(swervelib.motors.SwerveMotor)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"SparkMaxSwerve(CANSparkMax, boolean)","u":"%3Cinit%3E(com.revrobotics.CANSparkMax,boolean)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"SparkMaxSwerve(int, boolean)","u":"%3Cinit%3E(int,boolean)"},{"p":"swervelib.math","c":"SwerveModuleState2","l":"speedMetersPerSecond"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"state"},{"p":"swervelib.encoders","c":"SwerveAbsoluteEncoder","l":"SwerveAbsoluteEncoder()","u":"%3Cinit%3E()"},{"p":"swervelib","c":"SwerveDrive","l":"swerveController"},{"p":"swervelib","c":"SwerveController","l":"SwerveController(SwerveControllerConfiguration)","u":"%3Cinit%3E(swervelib.parser.SwerveControllerConfiguration)"},{"p":"swervelib.parser","c":"SwerveControllerConfiguration","l":"SwerveControllerConfiguration(SwerveDriveConfiguration, PIDFConfig)","u":"%3Cinit%3E(swervelib.parser.SwerveDriveConfiguration,swervelib.parser.PIDFConfig)"},{"p":"swervelib.parser","c":"SwerveControllerConfiguration","l":"SwerveControllerConfiguration(SwerveDriveConfiguration, PIDFConfig, double)","u":"%3Cinit%3E(swervelib.parser.SwerveDriveConfiguration,swervelib.parser.PIDFConfig,double)"},{"p":"swervelib","c":"SwerveDrive","l":"SwerveDrive(SwerveDriveConfiguration, SwerveControllerConfiguration)","u":"%3Cinit%3E(swervelib.parser.SwerveDriveConfiguration,swervelib.parser.SwerveControllerConfiguration)"},{"p":"swervelib","c":"SwerveDrive","l":"swerveDriveConfiguration"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"SwerveDriveConfiguration(SwerveModuleConfiguration[], SwerveIMU, double, boolean)","u":"%3Cinit%3E(swervelib.parser.SwerveModuleConfiguration[],swervelib.imu.SwerveIMU,double,boolean)"},{"p":"swervelib.parser","c":"SwerveParser","l":"swerveDriveJson"},{"p":"swervelib.parser.json","c":"SwerveDriveJson","l":"SwerveDriveJson()","u":"%3Cinit%3E()"},{"p":"swervelib","c":"SwerveDrive","l":"swerveDrivePoseEstimator"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"SwerveDriveTelemetry()","u":"%3Cinit%3E()"},{"p":"swervelib.imu","c":"SwerveIMU","l":"SwerveIMU()","u":"%3Cinit%3E()"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"SwerveIMUSimulation()","u":"%3Cinit%3E()"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"SwerveKinematics2(Translation2d...)","u":"%3Cinit%3E(edu.wpi.first.math.geometry.Translation2d...)"},{"p":"swervelib.math","c":"SwerveMath","l":"SwerveMath()","u":"%3Cinit%3E()"},{"p":"swervelib","c":"SwerveModule","l":"SwerveModule(int, SwerveModuleConfiguration)","u":"%3Cinit%3E(int,swervelib.parser.SwerveModuleConfiguration)"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"SwerveModuleConfiguration(SwerveMotor, SwerveMotor, SwerveAbsoluteEncoder, double, double, double, PIDFConfig, PIDFConfig, double, SwerveModulePhysicalCharacteristics)","u":"%3Cinit%3E(swervelib.motors.SwerveMotor,swervelib.motors.SwerveMotor,swervelib.encoders.SwerveAbsoluteEncoder,double,double,double,swervelib.parser.PIDFConfig,swervelib.parser.PIDFConfig,double,swervelib.parser.SwerveModulePhysicalCharacteristics)"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"SwerveModuleConfiguration(SwerveMotor, SwerveMotor, SwerveAbsoluteEncoder, double, double, double, PIDFConfig, PIDFConfig, double, SwerveModulePhysicalCharacteristics, boolean, boolean, boolean, double, double)","u":"%3Cinit%3E(swervelib.motors.SwerveMotor,swervelib.motors.SwerveMotor,swervelib.encoders.SwerveAbsoluteEncoder,double,double,double,swervelib.parser.PIDFConfig,swervelib.parser.PIDFConfig,double,swervelib.parser.SwerveModulePhysicalCharacteristics,boolean,boolean,boolean,double,double)"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"SwerveModulePhysicalCharacteristics(double, double, double, double, double, double, int, int)","u":"%3Cinit%3E(double,double,double,double,double,double,int,int)"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"SwerveModulePhysicalCharacteristics(double, double, double, double, double, double, int, int, double, double, int, int)","u":"%3Cinit%3E(double,double,double,double,double,double,int,int,double,double,int,int)"},{"p":"swervelib","c":"SwerveDrive","l":"swerveModules"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"SwerveModuleSimulation()","u":"%3Cinit%3E()"},{"p":"swervelib.math","c":"SwerveModuleState2","l":"SwerveModuleState2()","u":"%3Cinit%3E()"},{"p":"swervelib.math","c":"SwerveModuleState2","l":"SwerveModuleState2(double, Rotation2d, double)","u":"%3Cinit%3E(double,edu.wpi.first.math.geometry.Rotation2d,double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"SwerveMotor()","u":"%3Cinit%3E()"},{"p":"swervelib.parser","c":"SwerveParser","l":"SwerveParser(File)","u":"%3Cinit%3E(java.io.File)"},{"p":"swervelib","c":"SwerveModule","l":"synchronizeEncoders()"},{"p":"swervelib","c":"SwerveDrive","l":"synchronizeModuleEncoders()"},{"p":"swervelib.simulation.ctre","c":"TalonFXSimProfile","l":"TalonFXSimProfile(TalonFX, double, double, boolean)","u":"%3Cinit%3E(com.ctre.phoenix.motorcontrol.can.TalonFX,double,double,boolean)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"TalonFXSwerve(int, boolean)","u":"%3Cinit%3E(int,boolean)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"TalonFXSwerve(int, String, boolean)","u":"%3Cinit%3E(int,java.lang.String,boolean)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"TalonFXSwerve(WPI_TalonFX, boolean)","u":"%3Cinit%3E(com.ctre.phoenix.motorcontrol.can.WPI_TalonFX,boolean)"},{"p":"swervelib.simulation.ctre","c":"TalonSRXSimProfile","l":"TalonSRXSimProfile(TalonSRX, double, double, boolean)","u":"%3Cinit%3E(com.ctre.phoenix.motorcontrol.can.TalonSRX,double,double,boolean)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"TalonSRXSwerve(int, boolean)","u":"%3Cinit%3E(int,boolean)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"TalonSRXSwerve(WPI_TalonSRX, boolean)","u":"%3Cinit%3E(com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX,boolean)"},{"p":"swervelib","c":"SwerveController","l":"thetaController"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"timer"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"timer"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"toChassisSpeeds(SwerveModuleState2...)","u":"toChassisSpeeds(swervelib.math.SwerveModuleState2...)"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"toSwerveModuleStates(ChassisSpeeds)","u":"toSwerveModuleStates(edu.wpi.first.math.kinematics.ChassisSpeeds)"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"toSwerveModuleStates(ChassisSpeeds, Translation2d)","u":"toSwerveModuleStates(edu.wpi.first.math.kinematics.ChassisSpeeds,edu.wpi.first.math.geometry.Translation2d)"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"toTwist2d(SwerveModulePosition...)","u":"toTwist2d(edu.wpi.first.math.kinematics.SwerveModulePosition...)"},{"p":"swervelib.parser.json","c":"DeviceJson","l":"type"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"updateData()"},{"p":"swervelib","c":"SwerveDrive","l":"updateOdometry()"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"updateOdometry(SwerveKinematics2, SwerveModuleState2[], Pose2d[], Field2d)","u":"updateOdometry(swervelib.math.SwerveKinematics2,swervelib.math.SwerveModuleState2[],edu.wpi.first.math.geometry.Pose2d[],edu.wpi.first.wpilibj.smartdashboard.Field2d)"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"updateStateAndPosition(SwerveModuleState2)","u":"updateStateAndPosition(swervelib.math.SwerveModuleState2)"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"values()"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"Velocity"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"velocityPIDF"},{"p":"swervelib.simulation.ctre","c":"VictorSPXSimProfile","l":"VictorSPXSimProfile(VictorSPX)","u":"%3Cinit%3E(com.ctre.phoenix.motorcontrol.can.VictorSPX)"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"wheelDiameter"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"wheelDiameter"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"wheelGripCoefficientOfFriction"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"wheelGripCoefficientOfFriction"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"wheelLocations"},{"p":"swervelib","c":"SwerveController","l":"withinHypotDeadband(double, double)","u":"withinHypotDeadband(double,double)"},{"p":"swervelib.parser.json.modules","c":"LocationJson","l":"x"},{"p":"swervelib","c":"SwerveController","l":"xLimiter"},{"p":"swervelib.parser.json.modules","c":"LocationJson","l":"y"},{"p":"swervelib.imu","c":"ADIS16448Swerve","l":"yawOffset"},{"p":"swervelib.imu","c":"ADIS16470Swerve","l":"yawOffset"},{"p":"swervelib.imu","c":"ADXRS450Swerve","l":"yawOffset"},{"p":"swervelib.imu","c":"AnalogGyroSwerve","l":"yawOffset"},{"p":"swervelib.imu","c":"NavXSwerve","l":"yawOffset"},{"p":"swervelib","c":"SwerveController","l":"yLimiter"},{"p":"swervelib","c":"SwerveDrive","l":"zeroGyro()"}];updateSearchResults(); \ No newline at end of file +memberSearchIndex = [{"p":"swervelib.simulation.ctre","c":"TalonFXSimProfile","l":"_accelToFullTime"},{"p":"swervelib.simulation.ctre","c":"TalonSRXSimProfile","l":"_accelToFullTime"},{"p":"swervelib.simulation.ctre","c":"TalonFXSimProfile","l":"_falcon"},{"p":"swervelib.simulation.ctre","c":"TalonFXSimProfile","l":"_fullVel"},{"p":"swervelib.simulation.ctre","c":"TalonSRXSimProfile","l":"_fullVel"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim.SimProfile","l":"_lastTime"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim.SimProfile","l":"_running"},{"p":"swervelib.simulation.ctre","c":"TalonFXSimProfile","l":"_sensorPhase"},{"p":"swervelib.simulation.ctre","c":"TalonSRXSimProfile","l":"_sensorPhase"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"_simProfiles"},{"p":"swervelib.simulation.ctre","c":"TalonSRXSimProfile","l":"_talon"},{"p":"swervelib.simulation.ctre","c":"TalonFXSimProfile","l":"_vel"},{"p":"swervelib.simulation.ctre","c":"TalonSRXSimProfile","l":"_vel"},{"p":"swervelib.simulation.ctre","c":"VictorSPXSimProfile","l":"_victor"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"absoluteEncoder"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"absoluteEncoder"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"absoluteEncoder"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"absoluteEncoder"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"absoluteEncoder"},{"p":"swervelib","c":"SwerveModule","l":"absoluteEncoder"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"absoluteEncoderInverted"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"absoluteEncoderInverted"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"absoluteEncoderOffset"},{"p":"swervelib","c":"SwerveController","l":"addSlewRateLimiters(SlewRateLimiter, SlewRateLimiter, SlewRateLimiter)","u":"addSlewRateLimiters(edu.wpi.first.math.filter.SlewRateLimiter,edu.wpi.first.math.filter.SlewRateLimiter,edu.wpi.first.math.filter.SlewRateLimiter)"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"addTalonFX(TalonFX, double, double)","u":"addTalonFX(com.ctre.phoenix.motorcontrol.can.TalonFX,double,double)"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"addTalonFX(TalonFX, double, double, boolean)","u":"addTalonFX(com.ctre.phoenix.motorcontrol.can.TalonFX,double,double,boolean)"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"addTalonSRX(TalonSRX, double, double)","u":"addTalonSRX(com.ctre.phoenix.motorcontrol.can.TalonSRX,double,double)"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"addTalonSRX(TalonSRX, double, double, boolean)","u":"addTalonSRX(com.ctre.phoenix.motorcontrol.can.TalonSRX,double,double,boolean)"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"addVictorSPX(VictorSPX)","u":"addVictorSPX(com.ctre.phoenix.motorcontrol.can.VictorSPX)"},{"p":"swervelib","c":"SwerveDrive","l":"addVisionMeasurement(Pose2d, double, boolean, double)","u":"addVisionMeasurement(edu.wpi.first.math.geometry.Pose2d,double,boolean,double)"},{"p":"swervelib.imu","c":"ADIS16448Swerve","l":"ADIS16448Swerve()","u":"%3Cinit%3E()"},{"p":"swervelib.imu","c":"ADIS16470Swerve","l":"ADIS16470Swerve()","u":"%3Cinit%3E()"},{"p":"swervelib.imu","c":"ADXRS450Swerve","l":"ADXRS450Swerve()","u":"%3Cinit%3E()"},{"p":"swervelib.encoders","c":"AnalogAbsoluteEncoderSwerve","l":"AnalogAbsoluteEncoderSwerve(AnalogInput)","u":"%3Cinit%3E(edu.wpi.first.wpilibj.AnalogInput)"},{"p":"swervelib.encoders","c":"AnalogAbsoluteEncoderSwerve","l":"AnalogAbsoluteEncoderSwerve(int)","u":"%3Cinit%3E(int)"},{"p":"swervelib.imu","c":"AnalogGyroSwerve","l":"AnalogGyroSwerve(int)","u":"%3Cinit%3E(int)"},{"p":"swervelib.math","c":"SwerveModuleState2","l":"angle"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"angle"},{"p":"swervelib.parser.json.modules","c":"BoolMotorJson","l":"angle"},{"p":"swervelib.parser.json","c":"MotorConfigDouble","l":"angle"},{"p":"swervelib.parser.json","c":"MotorConfigInt","l":"angle"},{"p":"swervelib.parser.json","c":"PIDFPropertiesJson","l":"angle"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"angle"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"angleEncoderPulsePerRevolution"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"angleEncoderPulsePerRotation"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"angleGearRatio"},{"p":"swervelib.parser.json","c":"ControllerPropertiesJson","l":"angleJoystickRadiusDeadband"},{"p":"swervelib.parser","c":"SwerveControllerConfiguration","l":"angleJoyStickRadiusDeadband"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"angleKV"},{"p":"swervelib","c":"SwerveController","l":"angleLimiter"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"angleMotor"},{"p":"swervelib","c":"SwerveModule","l":"angleMotor"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"angleMotorCurrentLimit"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"angleMotorEncoderPulsePerRevolution"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"angleMotorFreeSpeedRPM"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"angleMotorFreeSpeedRPM"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"angleMotorFreeSpeedRPM"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"angleMotorInverted"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"angleMotorRampRate"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"angleOffset"},{"p":"swervelib","c":"SwerveModule","l":"angleOffset"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"anglePIDF"},{"p":"swervelib.math","c":"SwerveMath","l":"applyDeadband(double, boolean, double)","u":"applyDeadband(double,boolean,double)"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"bigInverseKinematics"},{"p":"swervelib.parser.json.modules","c":"BoolMotorJson","l":"BoolMotorJson()","u":"%3Cinit%3E()"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"burnFlash()"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"burnFlash()"},{"p":"swervelib.motors","c":"SwerveMotor","l":"burnFlash()"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"burnFlash()"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"burnFlash()"},{"p":"swervelib.math","c":"SwerveMath","l":"calcMaxAccel(Rotation2d, double, double, Translation3d, SwerveDriveConfiguration)","u":"calcMaxAccel(edu.wpi.first.math.geometry.Rotation2d,double,double,edu.wpi.first.math.geometry.Translation3d,swervelib.parser.SwerveDriveConfiguration)"},{"p":"swervelib.math","c":"SwerveMath","l":"calculateAngleKV(double, double, double)","u":"calculateAngleKV(double,double,double)"},{"p":"swervelib.math","c":"SwerveMath","l":"calculateDegreesPerSteeringRotation(double, double)","u":"calculateDegreesPerSteeringRotation(double,double)"},{"p":"swervelib.math","c":"SwerveMath","l":"calculateMaxAcceleration(double)"},{"p":"swervelib.math","c":"SwerveMath","l":"calculateMaxAcceleration(double, double, double, double, double)","u":"calculateMaxAcceleration(double,double,double,double,double)"},{"p":"swervelib.math","c":"SwerveMath","l":"calculateMaxAngularVelocity(double, double, double)","u":"calculateMaxAngularVelocity(double,double,double)"},{"p":"swervelib.math","c":"SwerveMath","l":"calculateMetersPerRotation(double, double, double)","u":"calculateMetersPerRotation(double,double,double)"},{"p":"swervelib.parser.json","c":"DeviceJson","l":"canbus"},{"p":"swervelib.encoders","c":"CANCoderSwerve","l":"CANCoderSwerve(int)","u":"%3Cinit%3E(int)"},{"p":"swervelib.encoders","c":"CANCoderSwerve","l":"CANCoderSwerve(int, String)","u":"%3Cinit%3E(int,java.lang.String)"},{"p":"swervelib.parser","c":"SwerveParser","l":"checkDirectory(File)","u":"checkDirectory(java.io.File)"},{"p":"swervelib.encoders","c":"AnalogAbsoluteEncoderSwerve","l":"clearStickyFaults()"},{"p":"swervelib.encoders","c":"CANCoderSwerve","l":"clearStickyFaults()"},{"p":"swervelib.encoders","c":"SparkMaxEncoderSwerve","l":"clearStickyFaults()"},{"p":"swervelib.encoders","c":"SwerveAbsoluteEncoder","l":"clearStickyFaults()"},{"p":"swervelib.imu","c":"ADIS16448Swerve","l":"clearStickyFaults()"},{"p":"swervelib.imu","c":"ADIS16470Swerve","l":"clearStickyFaults()"},{"p":"swervelib.imu","c":"ADXRS450Swerve","l":"clearStickyFaults()"},{"p":"swervelib.imu","c":"AnalogGyroSwerve","l":"clearStickyFaults()"},{"p":"swervelib.imu","c":"NavXSwerve","l":"clearStickyFaults()"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"clearStickyFaults()"},{"p":"swervelib.imu","c":"PigeonSwerve","l":"clearStickyFaults()"},{"p":"swervelib.imu","c":"SwerveIMU","l":"clearStickyFaults()"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"clearStickyFaults()"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"clearStickyFaults()"},{"p":"swervelib.motors","c":"SwerveMotor","l":"clearStickyFaults()"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"clearStickyFaults()"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"clearStickyFaults()"},{"p":"swervelib","c":"SwerveController","l":"config"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"configChanged"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"configuration"},{"p":"swervelib","c":"SwerveModule","l":"configuration"},{"p":"swervelib.encoders","c":"AnalogAbsoluteEncoderSwerve","l":"configure(boolean)"},{"p":"swervelib.encoders","c":"CANCoderSwerve","l":"configure(boolean)"},{"p":"swervelib.encoders","c":"SparkMaxEncoderSwerve","l":"configure(boolean)"},{"p":"swervelib.encoders","c":"SwerveAbsoluteEncoder","l":"configure(boolean)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"configureCANStatusFrames(int)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"configureCANStatusFrames(int, int, int, int, int)","u":"configureCANStatusFrames(int,int,int,int,int)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"configureCANStatusFrames(int, int, int, int, int)","u":"configureCANStatusFrames(int,int,int,int,int)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"configureIntegratedEncoder(double)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"configureIntegratedEncoder(double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"configureIntegratedEncoder(double)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"configureIntegratedEncoder(double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"configureIntegratedEncoder(double)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"configurePIDF(PIDFConfig)","u":"configurePIDF(swervelib.parser.PIDFConfig)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"configurePIDF(PIDFConfig)","u":"configurePIDF(swervelib.parser.PIDFConfig)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"configurePIDF(PIDFConfig)","u":"configurePIDF(swervelib.parser.PIDFConfig)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"configurePIDF(PIDFConfig)","u":"configurePIDF(swervelib.parser.PIDFConfig)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"configurePIDF(PIDFConfig)","u":"configurePIDF(swervelib.parser.PIDFConfig)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"configurePIDWrapping(double, double)","u":"configurePIDWrapping(double,double)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"configurePIDWrapping(double, double)","u":"configurePIDWrapping(double,double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"configurePIDWrapping(double, double)","u":"configurePIDWrapping(double,double)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"configurePIDWrapping(double, double)","u":"configurePIDWrapping(double,double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"configurePIDWrapping(double, double)","u":"configurePIDWrapping(double,double)"},{"p":"swervelib.parser","c":"SwerveParser","l":"controllerPropertiesJson"},{"p":"swervelib.parser.json","c":"ControllerPropertiesJson","l":"ControllerPropertiesJson()","u":"%3Cinit%3E()"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"convertToNativeSensorUnits(double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"convertToNativeSensorUnits(double)"},{"p":"swervelib.parser.json","c":"ControllerPropertiesJson","l":"createControllerConfiguration(SwerveDriveConfiguration)","u":"createControllerConfiguration(swervelib.parser.SwerveDriveConfiguration)"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"createDriveFeedforward()"},{"p":"swervelib.parser.json","c":"DeviceJson","l":"createEncoder()"},{"p":"swervelib.parser.json","c":"DeviceJson","l":"createIMU()"},{"p":"swervelib.parser.json","c":"DeviceJson","l":"createIntegratedEncoder(SwerveMotor)","u":"createIntegratedEncoder(swervelib.motors.SwerveMotor)"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"createModuleConfiguration(PIDFConfig, PIDFConfig, double, SwerveModulePhysicalCharacteristics)","u":"createModuleConfiguration(swervelib.parser.PIDFConfig,swervelib.parser.PIDFConfig,double,swervelib.parser.SwerveModulePhysicalCharacteristics)"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"createModules(SwerveModuleConfiguration[])","u":"createModules(swervelib.parser.SwerveModuleConfiguration[])"},{"p":"swervelib.parser.json","c":"DeviceJson","l":"createMotor(boolean)"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"createPhysicalProperties(double)"},{"p":"swervelib.parser","c":"PIDFConfig","l":"createPIDController()"},{"p":"swervelib.parser","c":"SwerveParser","l":"createSwerveDrive()"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"currentLimit"},{"p":"swervelib.parser","c":"PIDFConfig","l":"d"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"desaturateWheelSpeeds(SwerveModuleState2[], ChassisSpeeds, double, double, double)","u":"desaturateWheelSpeeds(swervelib.math.SwerveModuleState2[],edu.wpi.first.math.kinematics.ChassisSpeeds,double,double,double)"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"desaturateWheelSpeeds(SwerveModuleState2[], double)","u":"desaturateWheelSpeeds(swervelib.math.SwerveModuleState2[],double)"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"desiredChassisSpeeds"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"desiredStates"},{"p":"swervelib.parser.json","c":"DeviceJson","l":"DeviceJson()","u":"%3Cinit%3E()"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"drive"},{"p":"swervelib.parser.json.modules","c":"BoolMotorJson","l":"drive"},{"p":"swervelib.parser.json","c":"MotorConfigDouble","l":"drive"},{"p":"swervelib.parser.json","c":"MotorConfigInt","l":"drive"},{"p":"swervelib.parser.json","c":"PIDFPropertiesJson","l":"drive"},{"p":"swervelib","c":"SwerveDrive","l":"drive(Translation2d, double, boolean, boolean)","u":"drive(edu.wpi.first.math.geometry.Translation2d,double,boolean,boolean)"},{"p":"swervelib","c":"SwerveDrive","l":"drive(Translation2d, double, boolean, boolean, boolean)","u":"drive(edu.wpi.first.math.geometry.Translation2d,double,boolean,boolean,boolean)"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"driveEncoderPulsePerRotation"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"driveGearRatio"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"driveMotor"},{"p":"swervelib","c":"SwerveModule","l":"driveMotor"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"driveMotorCurrentLimit"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"driveMotorInverted"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"driveMotorRampRate"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"dt"},{"p":"swervelib.encoders","c":"AnalogAbsoluteEncoderSwerve","l":"encoder"},{"p":"swervelib.encoders","c":"CANCoderSwerve","l":"encoder"},{"p":"swervelib.encoders","c":"SparkMaxEncoderSwerve","l":"encoder"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"encoder"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"encoder"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"encoder"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"encoderPulsePerRotation"},{"p":"swervelib.parser","c":"PIDFConfig","l":"f"},{"p":"swervelib.encoders","c":"AnalogAbsoluteEncoderSwerve","l":"factoryDefault()"},{"p":"swervelib.encoders","c":"CANCoderSwerve","l":"factoryDefault()"},{"p":"swervelib.encoders","c":"SparkMaxEncoderSwerve","l":"factoryDefault()"},{"p":"swervelib.encoders","c":"SwerveAbsoluteEncoder","l":"factoryDefault()"},{"p":"swervelib.imu","c":"ADIS16448Swerve","l":"factoryDefault()"},{"p":"swervelib.imu","c":"ADIS16470Swerve","l":"factoryDefault()"},{"p":"swervelib.imu","c":"ADXRS450Swerve","l":"factoryDefault()"},{"p":"swervelib.imu","c":"AnalogGyroSwerve","l":"factoryDefault()"},{"p":"swervelib.imu","c":"NavXSwerve","l":"factoryDefault()"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"factoryDefault()"},{"p":"swervelib.imu","c":"PigeonSwerve","l":"factoryDefault()"},{"p":"swervelib.imu","c":"SwerveIMU","l":"factoryDefault()"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"factoryDefaultOccurred"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"factoryDefaultOccurred"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"factoryDefaultOccurred"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"factoryDefaultOccurred"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"factoryDefaults()"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"factoryDefaults()"},{"p":"swervelib.motors","c":"SwerveMotor","l":"factoryDefaults()"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"factoryDefaults()"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"factoryDefaults()"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"fakePos"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"fakeSpeed"},{"p":"swervelib","c":"SwerveModule","l":"feedforward"},{"p":"swervelib","c":"SwerveDrive","l":"field"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"forwardDirection"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"fscalar"},{"p":"swervelib.parser","c":"PIDFConfig","l":"fscalar"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"gearRatio"},{"p":"swervelib.encoders","c":"AnalogAbsoluteEncoderSwerve","l":"getAbsoluteEncoder()"},{"p":"swervelib.encoders","c":"CANCoderSwerve","l":"getAbsoluteEncoder()"},{"p":"swervelib.encoders","c":"SparkMaxEncoderSwerve","l":"getAbsoluteEncoder()"},{"p":"swervelib.encoders","c":"SwerveAbsoluteEncoder","l":"getAbsoluteEncoder()"},{"p":"swervelib.encoders","c":"AnalogAbsoluteEncoderSwerve","l":"getAbsolutePosition()"},{"p":"swervelib.encoders","c":"CANCoderSwerve","l":"getAbsolutePosition()"},{"p":"swervelib.encoders","c":"SparkMaxEncoderSwerve","l":"getAbsolutePosition()"},{"p":"swervelib.encoders","c":"SwerveAbsoluteEncoder","l":"getAbsolutePosition()"},{"p":"swervelib","c":"SwerveModule","l":"getAbsolutePosition()"},{"p":"swervelib","c":"SwerveDrive","l":"getFieldVelocity()"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"getGyroRotation3d()"},{"p":"swervelib","c":"SwerveDrive","l":"getGyroRotation3d()"},{"p":"swervelib.imu","c":"ADIS16448Swerve","l":"getIMU()"},{"p":"swervelib.imu","c":"ADIS16470Swerve","l":"getIMU()"},{"p":"swervelib.imu","c":"ADXRS450Swerve","l":"getIMU()"},{"p":"swervelib.imu","c":"AnalogGyroSwerve","l":"getIMU()"},{"p":"swervelib.imu","c":"NavXSwerve","l":"getIMU()"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"getIMU()"},{"p":"swervelib.imu","c":"PigeonSwerve","l":"getIMU()"},{"p":"swervelib.imu","c":"SwerveIMU","l":"getIMU()"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"getInstance()"},{"p":"swervelib.parser","c":"SwerveParser","l":"getModuleConfigurationByName(String, SwerveDriveConfiguration)","u":"getModuleConfigurationByName(java.lang.String,swervelib.parser.SwerveDriveConfiguration)"},{"p":"swervelib","c":"SwerveDrive","l":"getModulePositions()"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"getMotor()"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"getMotor()"},{"p":"swervelib.motors","c":"SwerveMotor","l":"getMotor()"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"getMotor()"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"getMotor()"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim.SimProfile","l":"getPeriod()"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"getPitch()"},{"p":"swervelib","c":"SwerveDrive","l":"getPitch()"},{"p":"swervelib","c":"SwerveDrive","l":"getPose()"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"getPosition()"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"getPosition()"},{"p":"swervelib.motors","c":"SwerveMotor","l":"getPosition()"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"getPosition()"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"getPosition()"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"getPosition()"},{"p":"swervelib","c":"SwerveModule","l":"getPosition()"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"getPositionEncoderConversion(boolean)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"getRawPosition()"},{"p":"swervelib","c":"SwerveController","l":"getRawTargetSpeeds(double, double, double)","u":"getRawTargetSpeeds(double,double,double)"},{"p":"swervelib","c":"SwerveController","l":"getRawTargetSpeeds(double, double, double, double)","u":"getRawTargetSpeeds(double,double,double,double)"},{"p":"swervelib","c":"SwerveModule","l":"getRelativePosition()"},{"p":"swervelib","c":"SwerveDrive","l":"getRobotVelocity()"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"getRoll()"},{"p":"swervelib","c":"SwerveDrive","l":"getRoll()"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"getState()"},{"p":"swervelib","c":"SwerveModule","l":"getState()"},{"p":"swervelib","c":"SwerveDrive","l":"getStates()"},{"p":"swervelib.math","c":"SwerveMath","l":"getSwerveModule(SwerveModule[], boolean, boolean)","u":"getSwerveModule(swervelib.SwerveModule[],boolean,boolean)"},{"p":"swervelib","c":"SwerveDrive","l":"getSwerveModulePoses(Pose2d)","u":"getSwerveModulePoses(edu.wpi.first.math.geometry.Pose2d)"},{"p":"swervelib","c":"SwerveController","l":"getTargetSpeeds(double, double, double, double)","u":"getTargetSpeeds(double,double,double,double)"},{"p":"swervelib","c":"SwerveController","l":"getTargetSpeeds(double, double, double, double, double)","u":"getTargetSpeeds(double,double,double,double,double)"},{"p":"swervelib","c":"SwerveController","l":"getTranslation2d(ChassisSpeeds)","u":"getTranslation2d(edu.wpi.first.math.kinematics.ChassisSpeeds)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"getVelocity()"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"getVelocity()"},{"p":"swervelib.motors","c":"SwerveMotor","l":"getVelocity()"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"getVelocity()"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"getVelocity()"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"getYaw()"},{"p":"swervelib","c":"SwerveDrive","l":"getYaw()"},{"p":"swervelib.imu","c":"ADIS16448Swerve","l":"getYawPitchRoll(double[])"},{"p":"swervelib.imu","c":"ADIS16470Swerve","l":"getYawPitchRoll(double[])"},{"p":"swervelib.imu","c":"ADXRS450Swerve","l":"getYawPitchRoll(double[])"},{"p":"swervelib.imu","c":"AnalogGyroSwerve","l":"getYawPitchRoll(double[])"},{"p":"swervelib.imu","c":"NavXSwerve","l":"getYawPitchRoll(double[])"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"getYawPitchRoll(double[])"},{"p":"swervelib.imu","c":"PigeonSwerve","l":"getYawPitchRoll(double[])"},{"p":"swervelib.imu","c":"SwerveIMU","l":"getYawPitchRoll(double[])"},{"p":"swervelib.imu","c":"AnalogGyroSwerve","l":"gyro"},{"p":"swervelib.imu","c":"NavXSwerve","l":"gyro"},{"p":"swervelib.parser.json","c":"ControllerPropertiesJson","l":"heading"},{"p":"swervelib","c":"SwerveController","l":"headingCalculate(double, double)","u":"headingCalculate(double,double)"},{"p":"swervelib.parser","c":"SwerveControllerConfiguration","l":"headingPIDF"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry.TelemetryVerbosity","l":"HIGH"},{"p":"swervelib.parser","c":"PIDFConfig","l":"i"},{"p":"swervelib.parser.json","c":"DeviceJson","l":"id"},{"p":"swervelib.imu","c":"ADIS16448Swerve","l":"imu"},{"p":"swervelib.imu","c":"ADIS16470Swerve","l":"imu"},{"p":"swervelib.imu","c":"ADXRS450Swerve","l":"imu"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"imu"},{"p":"swervelib.imu","c":"PigeonSwerve","l":"imu"},{"p":"swervelib.parser.json","c":"SwerveDriveJson","l":"imu"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"imu"},{"p":"swervelib","c":"SwerveDrive","l":"imu"},{"p":"swervelib.encoders","c":"AnalogAbsoluteEncoderSwerve","l":"inverted"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"inverted"},{"p":"swervelib.parser.json","c":"SwerveDriveJson","l":"invertedIMU"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"invertedIMU"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"isAttachedAbsoluteEncoder()"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"isAttachedAbsoluteEncoder()"},{"p":"swervelib.motors","c":"SwerveMotor","l":"isAttachedAbsoluteEncoder()"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"isAttachedAbsoluteEncoder()"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"isAttachedAbsoluteEncoder()"},{"p":"swervelib.motors","c":"SwerveMotor","l":"isDriveMotor"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"isSimulation"},{"p":"swervelib.parser","c":"PIDFConfig","l":"iz"},{"p":"swervelib","c":"SwerveDrive","l":"kinematics"},{"p":"swervelib","c":"SwerveModule","l":"lastAngle"},{"p":"swervelib","c":"SwerveController","l":"lastAngleScalar"},{"p":"swervelib","c":"SwerveDrive","l":"lastHeadingRadians"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"lastTime"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"lastTime"},{"p":"swervelib.math","c":"SwerveMath","l":"limitVelocity(Translation2d, ChassisSpeeds, Pose2d, double, double, double, Translation3d, SwerveDriveConfiguration)","u":"limitVelocity(edu.wpi.first.math.geometry.Translation2d,edu.wpi.first.math.kinematics.ChassisSpeeds,edu.wpi.first.math.geometry.Pose2d,double,double,double,edu.wpi.first.math.geometry.Translation3d,swervelib.parser.SwerveDriveConfiguration)"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"location"},{"p":"swervelib.parser.json.modules","c":"LocationJson","l":"LocationJson()","u":"%3Cinit%3E()"},{"p":"swervelib","c":"SwerveDrive","l":"lockPose()"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry.TelemetryVerbosity","l":"LOW"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"m_forwardKinematics"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"m_inverseKinematics"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"m_modules"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"m_moduleStates"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"m_numModules"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"m_prevCoR"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry.TelemetryVerbosity","l":"MACHINE"},{"p":"swervelib.parser.deserializer","c":"PIDFRange","l":"max"},{"p":"swervelib.parser","c":"SwerveControllerConfiguration","l":"maxAngularVelocity"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"maxAngularVelocity"},{"p":"swervelib.parser.json","c":"SwerveDriveJson","l":"maxSpeed"},{"p":"swervelib.parser","c":"SwerveControllerConfiguration","l":"maxSpeed"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"maxSpeed"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"maxSpeed"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"maxSpeed"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"measuredChassisSpeeds"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"measuredStates"},{"p":"swervelib.parser.deserializer","c":"PIDFRange","l":"min"},{"p":"swervelib.parser","c":"SwerveParser","l":"moduleConfigs"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"moduleCount"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"moduleCount"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"ModuleJson()","u":"%3Cinit%3E()"},{"p":"swervelib.parser","c":"SwerveParser","l":"moduleJsons"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"moduleLocation"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"moduleLocationsMeters"},{"p":"swervelib","c":"SwerveModule","l":"moduleNumber"},{"p":"swervelib.parser.json","c":"SwerveDriveJson","l":"modules"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"modules"},{"p":"swervelib","c":"SwerveDrive","l":"moduleSynchronizationCounter"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"motor"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"motor"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"motor"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"motor"},{"p":"swervelib.parser.json","c":"MotorConfigDouble","l":"MotorConfigDouble()","u":"%3Cinit%3E()"},{"p":"swervelib.parser.json","c":"MotorConfigDouble","l":"MotorConfigDouble(double, double)","u":"%3Cinit%3E(double,double)"},{"p":"swervelib.parser.json","c":"MotorConfigInt","l":"MotorConfigInt()","u":"%3Cinit%3E()"},{"p":"swervelib.parser.json","c":"MotorConfigInt","l":"MotorConfigInt(int, int)","u":"%3Cinit%3E(int,int)"},{"p":"swervelib.imu","c":"NavXSwerve","l":"NavXSwerve(SerialPort.Port)","u":"%3Cinit%3E(edu.wpi.first.wpilibj.SerialPort.Port)"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry.TelemetryVerbosity","l":"NONE"},{"p":"swervelib.math","c":"SwerveMath","l":"normalizeAngle(double)"},{"p":"swervelib.math","c":"SwerveModuleState2","l":"omegaRadPerSecond"},{"p":"swervelib.parser","c":"SwerveParser","l":"openJson(File)","u":"openJson(java.io.File)"},{"p":"swervelib.parser.json","c":"SwerveDriveJson","l":"optimalVoltage"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"optimalVoltage"},{"p":"swervelib.parser","c":"PIDFConfig","l":"output"},{"p":"swervelib.parser","c":"PIDFConfig","l":"p"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"physicalCharacteristics"},{"p":"swervelib.parser","c":"SwerveParser","l":"physicalPropertiesJson"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"PhysicalPropertiesJson()","u":"%3Cinit%3E()"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"PhysicsSim()","u":"%3Cinit%3E()"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"pid"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"pid"},{"p":"swervelib.parser","c":"PIDFConfig","l":"PIDFConfig()","u":"%3Cinit%3E()"},{"p":"swervelib.parser","c":"PIDFConfig","l":"PIDFConfig(double, double)","u":"%3Cinit%3E(double,double)"},{"p":"swervelib.parser","c":"PIDFConfig","l":"PIDFConfig(double, double, double)","u":"%3Cinit%3E(double,double,double)"},{"p":"swervelib.parser","c":"PIDFConfig","l":"PIDFConfig(double, double, double, double)","u":"%3Cinit%3E(double,double,double,double)"},{"p":"swervelib.parser","c":"PIDFConfig","l":"PIDFConfig(double, double, double, double, double)","u":"%3Cinit%3E(double,double,double,double,double)"},{"p":"swervelib.parser","c":"SwerveParser","l":"pidfPropertiesJson"},{"p":"swervelib.parser.json","c":"PIDFPropertiesJson","l":"PIDFPropertiesJson()","u":"%3Cinit%3E()"},{"p":"swervelib.parser.deserializer","c":"PIDFRange","l":"PIDFRange()","u":"%3Cinit%3E()"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"Pigeon2Swerve(int)","u":"%3Cinit%3E(int)"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"Pigeon2Swerve(int, String)","u":"%3Cinit%3E(int,java.lang.String)"},{"p":"swervelib.imu","c":"PigeonSwerve","l":"PigeonSwerve(int)","u":"%3Cinit%3E(int)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"placeInAppropriate0To360Scope(double, double)","u":"placeInAppropriate0To360Scope(double,double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"placeInAppropriate0To360Scope(double, double)","u":"placeInAppropriate0To360Scope(double,double)"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"Position"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"positionConversionFactor"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"positionConversionFactor"},{"p":"swervelib","c":"SwerveDrive","l":"postTrajectory(Trajectory)","u":"postTrajectory(edu.wpi.first.math.trajectory.Trajectory)"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"rampRate"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"random(double)"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"random(double, double)","u":"random(double,double)"},{"p":"swervelib.encoders","c":"SwerveAbsoluteEncoder","l":"readingError"},{"p":"swervelib","c":"SwerveDrive","l":"replaceSwerveModuleFeedforward(SimpleMotorFeedforward)","u":"replaceSwerveModuleFeedforward(edu.wpi.first.math.controller.SimpleMotorFeedforward)"},{"p":"swervelib","c":"SwerveDrive","l":"resetOdometry(Pose2d)","u":"resetOdometry(edu.wpi.first.math.geometry.Pose2d)"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"robotRotation"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"rotationUnit"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"run()"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim.SimProfile","l":"run()"},{"p":"swervelib.simulation.ctre","c":"TalonFXSimProfile","l":"run()"},{"p":"swervelib.simulation.ctre","c":"TalonSRXSimProfile","l":"run()"},{"p":"swervelib.simulation.ctre","c":"VictorSPXSimProfile","l":"run()"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"set(double)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"set(double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"set(double)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"set(double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"set(double)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"setAbsoluteEncoder(SwerveAbsoluteEncoder)","u":"setAbsoluteEncoder(swervelib.encoders.SwerveAbsoluteEncoder)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setAbsoluteEncoder(SwerveAbsoluteEncoder)","u":"setAbsoluteEncoder(swervelib.encoders.SwerveAbsoluteEncoder)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setAbsoluteEncoder(SwerveAbsoluteEncoder)","u":"setAbsoluteEncoder(swervelib.encoders.SwerveAbsoluteEncoder)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setAbsoluteEncoder(SwerveAbsoluteEncoder)","u":"setAbsoluteEncoder(swervelib.encoders.SwerveAbsoluteEncoder)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setAbsoluteEncoder(SwerveAbsoluteEncoder)","u":"setAbsoluteEncoder(swervelib.encoders.SwerveAbsoluteEncoder)"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"setAngle(double)"},{"p":"swervelib","c":"SwerveModule","l":"setAngle(double)"},{"p":"swervelib","c":"SwerveDrive","l":"setChassisSpeeds(ChassisSpeeds)","u":"setChassisSpeeds(edu.wpi.first.math.kinematics.ChassisSpeeds)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"setCurrentLimit(int)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setCurrentLimit(int)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setCurrentLimit(int)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setCurrentLimit(int)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setCurrentLimit(int)"},{"p":"swervelib","c":"SwerveModule","l":"setDesiredState(SwerveModuleState2, boolean)","u":"setDesiredState(swervelib.math.SwerveModuleState2,boolean)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"setInverted(boolean)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setInverted(boolean)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setInverted(boolean)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setInverted(boolean)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setInverted(boolean)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"setLoopRampRate(double)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setLoopRampRate(double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setLoopRampRate(double)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setLoopRampRate(double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setLoopRampRate(double)"},{"p":"swervelib","c":"SwerveDrive","l":"setModuleStates(SwerveModuleState2[], boolean)","u":"setModuleStates(swervelib.math.SwerveModuleState2[],boolean)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"setMotorBrake(boolean)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setMotorBrake(boolean)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setMotorBrake(boolean)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setMotorBrake(boolean)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setMotorBrake(boolean)"},{"p":"swervelib","c":"SwerveModule","l":"setMotorBrake(boolean)"},{"p":"swervelib","c":"SwerveDrive","l":"setMotorIdleMode(boolean)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"setPosition(double)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setPosition(double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setPosition(double)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setPosition(double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setPosition(double)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"setReference(double, double)","u":"setReference(double,double)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setReference(double, double)","u":"setReference(double,double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setReference(double, double)","u":"setReference(double,double)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setReference(double, double)","u":"setReference(double,double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setReference(double, double)","u":"setReference(double,double)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"setVoltageCompensation(double)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setVoltageCompensation(double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setVoltageCompensation(double)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setVoltageCompensation(double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setVoltageCompensation(double)"},{"p":"swervelib.imu","c":"ADIS16448Swerve","l":"setYaw(double)"},{"p":"swervelib.imu","c":"ADIS16470Swerve","l":"setYaw(double)"},{"p":"swervelib.imu","c":"ADXRS450Swerve","l":"setYaw(double)"},{"p":"swervelib.imu","c":"AnalogGyroSwerve","l":"setYaw(double)"},{"p":"swervelib.imu","c":"NavXSwerve","l":"setYaw(double)"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"setYaw(double)"},{"p":"swervelib.imu","c":"PigeonSwerve","l":"setYaw(double)"},{"p":"swervelib.imu","c":"SwerveIMU","l":"setYaw(double)"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"sim"},{"p":"swervelib","c":"SwerveDrive","l":"simIMU"},{"p":"swervelib","c":"SwerveModule","l":"simModule"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim.SimProfile","l":"SimProfile()","u":"%3Cinit%3E()"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"Simulation"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"sizeFrontBack"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"sizeLeftRight"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"SparkMAX_slotIdx()","u":"%3Cinit%3E()"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"SparkMaxBrushedMotorSwerve(CANSparkMax, boolean, SparkMaxRelativeEncoder.Type, int, boolean)","u":"%3Cinit%3E(com.revrobotics.CANSparkMax,boolean,com.revrobotics.SparkMaxRelativeEncoder.Type,int,boolean)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"SparkMaxBrushedMotorSwerve(int, boolean, SparkMaxRelativeEncoder.Type, int, boolean)","u":"%3Cinit%3E(int,boolean,com.revrobotics.SparkMaxRelativeEncoder.Type,int,boolean)"},{"p":"swervelib.encoders","c":"SparkMaxEncoderSwerve","l":"SparkMaxEncoderSwerve(SwerveMotor)","u":"%3Cinit%3E(swervelib.motors.SwerveMotor)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"SparkMaxSwerve(CANSparkMax, boolean)","u":"%3Cinit%3E(com.revrobotics.CANSparkMax,boolean)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"SparkMaxSwerve(int, boolean)","u":"%3Cinit%3E(int,boolean)"},{"p":"swervelib.math","c":"SwerveModuleState2","l":"speedMetersPerSecond"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"state"},{"p":"swervelib","c":"SwerveDrive","l":"stateStdDevs"},{"p":"swervelib.encoders","c":"SwerveAbsoluteEncoder","l":"SwerveAbsoluteEncoder()","u":"%3Cinit%3E()"},{"p":"swervelib","c":"SwerveDrive","l":"swerveController"},{"p":"swervelib","c":"SwerveController","l":"SwerveController(SwerveControllerConfiguration)","u":"%3Cinit%3E(swervelib.parser.SwerveControllerConfiguration)"},{"p":"swervelib.parser","c":"SwerveControllerConfiguration","l":"SwerveControllerConfiguration(SwerveDriveConfiguration, PIDFConfig)","u":"%3Cinit%3E(swervelib.parser.SwerveDriveConfiguration,swervelib.parser.PIDFConfig)"},{"p":"swervelib.parser","c":"SwerveControllerConfiguration","l":"SwerveControllerConfiguration(SwerveDriveConfiguration, PIDFConfig, double)","u":"%3Cinit%3E(swervelib.parser.SwerveDriveConfiguration,swervelib.parser.PIDFConfig,double)"},{"p":"swervelib","c":"SwerveDrive","l":"SwerveDrive(SwerveDriveConfiguration, SwerveControllerConfiguration)","u":"%3Cinit%3E(swervelib.parser.SwerveDriveConfiguration,swervelib.parser.SwerveControllerConfiguration)"},{"p":"swervelib","c":"SwerveDrive","l":"swerveDriveConfiguration"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"SwerveDriveConfiguration(SwerveModuleConfiguration[], SwerveIMU, double, boolean)","u":"%3Cinit%3E(swervelib.parser.SwerveModuleConfiguration[],swervelib.imu.SwerveIMU,double,boolean)"},{"p":"swervelib.parser","c":"SwerveParser","l":"swerveDriveJson"},{"p":"swervelib.parser.json","c":"SwerveDriveJson","l":"SwerveDriveJson()","u":"%3Cinit%3E()"},{"p":"swervelib","c":"SwerveDrive","l":"swerveDrivePoseEstimator"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"SwerveDriveTelemetry()","u":"%3Cinit%3E()"},{"p":"swervelib.imu","c":"SwerveIMU","l":"SwerveIMU()","u":"%3Cinit%3E()"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"SwerveIMUSimulation()","u":"%3Cinit%3E()"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"SwerveKinematics2(Translation2d...)","u":"%3Cinit%3E(edu.wpi.first.math.geometry.Translation2d...)"},{"p":"swervelib.math","c":"SwerveMath","l":"SwerveMath()","u":"%3Cinit%3E()"},{"p":"swervelib","c":"SwerveModule","l":"SwerveModule(int, SwerveModuleConfiguration)","u":"%3Cinit%3E(int,swervelib.parser.SwerveModuleConfiguration)"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"SwerveModuleConfiguration(SwerveMotor, SwerveMotor, SwerveAbsoluteEncoder, double, double, double, PIDFConfig, PIDFConfig, double, SwerveModulePhysicalCharacteristics)","u":"%3Cinit%3E(swervelib.motors.SwerveMotor,swervelib.motors.SwerveMotor,swervelib.encoders.SwerveAbsoluteEncoder,double,double,double,swervelib.parser.PIDFConfig,swervelib.parser.PIDFConfig,double,swervelib.parser.SwerveModulePhysicalCharacteristics)"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"SwerveModuleConfiguration(SwerveMotor, SwerveMotor, SwerveAbsoluteEncoder, double, double, double, PIDFConfig, PIDFConfig, double, SwerveModulePhysicalCharacteristics, boolean, boolean, boolean, double, double)","u":"%3Cinit%3E(swervelib.motors.SwerveMotor,swervelib.motors.SwerveMotor,swervelib.encoders.SwerveAbsoluteEncoder,double,double,double,swervelib.parser.PIDFConfig,swervelib.parser.PIDFConfig,double,swervelib.parser.SwerveModulePhysicalCharacteristics,boolean,boolean,boolean,double,double)"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"SwerveModulePhysicalCharacteristics(double, double, double, double, double, double, int, int)","u":"%3Cinit%3E(double,double,double,double,double,double,int,int)"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"SwerveModulePhysicalCharacteristics(double, double, double, double, double, double, int, int, double, double, int, int)","u":"%3Cinit%3E(double,double,double,double,double,double,int,int,double,double,int,int)"},{"p":"swervelib","c":"SwerveDrive","l":"swerveModules"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"SwerveModuleSimulation()","u":"%3Cinit%3E()"},{"p":"swervelib.math","c":"SwerveModuleState2","l":"SwerveModuleState2()","u":"%3Cinit%3E()"},{"p":"swervelib.math","c":"SwerveModuleState2","l":"SwerveModuleState2(double, Rotation2d, double)","u":"%3Cinit%3E(double,edu.wpi.first.math.geometry.Rotation2d,double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"SwerveMotor()","u":"%3Cinit%3E()"},{"p":"swervelib.parser","c":"SwerveParser","l":"SwerveParser(File)","u":"%3Cinit%3E(java.io.File)"},{"p":"swervelib","c":"SwerveModule","l":"synchronizeEncoders()"},{"p":"swervelib","c":"SwerveDrive","l":"synchronizeModuleEncoders()"},{"p":"swervelib.simulation.ctre","c":"TalonFXSimProfile","l":"TalonFXSimProfile(TalonFX, double, double, boolean)","u":"%3Cinit%3E(com.ctre.phoenix.motorcontrol.can.TalonFX,double,double,boolean)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"TalonFXSwerve(int, boolean)","u":"%3Cinit%3E(int,boolean)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"TalonFXSwerve(int, String, boolean)","u":"%3Cinit%3E(int,java.lang.String,boolean)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"TalonFXSwerve(WPI_TalonFX, boolean)","u":"%3Cinit%3E(com.ctre.phoenix.motorcontrol.can.WPI_TalonFX,boolean)"},{"p":"swervelib.simulation.ctre","c":"TalonSRXSimProfile","l":"TalonSRXSimProfile(TalonSRX, double, double, boolean)","u":"%3Cinit%3E(com.ctre.phoenix.motorcontrol.can.TalonSRX,double,double,boolean)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"TalonSRXSwerve(int, boolean)","u":"%3Cinit%3E(int,boolean)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"TalonSRXSwerve(WPI_TalonSRX, boolean)","u":"%3Cinit%3E(com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX,boolean)"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry.TelemetryVerbosity","l":"TelemetryVerbosity()","u":"%3Cinit%3E()"},{"p":"swervelib","c":"SwerveController","l":"thetaController"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"timer"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"timer"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"toChassisSpeeds(SwerveModuleState2...)","u":"toChassisSpeeds(swervelib.math.SwerveModuleState2...)"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"toSwerveModuleStates(ChassisSpeeds)","u":"toSwerveModuleStates(edu.wpi.first.math.kinematics.ChassisSpeeds)"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"toSwerveModuleStates(ChassisSpeeds, Translation2d)","u":"toSwerveModuleStates(edu.wpi.first.math.kinematics.ChassisSpeeds,edu.wpi.first.math.geometry.Translation2d)"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"toTwist2d(SwerveModulePosition...)","u":"toTwist2d(edu.wpi.first.math.kinematics.SwerveModulePosition...)"},{"p":"swervelib.parser.json","c":"DeviceJson","l":"type"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"updateData()"},{"p":"swervelib","c":"SwerveDrive","l":"updateOdometry()"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"updateOdometry(SwerveKinematics2, SwerveModuleState2[], Pose2d[], Field2d)","u":"updateOdometry(swervelib.math.SwerveKinematics2,swervelib.math.SwerveModuleState2[],edu.wpi.first.math.geometry.Pose2d[],edu.wpi.first.wpilibj.smartdashboard.Field2d)"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"updateStateAndPosition(SwerveModuleState2)","u":"updateStateAndPosition(swervelib.math.SwerveModuleState2)"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry.TelemetryVerbosity","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"values()"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry.TelemetryVerbosity","l":"values()"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"Velocity"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"velocityPIDF"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"verbosity"},{"p":"swervelib.simulation.ctre","c":"VictorSPXSimProfile","l":"VictorSPXSimProfile(VictorSPX)","u":"%3Cinit%3E(com.ctre.phoenix.motorcontrol.can.VictorSPX)"},{"p":"swervelib","c":"SwerveDrive","l":"visionMeasurementStdDevs"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"wheelDiameter"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"wheelDiameter"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"wheelGripCoefficientOfFriction"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"wheelGripCoefficientOfFriction"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"wheelLocations"},{"p":"swervelib","c":"SwerveController","l":"withinHypotDeadband(double, double)","u":"withinHypotDeadband(double,double)"},{"p":"swervelib.parser.json.modules","c":"LocationJson","l":"x"},{"p":"swervelib","c":"SwerveController","l":"xLimiter"},{"p":"swervelib.parser.json.modules","c":"LocationJson","l":"y"},{"p":"swervelib.imu","c":"ADIS16448Swerve","l":"yawOffset"},{"p":"swervelib.imu","c":"ADIS16470Swerve","l":"yawOffset"},{"p":"swervelib.imu","c":"ADXRS450Swerve","l":"yawOffset"},{"p":"swervelib.imu","c":"AnalogGyroSwerve","l":"yawOffset"},{"p":"swervelib.imu","c":"NavXSwerve","l":"yawOffset"},{"p":"swervelib","c":"SwerveController","l":"yLimiter"},{"p":"swervelib","c":"SwerveDrive","l":"zeroGyro()"}];updateSearchResults(); \ No newline at end of file diff --git a/docs/overview-summary.html b/docs/overview-summary.html index 1d0d887..58c5a41 100644 --- a/docs/overview-summary.html +++ b/docs/overview-summary.html @@ -1,11 +1,11 @@ - + Generated Documentation (Untitled) - + diff --git a/docs/overview-tree.html b/docs/overview-tree.html index 1489c98..e6bf647 100644 --- a/docs/overview-tree.html +++ b/docs/overview-tree.html @@ -1,11 +1,11 @@ - + Class Hierarchy - + @@ -131,6 +131,7 @@ loadScripts(document, 'script');
  • swervelib.motors.SwerveMotor diff --git a/docs/swervelib/SwerveController.html b/docs/swervelib/SwerveController.html index 988c236..192eadb 100644 --- a/docs/swervelib/SwerveController.html +++ b/docs/swervelib/SwerveController.html @@ -1,11 +1,11 @@ - + SwerveController - + diff --git a/docs/swervelib/SwerveDrive.html b/docs/swervelib/SwerveDrive.html index 6f2b8c1..3273554 100644 --- a/docs/swervelib/SwerveDrive.html +++ b/docs/swervelib/SwerveDrive.html @@ -1,11 +1,11 @@ - + SwerveDrive - + @@ -121,26 +121,38 @@ loadScripts(document, 'script');
    Simulation of the swerve drive.
    - - +
    edu.wpi.first.math.Matrix<edu.wpi.first.math.numbers.N3,edu.wpi.first.math.numbers.N1>
    +
    +
    Trustworthiness of the internal model of how motors should be moving Measured in expected standard deviation + (meters of position and degrees of rotation)
    +
    + + +
    Swerve controller for controlling heading of the robot.
    - - -
    + + +
    Swerve drive configuration.
    -
    final edu.wpi.first.math.estimator.SwerveDrivePoseEstimator
    - -
    +
    final edu.wpi.first.math.estimator.SwerveDrivePoseEstimator
    + +
    Swerve odometry.
    -
    private final SwerveModule[]
    - -
    +
    private final SwerveModule[]
    + +
    Swerve modules.
    +
    edu.wpi.first.math.Matrix<edu.wpi.first.math.numbers.N3,edu.wpi.first.math.numbers.N1>
    + +
    +
    Trustworthiness of the vision system Measured in expected standard deviation (meters of position and degrees of + rotation)
    +
  • @@ -172,9 +184,10 @@ loadScripts(document, 'script');
    Method
    Description
    void
    -
    addVisionMeasurement(edu.wpi.first.math.geometry.Pose2d robotPose, +
    addVisionMeasurement(edu.wpi.first.math.geometry.Pose2d robotPose, double timestamp, - boolean soft)
    + boolean soft, + double trustWorthiness)
    Add a vision measurement to the SwerveDrivePoseEstimator and update the SwerveIMU gyro reading with the given timestamp of the vision measurement.
    @@ -187,105 +200,114 @@ loadScripts(document, 'script');
    The primary method for controlling the drivebase.
    -
    edu.wpi.first.math.kinematics.ChassisSpeeds
    - +
    void
    +
    drive(edu.wpi.first.math.geometry.Translation2d translation, + double rotation, + boolean fieldRelative, + boolean isOpenLoop, + boolean headingCorrection)
    -
    Gets the current field-relative velocity (x, y and omega) of the robot
    -
    -
    edu.wpi.first.math.geometry.Rotation3d
    - -
    -
    Gets the current gyro Rotation3d of the robot, as reported by the imu.
    -
    -
    edu.wpi.first.math.kinematics.SwerveModulePosition[]
    - -
    -
    Gets the current module positions (azimuth and wheel position (meters))
    -
    -
    edu.wpi.first.math.geometry.Rotation2d
    - -
    -
    Gets the current pitch angle of the robot, as reported by the imu.
    -
    -
    edu.wpi.first.math.geometry.Pose2d
    - -
    -
    Gets the current pose (position and rotation) of the robot, as reported by odometry.
    +
    The primary method for controlling the drivebase.
    edu.wpi.first.math.kinematics.ChassisSpeeds
    - +
    -
    Gets the current robot-relative velocity (x, y and omega) of the robot
    +
    Gets the current field-relative velocity (x, y and omega) of the robot
    +
    +
    edu.wpi.first.math.geometry.Rotation3d
    + +
    +
    Gets the current gyro Rotation3d of the robot, as reported by the imu.
    +
    +
    edu.wpi.first.math.kinematics.SwerveModulePosition[]
    + +
    +
    Gets the current module positions (azimuth and wheel position (meters))
    edu.wpi.first.math.geometry.Rotation2d
    - +
    -
    Gets the current roll angle of the robot, as reported by the imu.
    +
    Gets the current pitch angle of the robot, as reported by the imu.
    - - +
    edu.wpi.first.math.geometry.Pose2d
    +
    -
    Gets the current module states (azimuth and velocity)
    +
    Gets the current pose (position and rotation) of the robot, as reported by odometry.
    -
    edu.wpi.first.math.geometry.Pose2d[]
    -
    getSwerveModulePoses(edu.wpi.first.math.geometry.Pose2d robotPose)
    +
    edu.wpi.first.math.kinematics.ChassisSpeeds
    +
    -
    Get the swerve module poses and on the field relative to the robot.
    +
    Gets the current robot-relative velocity (x, y and omega) of the robot
    edu.wpi.first.math.geometry.Rotation2d
    - +
    +
    Gets the current roll angle of the robot, as reported by the imu.
    +
    + + +
    +
    Gets the current module states (azimuth and velocity)
    +
    +
    edu.wpi.first.math.geometry.Pose2d[]
    +
    getSwerveModulePoses(edu.wpi.first.math.geometry.Pose2d robotPose)
    +
    +
    Get the swerve module poses and on the field relative to the robot.
    +
    +
    edu.wpi.first.math.geometry.Rotation2d
    + +
    Gets the current yaw angle of the robot, as reported by the imu.
    -
    void
    - -
    +
    void
    + +
    Point all modules toward the robot center, thus making the robot very difficult to move.
    -
    void
    -
    postTrajectory(edu.wpi.first.math.trajectory.Trajectory trajectory)
    -
    +
    void
    +
    postTrajectory(edu.wpi.first.math.trajectory.Trajectory trajectory)
    +
    Post the trajectory to the field
    -
    void
    -
    replaceSwerveModuleFeedforward(edu.wpi.first.math.controller.SimpleMotorFeedforward feedforward)
    -
    +
    void
    +
    replaceSwerveModuleFeedforward(edu.wpi.first.math.controller.SimpleMotorFeedforward feedforward)
    +
    Setup the swerve module feedforward.
    -
    void
    -
    resetOdometry(edu.wpi.first.math.geometry.Pose2d pose)
    -
    +
    void
    +
    resetOdometry(edu.wpi.first.math.geometry.Pose2d pose)
    +
    Resets odometry to the given pose.
    -
    void
    -
    setChassisSpeeds(edu.wpi.first.math.kinematics.ChassisSpeeds chassisSpeeds)
    -
    +
    void
    +
    setChassisSpeeds(edu.wpi.first.math.kinematics.ChassisSpeeds chassisSpeeds)
    +
    Set chassis speeds with closed-loop velocity control.
    -
    void
    -
    setModuleStates(SwerveModuleState2[] desiredStates, +
    void
    +
    setModuleStates(SwerveModuleState2[] desiredStates, boolean isOpenLoop)
    -
    +
    Set the module states (azimuth and velocity) directly.
    -
    void
    -
    setMotorIdleMode(boolean brake)
    -
    +
    void
    +
    setMotorIdleMode(boolean brake)
    +
    Sets the drive motors to brake/coast mode.
    -
    void
    - -
    +
    void
    + +
    Synchronize angle motor integrated encoders with data from absolute encoders.
    -
    void
    - -
    +
    void
    + +
    Update odometry should be run every loop.
    -
    void
    - -
    +
    void
    + +
    Resets the gyro angle to zero and resets odometry to the same position, but facing toward 0.
    @@ -348,6 +370,22 @@ loadScripts(document, 'script');
  • +
    +

    stateStdDevs

    +
    public edu.wpi.first.math.Matrix<edu.wpi.first.math.numbers.N3,edu.wpi.first.math.numbers.N1> stateStdDevs
    +
    Trustworthiness of the internal model of how motors should be moving Measured in expected standard deviation + (meters of position and degrees of rotation)
    +
    +
  • +
  • +
    +

    visionMeasurementStdDevs

    +
    public edu.wpi.first.math.Matrix<edu.wpi.first.math.numbers.N3,edu.wpi.first.math.numbers.N1> visionMeasurementStdDevs
    +
    Trustworthiness of the vision system Measured in expected standard deviation (meters of position and degrees of + rotation)
    +
    +
  • +
  • imu

    private SwerveIMU imu
    @@ -418,7 +456,8 @@ loadScripts(document, 'script'); boolean isOpenLoop)
  • The primary method for controlling the drivebase. Takes a Translation2d and a rotation rate, and calculates and commands module states accordingly. Can use either open-loop or closed-loop velocity control for the wheel - velocities. Also has field- and robot-relative modes, which affect how the translation vector is used.
    + velocities. Also has field- and robot-relative modes, which affect how the translation vector is used. This method + defaults to no heading correction.
    Parameters:
    translation - Translation2d that is the commanded linear velocity of the robot, in meters per @@ -434,6 +473,32 @@ loadScripts(document, 'script');
  • +
    +

    drive

    +
    public void drive(edu.wpi.first.math.geometry.Translation2d translation, + double rotation, + boolean fieldRelative, + boolean isOpenLoop, + boolean headingCorrection)
    +
    The primary method for controlling the drivebase. Takes a Translation2d and a rotation rate, and calculates and + commands module states accordingly. Can use either open-loop or closed-loop velocity control for the wheel + velocities. Also has field- and robot-relative modes, which affect how the translation vector is used.
    +
    +
    Parameters:
    +
    translation - Translation2d that is the commanded linear velocity of the robot, in meters per + second. In robot-relative mode, positive x is torwards the bow (front) and positive y is + torwards port (left). In field-relative mode, positive x is away from the alliance wall + (field North) and positive y is torwards the left wall when looking through the driver + station glass (field West).
    +
    rotation - Robot angular rate, in radians per second. CCW positive. Unaffected by field/robot + relativity.
    +
    fieldRelative - Drive mode. True for field-relative, false for robot-relative.
    +
    isOpenLoop - Whether to use closed-loop velocity control. Set to true to disable closed-loop.
    +
    headingCorrection - Whether to correct heading when driving translationally. Set to true to enable.
    +
    +
    +
  • +
  • setModuleStates

    public void setModuleStates(SwerveModuleState2[] desiredStates, @@ -647,22 +712,25 @@ loadScripts(document, 'script');
  • -
    +

    addVisionMeasurement

    public void addVisionMeasurement(edu.wpi.first.math.geometry.Pose2d robotPose, double timestamp, - boolean soft)
    + boolean soft, + double trustWorthiness)
  • Add a vision measurement to the SwerveDrivePoseEstimator and update the SwerveIMU gyro reading with the given timestamp of the vision measurement. THIS WILL BREAK IF UPDATED TOO OFTEN.
    Parameters:
    robotPose - Robot Pose2d as measured by vision.
    timestamp - Timestamp the measurement was taken as time since startup, should be taken from - Timer.getFPGATimestamp() or similar sources.
    + Timer.getFPGATimestamp() or similar sources.
    soft - Add vision estimate using the - SwerveDrivePoseEstimator.addVisionMeasurement(Pose2d, double) function, or hard reset - odometry with the given position with - SwerveDriveOdometry.resetPosition(Rotation2d, SwerveModulePosition[], Pose2d).
    + SwerveDrivePoseEstimator.addVisionMeasurement(Pose2d, double) function, or hard + reset odometry with the given position with + SwerveDriveOdometry.resetPosition(Rotation2d, SwerveModulePosition[], Pose2d). +
    trustWorthiness - Trust level of vision reading when using a soft measurement, used to multiply the standard + deviation. Set to 1 for full trust.
    diff --git a/docs/swervelib/SwerveModule.html b/docs/swervelib/SwerveModule.html index 5cf482a..826d52d 100644 --- a/docs/swervelib/SwerveModule.html +++ b/docs/swervelib/SwerveModule.html @@ -1,11 +1,11 @@ - + SwerveModule - + diff --git a/docs/swervelib/encoders/AnalogAbsoluteEncoderSwerve.html b/docs/swervelib/encoders/AnalogAbsoluteEncoderSwerve.html index 44ddf3b..fe81eb8 100644 --- a/docs/swervelib/encoders/AnalogAbsoluteEncoderSwerve.html +++ b/docs/swervelib/encoders/AnalogAbsoluteEncoderSwerve.html @@ -1,11 +1,11 @@ - + AnalogAbsoluteEncoderSwerve - + diff --git a/docs/swervelib/encoders/CANCoderSwerve.html b/docs/swervelib/encoders/CANCoderSwerve.html index b3e7ef4..30e8185 100644 --- a/docs/swervelib/encoders/CANCoderSwerve.html +++ b/docs/swervelib/encoders/CANCoderSwerve.html @@ -1,11 +1,11 @@ - + CANCoderSwerve - + diff --git a/docs/swervelib/encoders/SparkMaxEncoderSwerve.html b/docs/swervelib/encoders/SparkMaxEncoderSwerve.html index 38b18a0..1ad2c5d 100644 --- a/docs/swervelib/encoders/SparkMaxEncoderSwerve.html +++ b/docs/swervelib/encoders/SparkMaxEncoderSwerve.html @@ -1,11 +1,11 @@ - + SparkMaxEncoderSwerve - + diff --git a/docs/swervelib/encoders/SwerveAbsoluteEncoder.html b/docs/swervelib/encoders/SwerveAbsoluteEncoder.html index d957dc2..f0c5912 100644 --- a/docs/swervelib/encoders/SwerveAbsoluteEncoder.html +++ b/docs/swervelib/encoders/SwerveAbsoluteEncoder.html @@ -1,11 +1,11 @@ - + SwerveAbsoluteEncoder - + diff --git a/docs/swervelib/encoders/package-summary.html b/docs/swervelib/encoders/package-summary.html index 67131a2..275cf4c 100644 --- a/docs/swervelib/encoders/package-summary.html +++ b/docs/swervelib/encoders/package-summary.html @@ -1,11 +1,11 @@ - + swervelib.encoders - + diff --git a/docs/swervelib/encoders/package-tree.html b/docs/swervelib/encoders/package-tree.html index 8ed3c95..8c15a80 100644 --- a/docs/swervelib/encoders/package-tree.html +++ b/docs/swervelib/encoders/package-tree.html @@ -1,11 +1,11 @@ - + swervelib.encoders Class Hierarchy - + diff --git a/docs/swervelib/imu/ADIS16448Swerve.html b/docs/swervelib/imu/ADIS16448Swerve.html index 0708e15..933fa3f 100644 --- a/docs/swervelib/imu/ADIS16448Swerve.html +++ b/docs/swervelib/imu/ADIS16448Swerve.html @@ -1,11 +1,11 @@ - + ADIS16448Swerve - + diff --git a/docs/swervelib/imu/ADIS16470Swerve.html b/docs/swervelib/imu/ADIS16470Swerve.html index 6e75556..9f456f2 100644 --- a/docs/swervelib/imu/ADIS16470Swerve.html +++ b/docs/swervelib/imu/ADIS16470Swerve.html @@ -1,11 +1,11 @@ - + ADIS16470Swerve - + diff --git a/docs/swervelib/imu/ADXRS450Swerve.html b/docs/swervelib/imu/ADXRS450Swerve.html index 9d9e101..570f388 100644 --- a/docs/swervelib/imu/ADXRS450Swerve.html +++ b/docs/swervelib/imu/ADXRS450Swerve.html @@ -1,11 +1,11 @@ - + ADXRS450Swerve - + diff --git a/docs/swervelib/imu/AnalogGyroSwerve.html b/docs/swervelib/imu/AnalogGyroSwerve.html index f5b7016..2ae82de 100644 --- a/docs/swervelib/imu/AnalogGyroSwerve.html +++ b/docs/swervelib/imu/AnalogGyroSwerve.html @@ -1,11 +1,11 @@ - + AnalogGyroSwerve - + diff --git a/docs/swervelib/imu/NavXSwerve.html b/docs/swervelib/imu/NavXSwerve.html index 8a0be9b..862344b 100644 --- a/docs/swervelib/imu/NavXSwerve.html +++ b/docs/swervelib/imu/NavXSwerve.html @@ -1,11 +1,11 @@ - + NavXSwerve - + diff --git a/docs/swervelib/imu/Pigeon2Swerve.html b/docs/swervelib/imu/Pigeon2Swerve.html index 01e842c..56b10a1 100644 --- a/docs/swervelib/imu/Pigeon2Swerve.html +++ b/docs/swervelib/imu/Pigeon2Swerve.html @@ -1,11 +1,11 @@ - + Pigeon2Swerve - + diff --git a/docs/swervelib/imu/PigeonSwerve.html b/docs/swervelib/imu/PigeonSwerve.html index cd9ee2d..fb4816f 100644 --- a/docs/swervelib/imu/PigeonSwerve.html +++ b/docs/swervelib/imu/PigeonSwerve.html @@ -1,11 +1,11 @@ - + PigeonSwerve - + diff --git a/docs/swervelib/imu/SwerveIMU.html b/docs/swervelib/imu/SwerveIMU.html index 6012b09..8f56a4d 100644 --- a/docs/swervelib/imu/SwerveIMU.html +++ b/docs/swervelib/imu/SwerveIMU.html @@ -1,11 +1,11 @@ - + SwerveIMU - + diff --git a/docs/swervelib/imu/package-summary.html b/docs/swervelib/imu/package-summary.html index bdab961..29f09fe 100644 --- a/docs/swervelib/imu/package-summary.html +++ b/docs/swervelib/imu/package-summary.html @@ -1,11 +1,11 @@ - + swervelib.imu - + diff --git a/docs/swervelib/imu/package-tree.html b/docs/swervelib/imu/package-tree.html index 29d1805..b815509 100644 --- a/docs/swervelib/imu/package-tree.html +++ b/docs/swervelib/imu/package-tree.html @@ -1,11 +1,11 @@ - + swervelib.imu Class Hierarchy - + diff --git a/docs/swervelib/math/SwerveKinematics2.html b/docs/swervelib/math/SwerveKinematics2.html index afc35dc..7a106c8 100644 --- a/docs/swervelib/math/SwerveKinematics2.html +++ b/docs/swervelib/math/SwerveKinematics2.html @@ -1,11 +1,11 @@ - + SwerveKinematics2 - + diff --git a/docs/swervelib/math/SwerveMath.html b/docs/swervelib/math/SwerveMath.html index b568521..2464595 100644 --- a/docs/swervelib/math/SwerveMath.html +++ b/docs/swervelib/math/SwerveMath.html @@ -1,11 +1,11 @@ - + SwerveMath - + diff --git a/docs/swervelib/math/SwerveModuleState2.html b/docs/swervelib/math/SwerveModuleState2.html index bc1d700..f61ece7 100644 --- a/docs/swervelib/math/SwerveModuleState2.html +++ b/docs/swervelib/math/SwerveModuleState2.html @@ -1,11 +1,11 @@ - + SwerveModuleState2 - + diff --git a/docs/swervelib/math/package-summary.html b/docs/swervelib/math/package-summary.html index 4b78625..1671076 100644 --- a/docs/swervelib/math/package-summary.html +++ b/docs/swervelib/math/package-summary.html @@ -1,11 +1,11 @@ - + swervelib.math - + diff --git a/docs/swervelib/math/package-tree.html b/docs/swervelib/math/package-tree.html index 97ccd05..f9e4034 100644 --- a/docs/swervelib/math/package-tree.html +++ b/docs/swervelib/math/package-tree.html @@ -1,11 +1,11 @@ - + swervelib.math Class Hierarchy - + diff --git a/docs/swervelib/motors/SparkMaxBrushedMotorSwerve.html b/docs/swervelib/motors/SparkMaxBrushedMotorSwerve.html new file mode 100644 index 0000000..b664c2b --- /dev/null +++ b/docs/swervelib/motors/SparkMaxBrushedMotorSwerve.html @@ -0,0 +1,655 @@ + + + + +SparkMaxBrushedMotorSwerve + + + + + + + + + + + + + + + +
    + +
    +
    + +
    + +

    Class SparkMaxBrushedMotorSwerve

    +
    +
    java.lang.Object +
    swervelib.motors.SwerveMotor +
    swervelib.motors.SparkMaxBrushedMotorSwerve
    +
    +
    +
    +
    +
    public class SparkMaxBrushedMotorSwerve +extends SwerveMotor
    +
    Brushed motor control with SparkMax.
    +
    +
    +
      + +
    • +
      +

      Field Summary

      +
      Fields
      +
      +
      Modifier and Type
      +
      Field
      +
      Description
      +
      com.revrobotics.AbsoluteEncoder
      + +
      +
      Absolute encoder attached to the SparkMax (if exists)
      +
      +
      com.revrobotics.RelativeEncoder
      + +
      +
      Integrated encoder.
      +
      +
      private boolean
      + +
      +
      Factory default already occurred.
      +
      +
      com.revrobotics.CANSparkMax
      + +
      +
      SparkMAX Instance.
      +
      +
      com.revrobotics.SparkMaxPIDController
      + +
      +
      Closed-loop PID controller.
      +
      +
      +
      +

      Fields inherited from class swervelib.motors.SwerveMotor

      +isDriveMotor
      +
      +
    • + +
    • +
      +

      Constructor Summary

      +
      Constructors
      +
      +
      Constructor
      +
      Description
      +
      SparkMaxBrushedMotorSwerve(int id, + boolean isDriveMotor, + com.revrobotics.SparkMaxRelativeEncoder.Type encoderType, + int countsPerRevolution, + boolean useDataPortQuadEncoder)
      +
      +
      Initialize the SwerveMotor as a CANSparkMax connected to a Brushless Motor.
      +
      +
      SparkMaxBrushedMotorSwerve(com.revrobotics.CANSparkMax motor, + boolean isDriveMotor, + com.revrobotics.SparkMaxRelativeEncoder.Type encoderType, + int countsPerRevolution, + boolean useDataPortQuadEncoder)
      +
      +
      Initialize the swerve motor.
      +
      +
      +
      +
    • + +
    • +
      +

      Method Summary

      +
      +
      +
      +
      +
      Modifier and Type
      +
      Method
      +
      Description
      +
      void
      + +
      +
      Save the configurations from flash to EEPROM.
      +
      +
      void
      + +
      +
      Clear the sticky faults on the motor controller.
      +
      +
      void
      +
      configureCANStatusFrames(int CANStatus0, + int CANStatus1, + int CANStatus2, + int CANStatus3, + int CANStatus4)
      +
      +
      Set the CAN status frames.
      +
      +
      void
      +
      configureIntegratedEncoder(double positionConversionFactor)
      +
      +
      Configure the integrated encoder for the swerve module.
      +
      +
      void
      + +
      +
      Configure the PIDF values for the closed loop controller.
      +
      +
      void
      +
      configurePIDWrapping(double minInput, + double maxInput)
      +
      +
      Configure the PID wrapping for the position closed loop controller.
      +
      +
      void
      + +
      +
      Configure the factory defaults.
      +
      + + +
      +
      Get the motor object from the module.
      +
      +
      double
      + +
      +
      Get the position of the integrated encoder.
      +
      +
      double
      + +
      +
      Get the velocity of the integrated encoder.
      +
      +
      boolean
      + +
      +
      Queries whether the absolute encoder is directly attached to the motor controller.
      +
      +
      void
      +
      set(double percentOutput)
      +
      +
      Set the percentage output.
      +
      + + +
      +
      Set the absolute encoder to be a compatible absolute encoder.
      +
      +
      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.
      +
      +
      void
      +
      setInverted(boolean inverted)
      +
      +
      Set the motor to be inverted.
      +
      +
      void
      +
      setLoopRampRate(double rampRate)
      +
      +
      Set the maximum rate the open/closed loop output can change by.
      +
      +
      void
      +
      setMotorBrake(boolean isBrakeMode)
      +
      +
      Set the idle mode.
      +
      +
      void
      +
      setPosition(double position)
      +
      +
      Set the integrated encoder position.
      +
      +
      void
      +
      setReference(double setpoint, + double feedforward)
      +
      +
      Set the closed loop PID controller reference point.
      +
      +
      void
      +
      setVoltageCompensation(double nominalVoltage)
      +
      +
      Set the voltage compensation for the swerve module motor.
      +
      +
      +
      +
      +
      +

      Methods inherited from class java.lang.Object

      +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      +
      +
    • +
    +
    +
    +
      + +
    • +
      +

      Field Details

      +
        +
      • +
        +

        motor

        +
        public com.revrobotics.CANSparkMax motor
        +
        SparkMAX Instance.
        +
        +
      • +
      • +
        +

        absoluteEncoder

        +
        public com.revrobotics.AbsoluteEncoder absoluteEncoder
        +
        Absolute encoder attached to the SparkMax (if exists)
        +
        +
      • +
      • +
        +

        encoder

        +
        public com.revrobotics.RelativeEncoder encoder
        +
        Integrated encoder.
        +
        +
      • +
      • +
        +

        pid

        +
        public com.revrobotics.SparkMaxPIDController pid
        +
        Closed-loop PID controller.
        +
        +
      • +
      • +
        +

        factoryDefaultOccurred

        +
        private boolean factoryDefaultOccurred
        +
        Factory default already occurred.
        +
        +
      • +
      +
      +
    • + +
    • +
      +

      Constructor Details

      +
        +
      • +
        +

        SparkMaxBrushedMotorSwerve

        +
        public SparkMaxBrushedMotorSwerve(com.revrobotics.CANSparkMax motor, + boolean isDriveMotor, + com.revrobotics.SparkMaxRelativeEncoder.Type encoderType, + int countsPerRevolution, + boolean useDataPortQuadEncoder)
        +
        Initialize the swerve motor.
        +
        +
        Parameters:
        +
        motor - The SwerveMotor as a SparkMax object.
        +
        isDriveMotor - Is the motor being initialized a drive motor?
        +
        encoderType - SparkMaxRelativeEncoder.Type of encoder to use for the CANSparkMax device.
        +
        countsPerRevolution - The number of encoder pulses for the SparkMaxRelativeEncoder.Type encoder per revolution.
        +
        useDataPortQuadEncoder - Use the encoder attached to the data port of the spark max for a quadrature encoder.
        +
        +
        +
      • +
      • +
        +

        SparkMaxBrushedMotorSwerve

        +
        public SparkMaxBrushedMotorSwerve(int id, + boolean isDriveMotor, + com.revrobotics.SparkMaxRelativeEncoder.Type encoderType, + int countsPerRevolution, + boolean useDataPortQuadEncoder)
        +
        Initialize the SwerveMotor as a CANSparkMax connected to a Brushless Motor.
        +
        +
        Parameters:
        +
        id - CAN ID of the SparkMax.
        +
        isDriveMotor - Is the motor being initialized a drive motor?
        +
        encoderType - SparkMaxRelativeEncoder.Type of encoder to use for the CANSparkMax device.
        +
        countsPerRevolution - The number of encoder pulses for the SparkMaxRelativeEncoder.Type encoder per revolution.
        +
        useDataPortQuadEncoder - Use the encoder attached to the data port of the spark max for a quadrature encoder.
        +
        +
        +
      • +
      +
      +
    • + +
    • +
      +

      Method Details

      +
        +
      • +
        +

        setVoltageCompensation

        +
        public void setVoltageCompensation(double nominalVoltage)
        +
        Set the voltage compensation for the swerve module motor.
        +
        +
        Specified by:
        +
        setVoltageCompensation in class SwerveMotor
        +
        Parameters:
        +
        nominalVoltage - Nominal voltage for operation to output to.
        +
        +
        +
      • +
      • +
        +

        setCurrentLimit

        +
        public 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.
        +
        +
        Specified by:
        +
        setCurrentLimit in class SwerveMotor
        +
        Parameters:
        +
        currentLimit - Current limit in AMPS at free speed.
        +
        +
        +
      • +
      • +
        +

        setLoopRampRate

        +
        public void setLoopRampRate(double rampRate)
        +
        Set the maximum rate the open/closed loop output can change by.
        +
        +
        Specified by:
        +
        setLoopRampRate in class SwerveMotor
        +
        Parameters:
        +
        rampRate - Time in seconds to go from 0 to full throttle.
        +
        +
        +
      • +
      • +
        +

        getMotor

        +
        public Object getMotor()
        +
        Get the motor object from the module.
        +
        +
        Specified by:
        +
        getMotor in class SwerveMotor
        +
        Returns:
        +
        Motor object.
        +
        +
        +
      • +
      • +
        +

        isAttachedAbsoluteEncoder

        +
        public boolean isAttachedAbsoluteEncoder()
        +
        Queries whether the absolute encoder is directly attached to the motor controller.
        +
        +
        Specified by:
        +
        isAttachedAbsoluteEncoder in class SwerveMotor
        +
        Returns:
        +
        connected absolute encoder state.
        +
        +
        +
      • +
      • +
        +

        factoryDefaults

        +
        public void factoryDefaults()
        +
        Configure the factory defaults.
        +
        +
        Specified by:
        +
        factoryDefaults in class SwerveMotor
        +
        +
        +
      • +
      • +
        +

        clearStickyFaults

        +
        public void clearStickyFaults()
        +
        Clear the sticky faults on the motor controller.
        +
        +
        Specified by:
        +
        clearStickyFaults in class SwerveMotor
        +
        +
        +
      • +
      • +
        +

        setAbsoluteEncoder

        +
        public SwerveMotor setAbsoluteEncoder(SwerveAbsoluteEncoder encoder)
        +
        Set the absolute encoder to be a compatible absolute encoder.
        +
        +
        Specified by:
        +
        setAbsoluteEncoder in class SwerveMotor
        +
        Parameters:
        +
        encoder - The encoder to use.
        +
        Returns:
        +
        The SwerveMotor for easy instantiation.
        +
        +
        +
      • +
      • +
        +

        configureIntegratedEncoder

        +
        public void configureIntegratedEncoder(double positionConversionFactor)
        +
        Configure the integrated encoder for the swerve module. Sets the conversion factors for position and velocity.
        +
        +
        Specified by:
        +
        configureIntegratedEncoder in class SwerveMotor
        +
        Parameters:
        +
        positionConversionFactor - The conversion factor to apply.
        +
        +
        +
      • +
      • +
        +

        configurePIDF

        +
        public void configurePIDF(PIDFConfig config)
        +
        Configure the PIDF values for the closed loop controller.
        +
        +
        Specified by:
        +
        configurePIDF in class SwerveMotor
        +
        Parameters:
        +
        config - Configuration class holding the PIDF values.
        +
        +
        +
      • +
      • +
        +

        configurePIDWrapping

        +
        public void configurePIDWrapping(double minInput, + double maxInput)
        +
        Configure the PID wrapping for the position closed loop controller.
        +
        +
        Specified by:
        +
        configurePIDWrapping in class SwerveMotor
        +
        Parameters:
        +
        minInput - Minimum PID input.
        +
        maxInput - Maximum PID input.
        +
        +
        +
      • +
      • +
        +

        configureCANStatusFrames

        +
        public void configureCANStatusFrames(int CANStatus0, + int CANStatus1, + int CANStatus2, + int CANStatus3, + int CANStatus4)
        +
        Set the CAN status frames.
        +
        +
        Parameters:
        +
        CANStatus0 - Applied Output, Faults, Sticky Faults, Is Follower
        +
        CANStatus1 - Motor Velocity, Motor Temperature, Motor Voltage, Motor Current
        +
        CANStatus2 - Motor Position
        +
        CANStatus3 - Analog Sensor Voltage, Analog Sensor Velocity, Analog Sensor Position
        +
        CANStatus4 - Alternate Encoder Velocity, Alternate Encoder Position
        +
        +
        +
      • +
      • +
        +

        setMotorBrake

        +
        public void setMotorBrake(boolean isBrakeMode)
        +
        Set the idle mode.
        +
        +
        Specified by:
        +
        setMotorBrake in class SwerveMotor
        +
        Parameters:
        +
        isBrakeMode - Set the brake mode.
        +
        +
        +
      • +
      • +
        +

        setInverted

        +
        public void setInverted(boolean inverted)
        +
        Set the motor to be inverted.
        +
        +
        Specified by:
        +
        setInverted in class SwerveMotor
        +
        Parameters:
        +
        inverted - State of inversion.
        +
        +
        +
      • +
      • +
        +

        burnFlash

        +
        public void burnFlash()
        +
        Save the configurations from flash to EEPROM.
        +
        +
        Specified by:
        +
        burnFlash in class SwerveMotor
        +
        +
        +
      • +
      • +
        +

        set

        +
        public void set(double percentOutput)
        +
        Set the percentage output.
        +
        +
        Specified by:
        +
        set in class SwerveMotor
        +
        Parameters:
        +
        percentOutput - percent out for the motor controller.
        +
        +
        +
      • +
      • +
        +

        setReference

        +
        public void setReference(double setpoint, + double feedforward)
        +
        Set the closed loop PID controller reference point.
        +
        +
        Specified by:
        +
        setReference in class SwerveMotor
        +
        Parameters:
        +
        setpoint - Setpoint in MPS or Angle in degrees.
        +
        feedforward - Feedforward in volt-meter-per-second or kV.
        +
        +
        +
      • +
      • +
        +

        getVelocity

        +
        public double getVelocity()
        +
        Get the velocity of the integrated encoder.
        +
        +
        Specified by:
        +
        getVelocity in class SwerveMotor
        +
        Returns:
        +
        velocity
        +
        +
        +
      • +
      • +
        +

        getPosition

        +
        public double getPosition()
        +
        Get the position of the integrated encoder.
        +
        +
        Specified by:
        +
        getPosition in class SwerveMotor
        +
        Returns:
        +
        Position
        +
        +
        +
      • +
      • +
        +

        setPosition

        +
        public void setPosition(double position)
        +
        Set the integrated encoder position.
        +
        +
        Specified by:
        +
        setPosition in class SwerveMotor
        +
        Parameters:
        +
        position - Integrated encoder position.
        +
        +
        +
      • +
      +
      +
    • +
    +
    + +
    +
    +
    + + diff --git a/docs/swervelib/motors/SparkMaxSwerve.SparkMAX_slotIdx.html b/docs/swervelib/motors/SparkMaxSwerve.SparkMAX_slotIdx.html index 33f0d71..10d5ac4 100644 --- a/docs/swervelib/motors/SparkMaxSwerve.SparkMAX_slotIdx.html +++ b/docs/swervelib/motors/SparkMaxSwerve.SparkMAX_slotIdx.html @@ -1,11 +1,11 @@ - + SparkMaxSwerve.SparkMAX_slotIdx - + diff --git a/docs/swervelib/motors/SparkMaxSwerve.html b/docs/swervelib/motors/SparkMaxSwerve.html index eeb3e67..9171cd3 100644 --- a/docs/swervelib/motors/SparkMaxSwerve.html +++ b/docs/swervelib/motors/SparkMaxSwerve.html @@ -1,11 +1,11 @@ - + SparkMaxSwerve - + diff --git a/docs/swervelib/motors/SwerveMotor.html b/docs/swervelib/motors/SwerveMotor.html index 46b42ca..07a4e57 100644 --- a/docs/swervelib/motors/SwerveMotor.html +++ b/docs/swervelib/motors/SwerveMotor.html @@ -1,11 +1,11 @@ - + SwerveMotor - + @@ -77,7 +77,7 @@ loadScripts(document, 'script');
    Direct Known Subclasses:
    -
    SparkMaxSwerve, TalonFXSwerve, TalonSRXSwerve
    +
    SparkMaxBrushedMotorSwerve, SparkMaxSwerve, TalonFXSwerve, TalonSRXSwerve

    public abstract class SwerveMotor diff --git a/docs/swervelib/motors/TalonFXSwerve.html b/docs/swervelib/motors/TalonFXSwerve.html index 9b2bd00..a52e947 100644 --- a/docs/swervelib/motors/TalonFXSwerve.html +++ b/docs/swervelib/motors/TalonFXSwerve.html @@ -1,11 +1,11 @@ - + TalonFXSwerve - + diff --git a/docs/swervelib/motors/TalonSRXSwerve.html b/docs/swervelib/motors/TalonSRXSwerve.html index 27f8c40..78daf27 100644 --- a/docs/swervelib/motors/TalonSRXSwerve.html +++ b/docs/swervelib/motors/TalonSRXSwerve.html @@ -1,11 +1,11 @@ - + TalonSRXSwerve - + diff --git a/docs/swervelib/motors/package-summary.html b/docs/swervelib/motors/package-summary.html index ebfbd25..454cd59 100644 --- a/docs/swervelib/motors/package-summary.html +++ b/docs/swervelib/motors/package-summary.html @@ -1,11 +1,11 @@ - + swervelib.motors - + @@ -89,24 +89,28 @@ loadScripts(document, 'script');
    Class
    Description
    - +
    +
    Brushed motor control with SparkMax.
    +
    + +
    An implementation of CANSparkMax as a SwerveMotor.
    - -
    + +
    REV Slots for PID configuration.
    - -
    + +
    Swerve motor abstraction which defines a standard interface for motors within a swerve module.
    - -
    + +
    TalonFX Swerve Motor.
    - -
    + +
    WPI_TalonSRX Swerve Motor.
    diff --git a/docs/swervelib/motors/package-tree.html b/docs/swervelib/motors/package-tree.html index 464acb2..ed8059d 100644 --- a/docs/swervelib/motors/package-tree.html +++ b/docs/swervelib/motors/package-tree.html @@ -1,11 +1,11 @@ - + swervelib.motors Class Hierarchy - + @@ -61,6 +61,7 @@ loadScripts(document, 'script');
    • swervelib.motors.SwerveMotor
        +
      • swervelib.motors.SparkMaxBrushedMotorSwerve
      • swervelib.motors.SparkMaxSwerve
      • swervelib.motors.TalonFXSwerve
      • swervelib.motors.TalonSRXSwerve
      • diff --git a/docs/swervelib/package-summary.html b/docs/swervelib/package-summary.html index 4d146af..deaa986 100644 --- a/docs/swervelib/package-summary.html +++ b/docs/swervelib/package-summary.html @@ -1,11 +1,11 @@ - + swervelib - + diff --git a/docs/swervelib/package-tree.html b/docs/swervelib/package-tree.html index 58119bf..cd9b3ec 100644 --- a/docs/swervelib/package-tree.html +++ b/docs/swervelib/package-tree.html @@ -1,11 +1,11 @@ - + swervelib Class Hierarchy - + diff --git a/docs/swervelib/parser/PIDFConfig.html b/docs/swervelib/parser/PIDFConfig.html index 3ab11b4..66dabb0 100644 --- a/docs/swervelib/parser/PIDFConfig.html +++ b/docs/swervelib/parser/PIDFConfig.html @@ -1,11 +1,11 @@ - + PIDFConfig - + diff --git a/docs/swervelib/parser/SwerveControllerConfiguration.html b/docs/swervelib/parser/SwerveControllerConfiguration.html index ff25923..3b44d17 100644 --- a/docs/swervelib/parser/SwerveControllerConfiguration.html +++ b/docs/swervelib/parser/SwerveControllerConfiguration.html @@ -1,11 +1,11 @@ - + SwerveControllerConfiguration - + diff --git a/docs/swervelib/parser/SwerveDriveConfiguration.html b/docs/swervelib/parser/SwerveDriveConfiguration.html index 1458cd3..019cbb7 100644 --- a/docs/swervelib/parser/SwerveDriveConfiguration.html +++ b/docs/swervelib/parser/SwerveDriveConfiguration.html @@ -1,11 +1,11 @@ - + SwerveDriveConfiguration - + diff --git a/docs/swervelib/parser/SwerveModuleConfiguration.html b/docs/swervelib/parser/SwerveModuleConfiguration.html index 07b737d..ee7870e 100644 --- a/docs/swervelib/parser/SwerveModuleConfiguration.html +++ b/docs/swervelib/parser/SwerveModuleConfiguration.html @@ -1,11 +1,11 @@ - + SwerveModuleConfiguration - + diff --git a/docs/swervelib/parser/SwerveModulePhysicalCharacteristics.html b/docs/swervelib/parser/SwerveModulePhysicalCharacteristics.html index 13140ac..42b0092 100644 --- a/docs/swervelib/parser/SwerveModulePhysicalCharacteristics.html +++ b/docs/swervelib/parser/SwerveModulePhysicalCharacteristics.html @@ -1,11 +1,11 @@ - + SwerveModulePhysicalCharacteristics - + diff --git a/docs/swervelib/parser/SwerveParser.html b/docs/swervelib/parser/SwerveParser.html index 3f931d8..19f3d4f 100644 --- a/docs/swervelib/parser/SwerveParser.html +++ b/docs/swervelib/parser/SwerveParser.html @@ -1,11 +1,11 @@ - + SwerveParser - + diff --git a/docs/swervelib/parser/deserializer/PIDFRange.html b/docs/swervelib/parser/deserializer/PIDFRange.html index eb5e389..2871daf 100644 --- a/docs/swervelib/parser/deserializer/PIDFRange.html +++ b/docs/swervelib/parser/deserializer/PIDFRange.html @@ -1,11 +1,11 @@ - + PIDFRange - + diff --git a/docs/swervelib/parser/deserializer/package-summary.html b/docs/swervelib/parser/deserializer/package-summary.html index b5f8028..42e54c6 100644 --- a/docs/swervelib/parser/deserializer/package-summary.html +++ b/docs/swervelib/parser/deserializer/package-summary.html @@ -1,11 +1,11 @@ - + swervelib.parser.deserializer - + diff --git a/docs/swervelib/parser/deserializer/package-tree.html b/docs/swervelib/parser/deserializer/package-tree.html index 8b9491d..522d469 100644 --- a/docs/swervelib/parser/deserializer/package-tree.html +++ b/docs/swervelib/parser/deserializer/package-tree.html @@ -1,11 +1,11 @@ - + swervelib.parser.deserializer Class Hierarchy - + diff --git a/docs/swervelib/parser/json/ControllerPropertiesJson.html b/docs/swervelib/parser/json/ControllerPropertiesJson.html index 0989709..07c6ff6 100644 --- a/docs/swervelib/parser/json/ControllerPropertiesJson.html +++ b/docs/swervelib/parser/json/ControllerPropertiesJson.html @@ -1,11 +1,11 @@ - + ControllerPropertiesJson - + diff --git a/docs/swervelib/parser/json/DeviceJson.html b/docs/swervelib/parser/json/DeviceJson.html index 52148f9..841791b 100644 --- a/docs/swervelib/parser/json/DeviceJson.html +++ b/docs/swervelib/parser/json/DeviceJson.html @@ -1,11 +1,11 @@ - + DeviceJson - + diff --git a/docs/swervelib/parser/json/ModuleJson.html b/docs/swervelib/parser/json/ModuleJson.html index 1a48e41..6eb91b4 100644 --- a/docs/swervelib/parser/json/ModuleJson.html +++ b/docs/swervelib/parser/json/ModuleJson.html @@ -1,11 +1,11 @@ - + ModuleJson - + diff --git a/docs/swervelib/parser/json/MotorConfigDouble.html b/docs/swervelib/parser/json/MotorConfigDouble.html index 7064e62..5e8e742 100644 --- a/docs/swervelib/parser/json/MotorConfigDouble.html +++ b/docs/swervelib/parser/json/MotorConfigDouble.html @@ -1,11 +1,11 @@ - + MotorConfigDouble - + diff --git a/docs/swervelib/parser/json/MotorConfigInt.html b/docs/swervelib/parser/json/MotorConfigInt.html index 8188ba3..5550362 100644 --- a/docs/swervelib/parser/json/MotorConfigInt.html +++ b/docs/swervelib/parser/json/MotorConfigInt.html @@ -1,11 +1,11 @@ - + MotorConfigInt - + diff --git a/docs/swervelib/parser/json/PIDFPropertiesJson.html b/docs/swervelib/parser/json/PIDFPropertiesJson.html index 0bd1c29..c35ec3e 100644 --- a/docs/swervelib/parser/json/PIDFPropertiesJson.html +++ b/docs/swervelib/parser/json/PIDFPropertiesJson.html @@ -1,11 +1,11 @@ - + PIDFPropertiesJson - + diff --git a/docs/swervelib/parser/json/PhysicalPropertiesJson.html b/docs/swervelib/parser/json/PhysicalPropertiesJson.html index 22fa44d..3d1871e 100644 --- a/docs/swervelib/parser/json/PhysicalPropertiesJson.html +++ b/docs/swervelib/parser/json/PhysicalPropertiesJson.html @@ -1,11 +1,11 @@ - + PhysicalPropertiesJson - + diff --git a/docs/swervelib/parser/json/SwerveDriveJson.html b/docs/swervelib/parser/json/SwerveDriveJson.html index c65577c..5bc9f71 100644 --- a/docs/swervelib/parser/json/SwerveDriveJson.html +++ b/docs/swervelib/parser/json/SwerveDriveJson.html @@ -1,11 +1,11 @@ - + SwerveDriveJson - + diff --git a/docs/swervelib/parser/json/modules/BoolMotorJson.html b/docs/swervelib/parser/json/modules/BoolMotorJson.html index 1922547..5a1f189 100644 --- a/docs/swervelib/parser/json/modules/BoolMotorJson.html +++ b/docs/swervelib/parser/json/modules/BoolMotorJson.html @@ -1,11 +1,11 @@ - + BoolMotorJson - + diff --git a/docs/swervelib/parser/json/modules/LocationJson.html b/docs/swervelib/parser/json/modules/LocationJson.html index f773727..6403f88 100644 --- a/docs/swervelib/parser/json/modules/LocationJson.html +++ b/docs/swervelib/parser/json/modules/LocationJson.html @@ -1,11 +1,11 @@ - + LocationJson - + diff --git a/docs/swervelib/parser/json/modules/package-summary.html b/docs/swervelib/parser/json/modules/package-summary.html index 48ea373..c8eadef 100644 --- a/docs/swervelib/parser/json/modules/package-summary.html +++ b/docs/swervelib/parser/json/modules/package-summary.html @@ -1,11 +1,11 @@ - + swervelib.parser.json.modules - + diff --git a/docs/swervelib/parser/json/modules/package-tree.html b/docs/swervelib/parser/json/modules/package-tree.html index 833f0b5..3fed1a2 100644 --- a/docs/swervelib/parser/json/modules/package-tree.html +++ b/docs/swervelib/parser/json/modules/package-tree.html @@ -1,11 +1,11 @@ - + swervelib.parser.json.modules Class Hierarchy - + diff --git a/docs/swervelib/parser/json/package-summary.html b/docs/swervelib/parser/json/package-summary.html index 7fb1cf1..eac4f6a 100644 --- a/docs/swervelib/parser/json/package-summary.html +++ b/docs/swervelib/parser/json/package-summary.html @@ -1,11 +1,11 @@ - + swervelib.parser.json - + diff --git a/docs/swervelib/parser/json/package-tree.html b/docs/swervelib/parser/json/package-tree.html index 7b54161..35fa5dc 100644 --- a/docs/swervelib/parser/json/package-tree.html +++ b/docs/swervelib/parser/json/package-tree.html @@ -1,11 +1,11 @@ - + swervelib.parser.json Class Hierarchy - + diff --git a/docs/swervelib/parser/package-summary.html b/docs/swervelib/parser/package-summary.html index 0749632..f78c2a0 100644 --- a/docs/swervelib/parser/package-summary.html +++ b/docs/swervelib/parser/package-summary.html @@ -1,11 +1,11 @@ - + swervelib.parser - + diff --git a/docs/swervelib/parser/package-tree.html b/docs/swervelib/parser/package-tree.html index ad4442e..b322a77 100644 --- a/docs/swervelib/parser/package-tree.html +++ b/docs/swervelib/parser/package-tree.html @@ -1,11 +1,11 @@ - + swervelib.parser Class Hierarchy - + diff --git a/docs/swervelib/simulation/SwerveIMUSimulation.html b/docs/swervelib/simulation/SwerveIMUSimulation.html index 058149f..995dfa9 100644 --- a/docs/swervelib/simulation/SwerveIMUSimulation.html +++ b/docs/swervelib/simulation/SwerveIMUSimulation.html @@ -1,11 +1,11 @@ - + SwerveIMUSimulation - + diff --git a/docs/swervelib/simulation/SwerveModuleSimulation.html b/docs/swervelib/simulation/SwerveModuleSimulation.html index 5051d5e..ab4bce0 100644 --- a/docs/swervelib/simulation/SwerveModuleSimulation.html +++ b/docs/swervelib/simulation/SwerveModuleSimulation.html @@ -1,11 +1,11 @@ - + SwerveModuleSimulation - + diff --git a/docs/swervelib/simulation/ctre/PhysicsSim.SimProfile.html b/docs/swervelib/simulation/ctre/PhysicsSim.SimProfile.html index 2f9a49f..b7312ff 100644 --- a/docs/swervelib/simulation/ctre/PhysicsSim.SimProfile.html +++ b/docs/swervelib/simulation/ctre/PhysicsSim.SimProfile.html @@ -1,11 +1,11 @@ - + PhysicsSim.SimProfile - + diff --git a/docs/swervelib/simulation/ctre/PhysicsSim.html b/docs/swervelib/simulation/ctre/PhysicsSim.html index 170ba7b..4e72d69 100644 --- a/docs/swervelib/simulation/ctre/PhysicsSim.html +++ b/docs/swervelib/simulation/ctre/PhysicsSim.html @@ -1,11 +1,11 @@ - + PhysicsSim - + @@ -111,7 +111,7 @@ loadScripts(document, 'script');
         
        -
        private static final PhysicsSim
        +
        private static PhysicsSim
         
    @@ -213,7 +213,7 @@ loadScripts(document, 'script');
  • sim

    -
    private static final PhysicsSim sim
    +
    private static PhysicsSim sim
  • diff --git a/docs/swervelib/simulation/ctre/TalonFXSimProfile.html b/docs/swervelib/simulation/ctre/TalonFXSimProfile.html index ded1a1b..d312ad9 100644 --- a/docs/swervelib/simulation/ctre/TalonFXSimProfile.html +++ b/docs/swervelib/simulation/ctre/TalonFXSimProfile.html @@ -1,11 +1,11 @@ - + TalonFXSimProfile - + diff --git a/docs/swervelib/simulation/ctre/TalonSRXSimProfile.html b/docs/swervelib/simulation/ctre/TalonSRXSimProfile.html index 983f468..9037889 100644 --- a/docs/swervelib/simulation/ctre/TalonSRXSimProfile.html +++ b/docs/swervelib/simulation/ctre/TalonSRXSimProfile.html @@ -1,11 +1,11 @@ - + TalonSRXSimProfile - + diff --git a/docs/swervelib/simulation/ctre/VictorSPXSimProfile.html b/docs/swervelib/simulation/ctre/VictorSPXSimProfile.html index a60e948..f4814c5 100644 --- a/docs/swervelib/simulation/ctre/VictorSPXSimProfile.html +++ b/docs/swervelib/simulation/ctre/VictorSPXSimProfile.html @@ -1,11 +1,11 @@ - + VictorSPXSimProfile - + diff --git a/docs/swervelib/simulation/ctre/package-summary.html b/docs/swervelib/simulation/ctre/package-summary.html index 70f0e7a..2711fd8 100644 --- a/docs/swervelib/simulation/ctre/package-summary.html +++ b/docs/swervelib/simulation/ctre/package-summary.html @@ -1,11 +1,11 @@ - + swervelib.simulation.ctre - + diff --git a/docs/swervelib/simulation/ctre/package-tree.html b/docs/swervelib/simulation/ctre/package-tree.html index 20b416b..c8ca672 100644 --- a/docs/swervelib/simulation/ctre/package-tree.html +++ b/docs/swervelib/simulation/ctre/package-tree.html @@ -1,11 +1,11 @@ - + swervelib.simulation.ctre Class Hierarchy - + diff --git a/docs/swervelib/simulation/package-summary.html b/docs/swervelib/simulation/package-summary.html index b2e09d1..dff087c 100644 --- a/docs/swervelib/simulation/package-summary.html +++ b/docs/swervelib/simulation/package-summary.html @@ -1,11 +1,11 @@ - + swervelib.simulation - + diff --git a/docs/swervelib/simulation/package-tree.html b/docs/swervelib/simulation/package-tree.html index a54c55c..95572d2 100644 --- a/docs/swervelib/simulation/package-tree.html +++ b/docs/swervelib/simulation/package-tree.html @@ -1,11 +1,11 @@ - + swervelib.simulation Class Hierarchy - + diff --git a/docs/swervelib/telemetry/SwerveDriveTelemetry.TelemetryVerbosity.html b/docs/swervelib/telemetry/SwerveDriveTelemetry.TelemetryVerbosity.html new file mode 100644 index 0000000..7f9f145 --- /dev/null +++ b/docs/swervelib/telemetry/SwerveDriveTelemetry.TelemetryVerbosity.html @@ -0,0 +1,279 @@ + + + + +SwerveDriveTelemetry.TelemetryVerbosity + + + + + + + + + + + + + + + +
    + +
    +
    + +
    + +

    Enum Class SwerveDriveTelemetry.TelemetryVerbosity

    +
    +
    java.lang.Object +
    java.lang.Enum<SwerveDriveTelemetry.TelemetryVerbosity> +
    swervelib.telemetry.SwerveDriveTelemetry.TelemetryVerbosity
    +
    +
    +
    +
    +
    All Implemented Interfaces:
    +
    Serializable, Comparable<SwerveDriveTelemetry.TelemetryVerbosity>, Constable
    +
    +
    +
    Enclosing class:
    +
    SwerveDriveTelemetry
    +
    +
    +
    public static enum SwerveDriveTelemetry.TelemetryVerbosity +extends Enum<SwerveDriveTelemetry.TelemetryVerbosity>
    +
    Verbosity of telemetry data sent back.
    +
    +
    + +
    +
    +
      + +
    • +
      +

      Enum Constant Details

      + +
      +
    • + +
    • +
      +

      Constructor Details

      +
        +
      • +
        +

        TelemetryVerbosity

        +
        private TelemetryVerbosity()
        +
        +
      • +
      +
      +
    • + +
    • +
      +

      Method Details

      +
        +
      • +
        +

        values

        +
        public static SwerveDriveTelemetry.TelemetryVerbosity[] values()
        +
        Returns an array containing the constants of this enum class, in +the order they are declared.
        +
        +
        Returns:
        +
        an array containing the constants of this enum class, in the order they are declared
        +
        +
        +
      • +
      • +
        +

        valueOf

        +
        public static SwerveDriveTelemetry.TelemetryVerbosity valueOf(String name)
        +
        Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        IllegalArgumentException - if this enum class has no constant with the specified name
        +
        NullPointerException - if the argument is null
        +
        +
        +
      • +
      +
      +
    • +
    +
    + +
    +
    +
    + + diff --git a/docs/swervelib/telemetry/SwerveDriveTelemetry.html b/docs/swervelib/telemetry/SwerveDriveTelemetry.html index 375db60..6649d7a 100644 --- a/docs/swervelib/telemetry/SwerveDriveTelemetry.html +++ b/docs/swervelib/telemetry/SwerveDriveTelemetry.html @@ -1,11 +1,11 @@ - + SwerveDriveTelemetry - + @@ -44,7 +44,7 @@ loadScripts(document, 'script');
    • + +
    • +
      +

      Nested Class Summary

      +
      Nested Classes
      +
      +
      Modifier and Type
      +
      Class
      +
      Description
      +
      static enum 
      + +
      +
      Verbosity of telemetry data sent back.
      +
      +
      +
      +
    • @@ -106,51 +123,61 @@ loadScripts(document, 'script');
      The direction the robot should be facing when the "Robot Rotation" is zero or blank.
      -
      static double
      - +
      static boolean
      +
      -
      The maximum achievable angular velocity of the robot.
      +
      State of simulation of the Robot, used to optimize retrieval.
      static double
      - +
      +
      The maximum achievable angular velocity of the robot.
      +
      +
      static double
      + +
      The maximum achievable speed of the modules, used to adjust the size of the vectors.
      -
      static double[]
      - -
      +
      static double[]
      + +
      The maximum achievable angular velocity of the robot.
      -
      static double[]
      - -
      +
      static double[]
      + +
      An array of rotation and velocity values describing the measured state of each swerve module
      -
      static int
      - -
      +
      static int
      + +
      The number of swerve modules
      -
      static double
      - -
      +
      static double
      + +
      The robot's current rotation based on odometry or gyro readings
      -
      static String
      - -
      +
      static String
      + +
      The units of the module rotations and robot rotation
      -
      static double
      - -
      +
      static double
      + +
      The distance between the front and back modules.
      -
      static double
      - -
      +
      static double
      + +
      The distance between the left and right modules.
      + + +
      +
      The current telemetry verbosity level.
      +
      static double[]
      @@ -206,6 +233,20 @@ loadScripts(document, 'script');

      Field Details

      • +
        +

        verbosity

        +
        public static SwerveDriveTelemetry.TelemetryVerbosity verbosity
        +
        The current telemetry verbosity level.
        +
        +
      • +
      • +
        +

        isSimulation

        +
        public static boolean isSimulation
        +
        State of simulation of the Robot, used to optimize retrieval.
        +
        +
      • +
      • moduleCount

        public static int moduleCount
        diff --git a/docs/swervelib/telemetry/package-summary.html b/docs/swervelib/telemetry/package-summary.html index a49fad8..87e3dc6 100644 --- a/docs/swervelib/telemetry/package-summary.html +++ b/docs/swervelib/telemetry/package-summary.html @@ -1,11 +1,11 @@ - + swervelib.telemetry - + @@ -16,7 +16,11 @@ -
      • -
        Classes
        -
        +
        +
        +
        Class
        Description
        Telemetry to describe the SwerveDrive following frc-web-components.
        + +
        +
        Verbosity of telemetry data sent back.
        +
        +
      • diff --git a/docs/swervelib/telemetry/package-tree.html b/docs/swervelib/telemetry/package-tree.html index f5466d1..9c8c9be 100644 --- a/docs/swervelib/telemetry/package-tree.html +++ b/docs/swervelib/telemetry/package-tree.html @@ -1,11 +1,11 @@ - + swervelib.telemetry Class Hierarchy - + @@ -64,6 +64,20 @@ loadScripts(document, 'script');
      +
      +

      Enum Class Hierarchy

      + +
    diff --git a/docs/type-search-index.js b/docs/type-search-index.js index e90a937..5dea219 100644 --- a/docs/type-search-index.js +++ b/docs/type-search-index.js @@ -1 +1 @@ -typeSearchIndex = [{"p":"swervelib.imu","l":"ADIS16448Swerve"},{"p":"swervelib.imu","l":"ADIS16470Swerve"},{"p":"swervelib.imu","l":"ADXRS450Swerve"},{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"swervelib.encoders","l":"AnalogAbsoluteEncoderSwerve"},{"p":"swervelib.imu","l":"AnalogGyroSwerve"},{"p":"swervelib.parser.json.modules","l":"BoolMotorJson"},{"p":"swervelib.encoders","l":"CANCoderSwerve"},{"p":"swervelib.parser.json","l":"ControllerPropertiesJson"},{"p":"swervelib.parser.json","l":"DeviceJson"},{"p":"swervelib.parser.json.modules","l":"LocationJson"},{"p":"swervelib.parser.json","l":"ModuleJson"},{"p":"swervelib.parser.json","l":"MotorConfigDouble"},{"p":"swervelib.parser.json","l":"MotorConfigInt"},{"p":"swervelib.imu","l":"NavXSwerve"},{"p":"swervelib.parser.json","l":"PhysicalPropertiesJson"},{"p":"swervelib.simulation.ctre","l":"PhysicsSim"},{"p":"swervelib.parser","l":"PIDFConfig"},{"p":"swervelib.parser.json","l":"PIDFPropertiesJson"},{"p":"swervelib.parser.deserializer","l":"PIDFRange"},{"p":"swervelib.imu","l":"Pigeon2Swerve"},{"p":"swervelib.imu","l":"PigeonSwerve"},{"p":"swervelib.simulation.ctre","l":"PhysicsSim.SimProfile"},{"p":"swervelib.motors","l":"SparkMaxSwerve.SparkMAX_slotIdx"},{"p":"swervelib.encoders","l":"SparkMaxEncoderSwerve"},{"p":"swervelib.motors","l":"SparkMaxSwerve"},{"p":"swervelib.encoders","l":"SwerveAbsoluteEncoder"},{"p":"swervelib","l":"SwerveController"},{"p":"swervelib.parser","l":"SwerveControllerConfiguration"},{"p":"swervelib","l":"SwerveDrive"},{"p":"swervelib.parser","l":"SwerveDriveConfiguration"},{"p":"swervelib.parser.json","l":"SwerveDriveJson"},{"p":"swervelib.telemetry","l":"SwerveDriveTelemetry"},{"p":"swervelib.imu","l":"SwerveIMU"},{"p":"swervelib.simulation","l":"SwerveIMUSimulation"},{"p":"swervelib.math","l":"SwerveKinematics2"},{"p":"swervelib.math","l":"SwerveMath"},{"p":"swervelib","l":"SwerveModule"},{"p":"swervelib.parser","l":"SwerveModuleConfiguration"},{"p":"swervelib.parser","l":"SwerveModulePhysicalCharacteristics"},{"p":"swervelib.simulation","l":"SwerveModuleSimulation"},{"p":"swervelib.math","l":"SwerveModuleState2"},{"p":"swervelib.motors","l":"SwerveMotor"},{"p":"swervelib.parser","l":"SwerveParser"},{"p":"swervelib.simulation.ctre","l":"TalonFXSimProfile"},{"p":"swervelib.motors","l":"TalonFXSwerve"},{"p":"swervelib.simulation.ctre","l":"TalonSRXSimProfile"},{"p":"swervelib.motors","l":"TalonSRXSwerve"},{"p":"swervelib.simulation.ctre","l":"VictorSPXSimProfile"}];updateSearchResults(); \ No newline at end of file +typeSearchIndex = [{"p":"swervelib.imu","l":"ADIS16448Swerve"},{"p":"swervelib.imu","l":"ADIS16470Swerve"},{"p":"swervelib.imu","l":"ADXRS450Swerve"},{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"swervelib.encoders","l":"AnalogAbsoluteEncoderSwerve"},{"p":"swervelib.imu","l":"AnalogGyroSwerve"},{"p":"swervelib.parser.json.modules","l":"BoolMotorJson"},{"p":"swervelib.encoders","l":"CANCoderSwerve"},{"p":"swervelib.parser.json","l":"ControllerPropertiesJson"},{"p":"swervelib.parser.json","l":"DeviceJson"},{"p":"swervelib.parser.json.modules","l":"LocationJson"},{"p":"swervelib.parser.json","l":"ModuleJson"},{"p":"swervelib.parser.json","l":"MotorConfigDouble"},{"p":"swervelib.parser.json","l":"MotorConfigInt"},{"p":"swervelib.imu","l":"NavXSwerve"},{"p":"swervelib.parser.json","l":"PhysicalPropertiesJson"},{"p":"swervelib.simulation.ctre","l":"PhysicsSim"},{"p":"swervelib.parser","l":"PIDFConfig"},{"p":"swervelib.parser.json","l":"PIDFPropertiesJson"},{"p":"swervelib.parser.deserializer","l":"PIDFRange"},{"p":"swervelib.imu","l":"Pigeon2Swerve"},{"p":"swervelib.imu","l":"PigeonSwerve"},{"p":"swervelib.simulation.ctre","l":"PhysicsSim.SimProfile"},{"p":"swervelib.motors","l":"SparkMaxSwerve.SparkMAX_slotIdx"},{"p":"swervelib.motors","l":"SparkMaxBrushedMotorSwerve"},{"p":"swervelib.encoders","l":"SparkMaxEncoderSwerve"},{"p":"swervelib.motors","l":"SparkMaxSwerve"},{"p":"swervelib.encoders","l":"SwerveAbsoluteEncoder"},{"p":"swervelib","l":"SwerveController"},{"p":"swervelib.parser","l":"SwerveControllerConfiguration"},{"p":"swervelib","l":"SwerveDrive"},{"p":"swervelib.parser","l":"SwerveDriveConfiguration"},{"p":"swervelib.parser.json","l":"SwerveDriveJson"},{"p":"swervelib.telemetry","l":"SwerveDriveTelemetry"},{"p":"swervelib.imu","l":"SwerveIMU"},{"p":"swervelib.simulation","l":"SwerveIMUSimulation"},{"p":"swervelib.math","l":"SwerveKinematics2"},{"p":"swervelib.math","l":"SwerveMath"},{"p":"swervelib","l":"SwerveModule"},{"p":"swervelib.parser","l":"SwerveModuleConfiguration"},{"p":"swervelib.parser","l":"SwerveModulePhysicalCharacteristics"},{"p":"swervelib.simulation","l":"SwerveModuleSimulation"},{"p":"swervelib.math","l":"SwerveModuleState2"},{"p":"swervelib.motors","l":"SwerveMotor"},{"p":"swervelib.parser","l":"SwerveParser"},{"p":"swervelib.simulation.ctre","l":"TalonFXSimProfile"},{"p":"swervelib.motors","l":"TalonFXSwerve"},{"p":"swervelib.simulation.ctre","l":"TalonSRXSimProfile"},{"p":"swervelib.motors","l":"TalonSRXSwerve"},{"p":"swervelib.telemetry","l":"SwerveDriveTelemetry.TelemetryVerbosity"},{"p":"swervelib.simulation.ctre","l":"VictorSPXSimProfile"}];updateSearchResults(); \ No newline at end of file diff --git a/swervelib/SwerveDrive.java b/swervelib/SwerveDrive.java index 837768a..bd2949a 100644 --- a/swervelib/SwerveDrive.java +++ b/swervelib/SwerveDrive.java @@ -1,5 +1,6 @@ package swervelib; +import edu.wpi.first.math.Matrix; import edu.wpi.first.math.VecBuilder; import edu.wpi.first.math.controller.SimpleMotorFeedforward; import edu.wpi.first.math.estimator.SwerveDrivePoseEstimator; @@ -10,9 +11,10 @@ import edu.wpi.first.math.geometry.Transform2d; import edu.wpi.first.math.geometry.Translation2d; import edu.wpi.first.math.kinematics.ChassisSpeeds; import edu.wpi.first.math.kinematics.SwerveModulePosition; +import edu.wpi.first.math.numbers.N1; +import edu.wpi.first.math.numbers.N3; import edu.wpi.first.math.trajectory.Trajectory; import edu.wpi.first.math.util.Units; -import edu.wpi.first.wpilibj.RobotBase; import edu.wpi.first.wpilibj.Timer; import edu.wpi.first.wpilibj.smartdashboard.Field2d; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; @@ -26,6 +28,7 @@ import swervelib.parser.SwerveControllerConfiguration; import swervelib.parser.SwerveDriveConfiguration; import swervelib.simulation.SwerveIMUSimulation; import swervelib.telemetry.SwerveDriveTelemetry; +import swervelib.telemetry.SwerveDriveTelemetry.TelemetryVerbosity; /** * Swerve Drive class representing and controlling the swerve drive. @@ -52,11 +55,21 @@ public class SwerveDrive /** * Field object. */ - public Field2d field = new Field2d(); + public Field2d field = new Field2d(); /** * Swerve controller for controlling heading of the robot. */ public SwerveController swerveController; + /** + * Trustworthiness of the internal model of how motors should be moving Measured in expected standard deviation + * (meters of position and degrees of rotation) + */ + public Matrix stateStdDevs = VecBuilder.fill(0.1, 0.1, 0.1); + /** + * Trustworthiness of the vision system Measured in expected standard deviation (meters of position and degrees of + * rotation) + */ + public Matrix visionMeasurementStdDevs = VecBuilder.fill(0.9, 0.9, 0.9); /** * Swerve IMU device for sensing the heading of the robot. */ @@ -95,7 +108,7 @@ public class SwerveDrive // Create an integrator for angle if the robot is being simulated to emulate an IMU // If the robot is real, instantiate the IMU instead. - if (RobotBase.isSimulation()) + if (SwerveDriveTelemetry.isSimulation) { simIMU = new SwerveIMUSimulation(); } else @@ -113,47 +126,50 @@ public class SwerveDrive getYaw(), getModulePositions(), new Pose2d(new Translation2d(0, 0), Rotation2d.fromDegrees(0)), - VecBuilder.fill( - 0.1, 0.1, 0.1), // x,y,heading in radians; state std dev, higher=less weight - VecBuilder.fill( - 0.9, 0.9, - 0.9)); // x,y,heading in radians; Vision measurement std dev, higher=less weight + stateStdDevs, + visionMeasurementStdDevs); // x,y,heading in radians; Vision measurement std dev, higher=less weight zeroGyro(); // Initialize Telemetry - SmartDashboard.putData("Field", field); - - SwerveDriveTelemetry.maxSpeed = swerveDriveConfiguration.maxSpeed; - SwerveDriveTelemetry.maxAngularVelocity = swerveController.config.maxAngularVelocity; - SwerveDriveTelemetry.moduleCount = swerveModules.length; - SwerveDriveTelemetry.sizeFrontBack = Units.metersToInches(SwerveMath.getSwerveModule(swerveModules, true, - false).moduleLocation.getX() + - SwerveMath.getSwerveModule(swerveModules, - false, - false).moduleLocation.getX()); - SwerveDriveTelemetry.sizeLeftRight = Units.metersToInches(SwerveMath.getSwerveModule(swerveModules, false, - true).moduleLocation.getY() + - SwerveMath.getSwerveModule(swerveModules, - false, - false).moduleLocation.getY()); - SwerveDriveTelemetry.wheelLocations = new double[SwerveDriveTelemetry.moduleCount * 2]; - for (SwerveModule module : swerveModules) + if (SwerveDriveTelemetry.verbosity.ordinal() >= TelemetryVerbosity.LOW.ordinal()) { - SwerveDriveTelemetry.wheelLocations[module.moduleNumber * 2] = Units.metersToInches( - module.configuration.moduleLocation.getX()); - SwerveDriveTelemetry.wheelLocations[(module.moduleNumber * 2) + 1] = Units.metersToInches( - module.configuration.moduleLocation.getY()); + SmartDashboard.putData("Field", field); + } + + if (SwerveDriveTelemetry.verbosity.ordinal() >= TelemetryVerbosity.HIGH.ordinal()) + { + SwerveDriveTelemetry.maxSpeed = swerveDriveConfiguration.maxSpeed; + SwerveDriveTelemetry.maxAngularVelocity = swerveController.config.maxAngularVelocity; + SwerveDriveTelemetry.moduleCount = swerveModules.length; + SwerveDriveTelemetry.sizeFrontBack = Units.metersToInches(SwerveMath.getSwerveModule(swerveModules, true, + false).moduleLocation.getX() + + SwerveMath.getSwerveModule(swerveModules, + false, + false).moduleLocation.getX()); + SwerveDriveTelemetry.sizeLeftRight = Units.metersToInches(SwerveMath.getSwerveModule(swerveModules, false, + true).moduleLocation.getY() + + SwerveMath.getSwerveModule(swerveModules, + false, + false).moduleLocation.getY()); + SwerveDriveTelemetry.wheelLocations = new double[SwerveDriveTelemetry.moduleCount * 2]; + for (SwerveModule module : swerveModules) + { + SwerveDriveTelemetry.wheelLocations[module.moduleNumber * 2] = Units.metersToInches( + module.configuration.moduleLocation.getX()); + SwerveDriveTelemetry.wheelLocations[(module.moduleNumber * 2) + 1] = Units.metersToInches( + module.configuration.moduleLocation.getY()); + } + SwerveDriveTelemetry.measuredStates = new double[SwerveDriveTelemetry.moduleCount * 2]; + SwerveDriveTelemetry.desiredStates = new double[SwerveDriveTelemetry.moduleCount * 2]; } - SwerveDriveTelemetry.measuredStates = new double[SwerveDriveTelemetry.moduleCount * 2]; - SwerveDriveTelemetry.desiredStates = new double[SwerveDriveTelemetry.moduleCount * 2]; - // TODO: Might need to flip X and Y. } /** * The primary method for controlling the drivebase. Takes a Translation2d and a rotation rate, and calculates and * commands module states accordingly. Can use either open-loop or closed-loop velocity control for the wheel - * velocities. Also has field- and robot-relative modes, which affect how the translation vector is used. + * velocities. Also has field- and robot-relative modes, which affect how the translation vector is used. This method + * defaults to no heading correction. * * @param translation {@link Translation2d} that is the commanded linear velocity of the robot, in meters per * second. In robot-relative mode, positive x is torwards the bow (front) and positive y is @@ -167,6 +183,28 @@ public class SwerveDrive */ public void drive( Translation2d translation, double rotation, boolean fieldRelative, boolean isOpenLoop) + { + drive(translation, rotation, fieldRelative, isOpenLoop, false); + } + + /** + * The primary method for controlling the drivebase. Takes a Translation2d and a rotation rate, and calculates and + * commands module states accordingly. Can use either open-loop or closed-loop velocity control for the wheel + * velocities. Also has field- and robot-relative modes, which affect how the translation vector is used. + * + * @param translation {@link Translation2d} that is the commanded linear velocity of the robot, in meters per + * second. In robot-relative mode, positive x is torwards the bow (front) and positive y is + * torwards port (left). In field-relative mode, positive x is away from the alliance wall + * (field North) and positive y is torwards the left wall when looking through the driver + * station glass (field West). + * @param rotation Robot angular rate, in radians per second. CCW positive. Unaffected by field/robot + * relativity. + * @param fieldRelative Drive mode. True for field-relative, false for robot-relative. + * @param isOpenLoop Whether to use closed-loop velocity control. Set to true to disable closed-loop. + * @param headingCorrection Whether to correct heading when driving translationally. Set to true to enable. + */ + public void drive( + Translation2d translation, double rotation, boolean fieldRelative, boolean isOpenLoop, boolean headingCorrection) { // Creates a robot-relative ChassisSpeeds object, converting from field-relative speeds if // necessary. @@ -178,7 +216,7 @@ public class SwerveDrive // Heading Angular Velocity Deadband, might make a configuration option later. // Originally made by Team 1466 Webb Robotics. - if (Math.abs(rotation) < 0.01) + if (Math.abs(rotation) < 0.01 && headingCorrection) { velocity.omegaRadiansPerSecond = swerveController.headingCalculate(lastHeadingRadians, getYaw().getRadians()); @@ -188,10 +226,16 @@ public class SwerveDrive } // Display commanded speed for testing - SmartDashboard.putString("RobotVelocity", velocity.toString()); - SwerveDriveTelemetry.desiredChassisSpeeds[1] = velocity.vyMetersPerSecond; - SwerveDriveTelemetry.desiredChassisSpeeds[0] = velocity.vxMetersPerSecond; - SwerveDriveTelemetry.desiredChassisSpeeds[2] = Math.toDegrees(velocity.omegaRadiansPerSecond); + if (SwerveDriveTelemetry.verbosity == TelemetryVerbosity.HIGH) + { + SmartDashboard.putString("RobotVelocity", velocity.toString()); + } + if (SwerveDriveTelemetry.verbosity.ordinal() >= TelemetryVerbosity.HIGH.ordinal()) + { + SwerveDriveTelemetry.desiredChassisSpeeds[1] = velocity.vyMetersPerSecond; + SwerveDriveTelemetry.desiredChassisSpeeds[0] = velocity.vxMetersPerSecond; + SwerveDriveTelemetry.desiredChassisSpeeds[2] = Math.toDegrees(velocity.omegaRadiansPerSecond); + } // Calculate required module states via kinematics SwerveModuleState2[] swerveModuleStates = kinematics.toSwerveModuleStates(velocity); @@ -213,17 +257,23 @@ public class SwerveDrive // Sets states for (SwerveModule module : swerveModules) { - SwerveModuleState2 moduleState = module.getState(); - SwerveDriveTelemetry.desiredStates[module.moduleNumber * 2] = moduleState.angle.getDegrees(); - SwerveDriveTelemetry.desiredStates[(module.moduleNumber * 2) + 1] = moduleState.speedMetersPerSecond; - module.setDesiredState(desiredStates[module.moduleNumber], isOpenLoop); - SmartDashboard.putNumber( - "Module " + module.moduleNumber + " Speed Setpoint: ", - desiredStates[module.moduleNumber].speedMetersPerSecond); - SmartDashboard.putNumber( - "Module " + module.moduleNumber + " Angle Setpoint: ", - desiredStates[module.moduleNumber].angle.getDegrees()); + + if (SwerveDriveTelemetry.verbosity.ordinal() >= TelemetryVerbosity.HIGH.ordinal()) + { + SwerveModuleState2 moduleState = module.getState(); + SwerveDriveTelemetry.desiredStates[module.moduleNumber * 2] = moduleState.angle.getDegrees(); + SwerveDriveTelemetry.desiredStates[(module.moduleNumber * 2) + 1] = moduleState.speedMetersPerSecond; + } + if (SwerveDriveTelemetry.verbosity == TelemetryVerbosity.HIGH) + { + SmartDashboard.putNumber( + "Module " + module.moduleNumber + " Speed Setpoint: ", + desiredStates[module.moduleNumber].speedMetersPerSecond); + SmartDashboard.putNumber( + "Module " + module.moduleNumber + " Angle Setpoint: ", + desiredStates[module.moduleNumber].angle.getDegrees()); + } } } @@ -295,7 +345,10 @@ public class SwerveDrive */ public void postTrajectory(Trajectory trajectory) { - field.getObject("Trajectory").setTrajectory(trajectory); + if (SwerveDriveTelemetry.verbosity.ordinal() >= TelemetryVerbosity.LOW.ordinal()) + { + field.getObject("Trajectory").setTrajectory(trajectory); + } } /** @@ -336,7 +389,7 @@ public class SwerveDrive { // Resets the real gyro or the angle accumulator, depending on whether the robot is being // simulated - if (!RobotBase.isSimulation()) + if (!SwerveDriveTelemetry.isSimulation) { imu.setYaw(0); } else @@ -355,7 +408,7 @@ public class SwerveDrive public Rotation2d getYaw() { // Read the imu if the robot is real or the accumulator if the robot is simulated. - if (!RobotBase.isSimulation()) + if (!SwerveDriveTelemetry.isSimulation) { double[] ypr = new double[3]; imu.getYawPitchRoll(ypr); @@ -374,7 +427,7 @@ public class SwerveDrive public Rotation2d getPitch() { // Read the imu if the robot is real or the accumulator if the robot is simulated. - if (!RobotBase.isSimulation()) + if (!SwerveDriveTelemetry.isSimulation) { double[] ypr = new double[3]; imu.getYawPitchRoll(ypr); @@ -393,7 +446,7 @@ public class SwerveDrive public Rotation2d getRoll() { // Read the imu if the robot is real or the accumulator if the robot is simulated. - if (!RobotBase.isSimulation()) + if (!SwerveDriveTelemetry.isSimulation) { double[] ypr = new double[3]; imu.getYawPitchRoll(ypr); @@ -412,7 +465,7 @@ public class SwerveDrive public Rotation3d getGyroRotation3d() { // Read the imu if the robot is real or the accumulator if the robot is simulated. - if (!RobotBase.isSimulation()) + if (!SwerveDriveTelemetry.isSimulation) { double[] ypr = new double[3]; imu.getYawPitchRoll(ypr); @@ -445,10 +498,20 @@ public class SwerveDrive */ public void lockPose() { + // Sets states for (SwerveModule swerveModule : swerveModules) { - swerveModule.setDesiredState( - new SwerveModuleState2(0, swerveModule.configuration.moduleLocation.getAngle(), 0), true); + SwerveModuleState2 desiredState = + new SwerveModuleState2(0, swerveModule.configuration.moduleLocation.getAngle(), 0); + if (SwerveDriveTelemetry.verbosity.ordinal() >= TelemetryVerbosity.HIGH.ordinal()) + { + SwerveDriveTelemetry.desiredStates[swerveModule.moduleNumber * 2] = + desiredState.angle.getDegrees(); + SwerveDriveTelemetry.desiredStates[(swerveModule.moduleNumber * 2) + 1] = + desiredState.speedMetersPerSecond; + } + swerveModule.setDesiredState(desiredState, false); + } } @@ -495,36 +558,47 @@ public class SwerveDrive swerveDrivePoseEstimator.update(getYaw(), getModulePositions()); // Update angle accumulator if the robot is simulated - Pose2d[] modulePoses = getSwerveModulePoses(swerveDrivePoseEstimator.getEstimatedPosition()); - if (RobotBase.isSimulation()) + if (SwerveDriveTelemetry.verbosity.ordinal() >= TelemetryVerbosity.HIGH.ordinal()) { - simIMU.updateOdometry( - kinematics, - getStates(), - modulePoses, - field); + Pose2d[] modulePoses = getSwerveModulePoses(swerveDrivePoseEstimator.getEstimatedPosition()); + if (SwerveDriveTelemetry.isSimulation) + { + simIMU.updateOdometry( + kinematics, + getStates(), + modulePoses, + field); + } + + ChassisSpeeds measuredChassisSpeeds = getRobotVelocity(); + SwerveDriveTelemetry.measuredChassisSpeeds[1] = measuredChassisSpeeds.vyMetersPerSecond; + SwerveDriveTelemetry.measuredChassisSpeeds[0] = measuredChassisSpeeds.vxMetersPerSecond; + SwerveDriveTelemetry.measuredChassisSpeeds[2] = Math.toDegrees(measuredChassisSpeeds.omegaRadiansPerSecond); + SwerveDriveTelemetry.robotRotation = getYaw().getDegrees(); } - field.setRobotPose(swerveDrivePoseEstimator.getEstimatedPosition()); - ChassisSpeeds measuredChassisSpeeds = getRobotVelocity(); - SwerveDriveTelemetry.measuredChassisSpeeds[1] = measuredChassisSpeeds.vyMetersPerSecond; - SwerveDriveTelemetry.measuredChassisSpeeds[0] = measuredChassisSpeeds.vxMetersPerSecond; - SwerveDriveTelemetry.measuredChassisSpeeds[2] = Math.toDegrees(measuredChassisSpeeds.omegaRadiansPerSecond); - SwerveDriveTelemetry.robotRotation = getYaw().getDegrees(); + if (SwerveDriveTelemetry.verbosity.ordinal() >= TelemetryVerbosity.LOW.ordinal()) + { + field.setRobotPose(swerveDrivePoseEstimator.getEstimatedPosition()); + } double sumOmega = 0; for (SwerveModule module : swerveModules) { SwerveModuleState2 moduleState = module.getState(); - SwerveDriveTelemetry.measuredStates[module.moduleNumber * 2] = moduleState.angle.getDegrees(); - SwerveDriveTelemetry.measuredStates[(module.moduleNumber * 2) + 1] = moduleState.speedMetersPerSecond; - sumOmega += Math.abs(moduleState.omegaRadPerSecond); - - SmartDashboard.putNumber( - "Module" + module.moduleNumber + "Relative Encoder", module.getRelativePosition()); - SmartDashboard.putNumber( - "Module" + module.moduleNumber + "Absolute Encoder", module.getAbsolutePosition()); + if (SwerveDriveTelemetry.verbosity == TelemetryVerbosity.HIGH) + { + SmartDashboard.putNumber( + "Module" + module.moduleNumber + "Relative Encoder", module.getRelativePosition()); + SmartDashboard.putNumber( + "Module" + module.moduleNumber + "Absolute Encoder", module.getAbsolutePosition()); + } + if (SwerveDriveTelemetry.verbosity.ordinal() >= TelemetryVerbosity.HIGH.ordinal()) + { + SwerveDriveTelemetry.measuredStates[module.moduleNumber * 2] = moduleState.angle.getDegrees(); + SwerveDriveTelemetry.measuredStates[(module.moduleNumber * 2) + 1] = moduleState.speedMetersPerSecond; + } } // If the robot isn't moving synchronize the encoders every 100ms (Inspired by democrat's SDS @@ -536,7 +610,10 @@ public class SwerveDrive moduleSynchronizationCounter = 0; } - SwerveDriveTelemetry.updateData(); + if (SwerveDriveTelemetry.verbosity.ordinal() >= TelemetryVerbosity.HIGH.ordinal()) + { + SwerveDriveTelemetry.updateData(); + } } /** @@ -554,27 +631,30 @@ public class SwerveDrive * Add a vision measurement to the {@link SwerveDrivePoseEstimator} and update the {@link SwerveIMU} gyro reading with * the given timestamp of the vision measurement. THIS WILL BREAK IF UPDATED TOO OFTEN. * - * @param robotPose Robot {@link Pose2d} as measured by vision. - * @param timestamp Timestamp the measurement was taken as time since startup, should be taken from - * {@link Timer#getFPGATimestamp()} or similar sources. - * @param soft Add vision estimate using the - * {@link SwerveDrivePoseEstimator#addVisionMeasurement(Pose2d, double)} function, or hard reset - * odometry with the given position with - * {@link edu.wpi.first.math.kinematics.SwerveDriveOdometry#resetPosition(Rotation2d, - * SwerveModulePosition[], Pose2d)}. + * @param robotPose Robot {@link Pose2d} as measured by vision. + * @param timestamp Timestamp the measurement was taken as time since startup, should be taken from + * {@link Timer#getFPGATimestamp()} or similar sources. + * @param soft Add vision estimate using the + * {@link SwerveDrivePoseEstimator#addVisionMeasurement(Pose2d, double)} function, or hard + * reset odometry with the given position with + * {@link edu.wpi.first.math.kinematics.SwerveDriveOdometry#resetPosition(Rotation2d, + * SwerveModulePosition[], Pose2d)}. + * @param trustWorthiness Trust level of vision reading when using a soft measurement, used to multiply the standard + * deviation. Set to 1 for full trust. */ - public void addVisionMeasurement(Pose2d robotPose, double timestamp, boolean soft) + public void addVisionMeasurement(Pose2d robotPose, double timestamp, boolean soft, double trustWorthiness) { if (soft) { - swerveDrivePoseEstimator.addVisionMeasurement(robotPose, timestamp); + swerveDrivePoseEstimator.addVisionMeasurement(robotPose, timestamp, + visionMeasurementStdDevs.times(1.0 / trustWorthiness)); } else { swerveDrivePoseEstimator.resetPosition( robotPose.getRotation(), getModulePositions(), robotPose); } - if (!RobotBase.isSimulation()) + if (!SwerveDriveTelemetry.isSimulation) { imu.setYaw(swerveDrivePoseEstimator.getEstimatedPosition().getRotation().getDegrees()); // Yaw reset recommended by Team 1622 diff --git a/swervelib/SwerveModule.java b/swervelib/SwerveModule.java index e6722ef..d97c5f2 100644 --- a/swervelib/SwerveModule.java +++ b/swervelib/SwerveModule.java @@ -4,13 +4,14 @@ import edu.wpi.first.math.controller.SimpleMotorFeedforward; import edu.wpi.first.math.geometry.Rotation2d; import edu.wpi.first.math.kinematics.SwerveModulePosition; import edu.wpi.first.math.kinematics.SwerveModuleState; -import edu.wpi.first.wpilibj.RobotBase; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import swervelib.encoders.SwerveAbsoluteEncoder; import swervelib.math.SwerveModuleState2; import swervelib.motors.SwerveMotor; import swervelib.parser.SwerveModuleConfiguration; import swervelib.simulation.SwerveModuleSimulation; +import swervelib.telemetry.SwerveDriveTelemetry; +import swervelib.telemetry.SwerveDriveTelemetry.TelemetryVerbosity; /** * The Swerve Module class which represents and controls Swerve Modules for the swerve drive. @@ -110,7 +111,7 @@ public class SwerveModule driveMotor.burnFlash(); angleMotor.burnFlash(); - if (RobotBase.isSimulation()) + if (SwerveDriveTelemetry.isSimulation) { simModule = new SwerveModuleSimulation(); } @@ -143,13 +144,15 @@ public class SwerveModule desiredState = new SwerveModuleState2( simpleState.speedMetersPerSecond, simpleState.angle, desiredState.omegaRadPerSecond); - - SmartDashboard.putNumber( - "Optimized " + moduleNumber + " Speed Setpoint: ", desiredState.speedMetersPerSecond); - SmartDashboard.putNumber( - "Optimized " + moduleNumber + " Angle Setpoint: ", desiredState.angle.getDegrees()); - SmartDashboard.putNumber( - "Module " + moduleNumber + " Omega: ", Math.toDegrees(desiredState.omegaRadPerSecond)); + if (SwerveDriveTelemetry.verbosity == TelemetryVerbosity.HIGH) + { + SmartDashboard.putNumber( + "Optimized " + moduleNumber + " Speed Setpoint: ", desiredState.speedMetersPerSecond); + SmartDashboard.putNumber( + "Optimized " + moduleNumber + " Angle Setpoint: ", desiredState.angle.getDegrees()); + SmartDashboard.putNumber( + "Module " + moduleNumber + " Omega: ", Math.toDegrees(desiredState.omegaRadPerSecond)); + } if (isOpenLoop) { @@ -170,7 +173,7 @@ public class SwerveModule angle, Math.toDegrees(desiredState.omegaRadPerSecond) * configuration.angleKV); lastAngle = angle; - if (RobotBase.isSimulation()) + if (SwerveDriveTelemetry.isSimulation) { simModule.updateStateAndPosition(desiredState); } @@ -197,7 +200,7 @@ public class SwerveModule double velocity; Rotation2d azimuth; double omega; - if (!RobotBase.isSimulation()) + if (!SwerveDriveTelemetry.isSimulation) { velocity = driveMotor.getVelocity(); azimuth = Rotation2d.fromDegrees(angleMotor.getPosition()); @@ -218,7 +221,7 @@ public class SwerveModule { double position; Rotation2d azimuth; - if (!RobotBase.isSimulation()) + if (!SwerveDriveTelemetry.isSimulation) { position = driveMotor.getPosition(); azimuth = Rotation2d.fromDegrees(angleMotor.getPosition()); @@ -226,7 +229,10 @@ public class SwerveModule { return simModule.getPosition(); } - SmartDashboard.putNumber("Module " + moduleNumber + "Angle", azimuth.getDegrees()); + if (SwerveDriveTelemetry.verbosity == TelemetryVerbosity.HIGH) + { + SmartDashboard.putNumber("Module " + moduleNumber + "Angle", azimuth.getDegrees()); + } return new SwerveModulePosition(position, azimuth); } diff --git a/swervelib/imu/ADIS16448Swerve.java b/swervelib/imu/ADIS16448Swerve.java index 6313ea8..1aa483d 100644 --- a/swervelib/imu/ADIS16448Swerve.java +++ b/swervelib/imu/ADIS16448Swerve.java @@ -34,7 +34,7 @@ public class ADIS16448Swerve extends SwerveIMU @Override public void factoryDefault() { - yawOffset = imu.getAngle() % 360; + yawOffset = Math.IEEEremainder(imu.getAngle(), 360); } /** @@ -54,7 +54,7 @@ public class ADIS16448Swerve extends SwerveIMU @Override public void setYaw(double yaw) { - yawOffset = (yaw % 360) + (imu.getAngle() % 360); + yawOffset = Math.IEEEremainder(yaw, 360) + Math.IEEEremainder(imu.getAngle(), 360); } /** @@ -65,9 +65,9 @@ public class ADIS16448Swerve extends SwerveIMU @Override public void getYawPitchRoll(double[] yprArray) { - yprArray[0] = (imu.getAngle() % 360) - yawOffset; - yprArray[1] = imu.getXComplementaryAngle() % 360; - yprArray[2] = imu.getYComplementaryAngle() % 360; + yprArray[0] = Math.IEEEremainder(imu.getAngle(), 360) - yawOffset; + yprArray[1] = Math.IEEEremainder(imu.getXComplementaryAngle(), 360); + yprArray[2] = Math.IEEEremainder(imu.getYComplementaryAngle(), 360); } /** diff --git a/swervelib/imu/ADIS16470Swerve.java b/swervelib/imu/ADIS16470Swerve.java index 34e8aef..d0f01bb 100644 --- a/swervelib/imu/ADIS16470Swerve.java +++ b/swervelib/imu/ADIS16470Swerve.java @@ -34,7 +34,7 @@ public class ADIS16470Swerve extends SwerveIMU @Override public void factoryDefault() { - yawOffset = imu.getAngle() % 360; + yawOffset = Math.IEEEremainder(imu.getAngle(), 360); } /** @@ -54,7 +54,7 @@ public class ADIS16470Swerve extends SwerveIMU @Override public void setYaw(double yaw) { - yawOffset = (yaw % 360) + (imu.getAngle() % 360); + yawOffset = Math.IEEEremainder(yaw, 360) + Math.IEEEremainder(imu.getAngle(), 360); } /** @@ -65,9 +65,9 @@ public class ADIS16470Swerve extends SwerveIMU @Override public void getYawPitchRoll(double[] yprArray) { - yprArray[0] = (imu.getAngle() % 360) - yawOffset; - yprArray[1] = imu.getXComplementaryAngle() % 360; - yprArray[2] = imu.getYComplementaryAngle() % 360; + yprArray[0] = Math.IEEEremainder(imu.getAngle(), 360) - yawOffset; + yprArray[1] = Math.IEEEremainder(imu.getXComplementaryAngle(), 360); + yprArray[2] = Math.IEEEremainder(imu.getYComplementaryAngle(), 360); } /** diff --git a/swervelib/imu/ADXRS450Swerve.java b/swervelib/imu/ADXRS450Swerve.java index 9ce3cb9..6a9d97f 100644 --- a/swervelib/imu/ADXRS450Swerve.java +++ b/swervelib/imu/ADXRS450Swerve.java @@ -34,7 +34,7 @@ public class ADXRS450Swerve extends SwerveIMU @Override public void factoryDefault() { - yawOffset = imu.getAngle() % 360; + yawOffset = Math.IEEEremainder(imu.getAngle(), 360); } /** @@ -54,7 +54,7 @@ public class ADXRS450Swerve extends SwerveIMU @Override public void setYaw(double yaw) { - yawOffset = (yaw % 360) + (imu.getAngle() % 360); + yawOffset = Math.IEEEremainder(yaw, 360) + Math.IEEEremainder(imu.getAngle(), 360); } /** @@ -65,7 +65,7 @@ public class ADXRS450Swerve extends SwerveIMU @Override public void getYawPitchRoll(double[] yprArray) { - yprArray[0] = (imu.getAngle() % 360) - yawOffset; + yprArray[0] = Math.IEEEremainder(imu.getAngle(), 360) - yawOffset; yprArray[1] = 0; yprArray[2] = 0; } diff --git a/swervelib/imu/AnalogGyroSwerve.java b/swervelib/imu/AnalogGyroSwerve.java index 15a63d4..1cd60cd 100644 --- a/swervelib/imu/AnalogGyroSwerve.java +++ b/swervelib/imu/AnalogGyroSwerve.java @@ -41,7 +41,7 @@ public class AnalogGyroSwerve extends SwerveIMU @Override public void factoryDefault() { - yawOffset = gyro.getAngle() % 360; + yawOffset = Math.IEEEremainder(gyro.getAngle(), 360); } /** @@ -61,7 +61,7 @@ public class AnalogGyroSwerve extends SwerveIMU @Override public void setYaw(double yaw) { - yawOffset = (yaw % 360) + (gyro.getAngle() % 360); + yawOffset = Math.IEEEremainder(yaw, 360) + Math.IEEEremainder(gyro.getAngle(), 360); } /** @@ -72,7 +72,7 @@ public class AnalogGyroSwerve extends SwerveIMU @Override public void getYawPitchRoll(double[] yprArray) { - yprArray[0] = (gyro.getAngle() % 360) - yawOffset; + yprArray[0] = Math.IEEEremainder(gyro.getAngle(), 360) - yawOffset; yprArray[1] = 0; yprArray[2] = 0; } diff --git a/swervelib/imu/NavXSwerve.java b/swervelib/imu/NavXSwerve.java index f52c25a..46aa41c 100644 --- a/swervelib/imu/NavXSwerve.java +++ b/swervelib/imu/NavXSwerve.java @@ -47,7 +47,7 @@ public class NavXSwerve extends SwerveIMU public void factoryDefault() { // gyro.reset(); // Reported to be slow - yawOffset = gyro.getYaw() % 360; + yawOffset = Math.IEEEremainder(gyro.getYaw(), 360); } /** @@ -67,7 +67,7 @@ public class NavXSwerve extends SwerveIMU public void setYaw(double yaw) { // gyro.reset(); // Reported to be slow using the offset. - yawOffset = (yaw % 360) + (gyro.getYaw() % 360); + yawOffset = Math.IEEEremainder(yaw, 360) + Math.IEEEremainder(gyro.getYaw(), 360); } /** @@ -78,9 +78,10 @@ public class NavXSwerve extends SwerveIMU @Override public void getYawPitchRoll(double[] yprArray) { - yprArray[0] = (gyro.getYaw() % 360) - yawOffset; - yprArray[1] = gyro.getPitch() % 360; - yprArray[2] = gyro.getRoll() % 360; + + yprArray[0] = (Math.IEEEremainder(gyro.getYaw(), 360)) - yawOffset; + yprArray[1] = Math.IEEEremainder(gyro.getPitch(), 360); + yprArray[2] = Math.IEEEremainder(gyro.getRoll(), 360); } /** diff --git a/swervelib/motors/SparkMaxBrushedMotorSwerve.java b/swervelib/motors/SparkMaxBrushedMotorSwerve.java new file mode 100644 index 0000000..a5d1a2a --- /dev/null +++ b/swervelib/motors/SparkMaxBrushedMotorSwerve.java @@ -0,0 +1,382 @@ +package swervelib.motors; + +import com.revrobotics.AbsoluteEncoder; +import com.revrobotics.CANSparkMax; +import com.revrobotics.CANSparkMax.ControlType; +import com.revrobotics.CANSparkMax.IdleMode; +import com.revrobotics.CANSparkMaxLowLevel.MotorType; +import com.revrobotics.CANSparkMaxLowLevel.PeriodicFrame; +import com.revrobotics.RelativeEncoder; +import com.revrobotics.SparkMaxAlternateEncoder; +import com.revrobotics.SparkMaxPIDController; +import com.revrobotics.SparkMaxRelativeEncoder.Type; +import edu.wpi.first.wpilibj.DriverStation; +import swervelib.encoders.SwerveAbsoluteEncoder; +import swervelib.motors.SparkMaxSwerve.SparkMAX_slotIdx; +import swervelib.parser.PIDFConfig; + +/** + * Brushed motor control with SparkMax. + */ +public class SparkMaxBrushedMotorSwerve extends SwerveMotor +{ + + /** + * SparkMAX Instance. + */ + public CANSparkMax motor; + + /** + * Absolute encoder attached to the SparkMax (if exists) + */ + public AbsoluteEncoder absoluteEncoder; + /** + * Integrated encoder. + */ + public RelativeEncoder encoder; + /** + * Closed-loop PID controller. + */ + public SparkMaxPIDController pid; + /** + * Factory default already occurred. + */ + private boolean factoryDefaultOccurred = false; + + /** + * Initialize the swerve motor. + * + * @param motor The SwerveMotor as a SparkMax object. + * @param isDriveMotor Is the motor being initialized a drive motor? + * @param encoderType {@link Type} of encoder to use for the {@link CANSparkMax} device. + * @param countsPerRevolution The number of encoder pulses for the {@link Type} encoder per revolution. + * @param useDataPortQuadEncoder Use the encoder attached to the data port of the spark max for a quadrature encoder. + */ + public SparkMaxBrushedMotorSwerve(CANSparkMax motor, boolean isDriveMotor, Type encoderType, int countsPerRevolution, + boolean useDataPortQuadEncoder) + { + // Drive motors **MUST** have an encoder attached. + if (isDriveMotor && encoderType == Type.kNoSensor) + { + DriverStation.reportError("Cannot use motor without encoder.", true); + throw new RuntimeException("Cannot use SparkMAX as a drive motor without an encoder attached."); + } + + // Hall encoders can be used as quadrature encoders. + if (encoderType == Type.kHallSensor) + { + encoderType = Type.kQuadrature; + } + + this.motor = motor; + this.isDriveMotor = isDriveMotor; + + factoryDefaults(); + clearStickyFaults(); + + // Get the onboard PID controller. + pid = motor.getPIDController(); + + // If there is a sensor attached to the data port or encoder port set the relative encoder. + if (isDriveMotor || (encoderType != Type.kNoSensor || useDataPortQuadEncoder)) + { + this.encoder = useDataPortQuadEncoder ? + motor.getAlternateEncoder(SparkMaxAlternateEncoder.Type.kQuadrature, countsPerRevolution) : + motor.getEncoder(encoderType, countsPerRevolution); + + // Configure feedback of the PID controller as the integrated encoder. + pid.setFeedbackDevice(encoder); + } + + motor.setCANTimeout(0); // Spin off configurations in a different thread. + } + + /** + * Initialize the {@link SwerveMotor} as a {@link CANSparkMax} connected to a Brushless Motor. + * + * @param id CAN ID of the SparkMax. + * @param isDriveMotor Is the motor being initialized a drive motor? + * @param encoderType {@link Type} of encoder to use for the {@link CANSparkMax} device. + * @param countsPerRevolution The number of encoder pulses for the {@link Type} encoder per revolution. + * @param useDataPortQuadEncoder Use the encoder attached to the data port of the spark max for a quadrature encoder. + */ + public SparkMaxBrushedMotorSwerve(int id, boolean isDriveMotor, Type encoderType, int countsPerRevolution, + boolean useDataPortQuadEncoder) + { + this(new CANSparkMax(id, MotorType.kBrushed), isDriveMotor, encoderType, countsPerRevolution, + useDataPortQuadEncoder); + } + + /** + * Set the voltage compensation for the swerve module motor. + * + * @param nominalVoltage Nominal voltage for operation to output to. + */ + @Override + public void setVoltageCompensation(double nominalVoltage) + { + motor.enableVoltageCompensation(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. + */ + @Override + public void setCurrentLimit(int currentLimit) + { + motor.setSmartCurrentLimit(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) + { + motor.setOpenLoopRampRate(rampRate); + motor.setClosedLoopRampRate(rampRate); + } + + /** + * Get the motor object from the module. + * + * @return Motor object. + */ + @Override + public Object getMotor() + { + return motor; + } + + /** + * Queries whether the absolute encoder is directly attached to the motor controller. + * + * @return connected absolute encoder state. + */ + @Override + public boolean isAttachedAbsoluteEncoder() + { + return absoluteEncoder != null; + } + + /** + * Configure the factory defaults. + */ + @Override + public void factoryDefaults() + { + if (!factoryDefaultOccurred) + { + motor.restoreFactoryDefaults(); + factoryDefaultOccurred = true; + } + } + + /** + * Clear the sticky faults on the motor controller. + */ + @Override + public void clearStickyFaults() + { + motor.clearFaults(); + } + + /** + * Set the absolute encoder to be a compatible absolute encoder. + * + * @param encoder The encoder to use. + * @return The {@link SwerveMotor} for easy instantiation. + */ + @Override + public SwerveMotor setAbsoluteEncoder(SwerveAbsoluteEncoder encoder) + { + if (encoder.getAbsoluteEncoder() instanceof AbsoluteEncoder) + { + absoluteEncoder = (AbsoluteEncoder) encoder.getAbsoluteEncoder(); + pid.setFeedbackDevice(absoluteEncoder); + } + if (absoluteEncoder == null && this.encoder == null) + { + DriverStation.reportError("An encoder MUST be defined to work with a SparkMAX", true); + throw new RuntimeException("An encoder MUST be defined to work with a SparkMAX"); + } + return this; + } + + /** + * Configure the integrated encoder for the swerve module. Sets the conversion factors for position and velocity. + * + * @param positionConversionFactor The conversion factor to apply. + */ + @Override + public void configureIntegratedEncoder(double positionConversionFactor) + { + if (absoluteEncoder == null) + { + encoder.setPositionConversionFactor(positionConversionFactor); + encoder.setVelocityConversionFactor(positionConversionFactor / 60); + + // Taken from + // https://github.com/frc3512/SwerveBot-2022/blob/9d31afd05df6c630d5acb4ec2cf5d734c9093bf8/src/main/java/frc/lib/util/CANSparkMaxUtil.java#L67 + configureCANStatusFrames(10, 20, 20, 500, 500); + } else + { + absoluteEncoder.setPositionConversionFactor(positionConversionFactor); + absoluteEncoder.setVelocityConversionFactor(positionConversionFactor / 60); + } + } + + /** + * Configure the PIDF values for the closed loop controller. + * + * @param config Configuration class holding the PIDF values. + */ + @Override + public void configurePIDF(PIDFConfig config) + { + int pidSlot = + isDriveMotor ? SparkMAX_slotIdx.Velocity.ordinal() : SparkMAX_slotIdx.Position.ordinal(); + pid.setP(config.p, pidSlot); + pid.setI(config.i, pidSlot); + pid.setD(config.d, pidSlot); + pid.setFF(config.f, pidSlot); + pid.setIZone(config.iz, pidSlot); + pid.setOutputRange(config.output.min, config.output.max, pidSlot); + } + + /** + * 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) + { + pid.setPositionPIDWrappingEnabled(true); + pid.setPositionPIDWrappingMinInput(minInput); + pid.setPositionPIDWrappingMaxInput(maxInput); + } + + /** + * Set the CAN status frames. + * + * @param CANStatus0 Applied Output, Faults, Sticky Faults, Is Follower + * @param CANStatus1 Motor Velocity, Motor Temperature, Motor Voltage, Motor Current + * @param CANStatus2 Motor Position + * @param CANStatus3 Analog Sensor Voltage, Analog Sensor Velocity, Analog Sensor Position + * @param CANStatus4 Alternate Encoder Velocity, Alternate Encoder Position + */ + public void configureCANStatusFrames( + int CANStatus0, int CANStatus1, int CANStatus2, int CANStatus3, int CANStatus4) + { + motor.setPeriodicFramePeriod(PeriodicFrame.kStatus0, CANStatus0); + motor.setPeriodicFramePeriod(PeriodicFrame.kStatus1, CANStatus1); + motor.setPeriodicFramePeriod(PeriodicFrame.kStatus2, CANStatus2); + motor.setPeriodicFramePeriod(PeriodicFrame.kStatus3, CANStatus3); + motor.setPeriodicFramePeriod(PeriodicFrame.kStatus4, CANStatus4); + // TODO: Configure Status Frame 5 and 6 if necessary + // https://docs.revrobotics.com/sparkmax/operating-modes/control-interfaces + } + + /** + * Set the idle mode. + * + * @param isBrakeMode Set the brake mode. + */ + @Override + public void setMotorBrake(boolean isBrakeMode) + { + motor.setIdleMode(isBrakeMode ? IdleMode.kBrake : IdleMode.kCoast); + } + + /** + * Set the motor to be inverted. + * + * @param inverted State of inversion. + */ + @Override + public void setInverted(boolean inverted) + { + motor.setInverted(inverted); + } + + /** + * Save the configurations from flash to EEPROM. + */ + @Override + public void burnFlash() + { + motor.burnFlash(); + } + + /** + * 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) + { + int pidSlot = + isDriveMotor ? SparkMAX_slotIdx.Velocity.ordinal() : SparkMAX_slotIdx.Position.ordinal(); + pid.setReference( + setpoint, + isDriveMotor ? ControlType.kVelocity : ControlType.kPosition, + pidSlot, + feedforward); + } + + /** + * Get the velocity of the integrated encoder. + * + * @return velocity + */ + @Override + public double getVelocity() + { + return absoluteEncoder == null ? encoder.getVelocity() : absoluteEncoder.getVelocity(); + } + + /** + * Get the position of the integrated encoder. + * + * @return Position + */ + @Override + public double getPosition() + { + return absoluteEncoder == null ? encoder.getPosition() : absoluteEncoder.getPosition(); + } + + /** + * Set the integrated encoder position. + * + * @param position Integrated encoder position. + */ + @Override + public void setPosition(double position) + { + if (absoluteEncoder == null) + { + encoder.setPosition(position); + } + } +} diff --git a/swervelib/motors/TalonFXSwerve.java b/swervelib/motors/TalonFXSwerve.java index 8e231ff..21c975e 100644 --- a/swervelib/motors/TalonFXSwerve.java +++ b/swervelib/motors/TalonFXSwerve.java @@ -6,10 +6,10 @@ import com.ctre.phoenix.motorcontrol.NeutralMode; import com.ctre.phoenix.motorcontrol.StatusFrameEnhanced; import com.ctre.phoenix.motorcontrol.can.TalonFXConfiguration; import com.ctre.phoenix.motorcontrol.can.WPI_TalonFX; -import edu.wpi.first.wpilibj.RobotBase; import swervelib.encoders.SwerveAbsoluteEncoder; import swervelib.parser.PIDFConfig; import swervelib.simulation.ctre.PhysicsSim; +import swervelib.telemetry.SwerveDriveTelemetry; /** * {@link com.ctre.phoenix.motorcontrol.can.TalonFX} Swerve Motor. Made by Team 1466 WebbRobotics. @@ -60,7 +60,7 @@ public class TalonFXSwerve extends SwerveMotor factoryDefaults(); clearStickyFaults(); - if (RobotBase.isSimulation()) + if (SwerveDriveTelemetry.isSimulation) { PhysicsSim.getInstance().addTalonFX(motor, .25, 6800); } @@ -247,7 +247,7 @@ public class TalonFXSwerve extends SwerveMotor { double lowerBound; double upperBound; - double lowerOffset = scopeReference % 360; + double lowerOffset = Math.IEEEremainder(scopeReference, 360); // Create the interval from the reference angle. if (lowerOffset >= 0) @@ -301,7 +301,7 @@ public class TalonFXSwerve extends SwerveMotor @Override public void setReference(double setpoint, double feedforward) { - if (RobotBase.isSimulation()) + if (SwerveDriveTelemetry.isSimulation) { PhysicsSim.getInstance().run(); } @@ -346,7 +346,7 @@ public class TalonFXSwerve extends SwerveMotor @Override public void setPosition(double position) { - if (!absoluteEncoder && !RobotBase.isSimulation()) + if (!absoluteEncoder && !SwerveDriveTelemetry.isSimulation) { motor.setSelectedSensorPosition(position / positionConversionFactor, 0, 250); } diff --git a/swervelib/motors/TalonSRXSwerve.java b/swervelib/motors/TalonSRXSwerve.java index 59a5056..013e3f8 100644 --- a/swervelib/motors/TalonSRXSwerve.java +++ b/swervelib/motors/TalonSRXSwerve.java @@ -6,9 +6,9 @@ import com.ctre.phoenix.motorcontrol.FeedbackDevice; import com.ctre.phoenix.motorcontrol.NeutralMode; import com.ctre.phoenix.motorcontrol.SupplyCurrentLimitConfiguration; import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX; -import edu.wpi.first.wpilibj.RobotBase; import swervelib.encoders.SwerveAbsoluteEncoder; import swervelib.parser.PIDFConfig; +import swervelib.telemetry.SwerveDriveTelemetry; /** * {@link com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX} Swerve Motor. @@ -234,7 +234,7 @@ public class TalonSRXSwerve extends SwerveMotor @Override public void setPosition(double position) { - if (!absoluteEncoder && !RobotBase.isSimulation()) + if (!absoluteEncoder && !SwerveDriveTelemetry.isSimulation) { motor.setSelectedSensorPosition(convertToNativeSensorUnits(position)); } diff --git a/swervelib/parser/json/DeviceJson.java b/swervelib/parser/json/DeviceJson.java index 9923a6b..52d6ba0 100644 --- a/swervelib/parser/json/DeviceJson.java +++ b/swervelib/parser/json/DeviceJson.java @@ -1,5 +1,6 @@ package swervelib.parser.json; +import com.revrobotics.SparkMaxRelativeEncoder.Type; import edu.wpi.first.wpilibj.SerialPort.Port; import swervelib.encoders.AnalogAbsoluteEncoderSwerve; import swervelib.encoders.CANCoderSwerve; @@ -13,6 +14,7 @@ import swervelib.imu.NavXSwerve; import swervelib.imu.Pigeon2Swerve; import swervelib.imu.PigeonSwerve; import swervelib.imu.SwerveIMU; +import swervelib.motors.SparkMaxBrushedMotorSwerve; import swervelib.motors.SparkMaxSwerve; import swervelib.motors.SwerveMotor; import swervelib.motors.TalonFXSwerve; @@ -105,6 +107,30 @@ public class DeviceJson { switch (type) { + case "sparkmax_brushed": + switch (canbus) + { + case "greyhill_63r256": + return new SparkMaxBrushedMotorSwerve(id, isDriveMotor, Type.kQuadrature, 1024, false); + case "srx_mag_encoder": + return new SparkMaxBrushedMotorSwerve(id, isDriveMotor, Type.kQuadrature, 4096, false); + case "throughbore": + return new SparkMaxBrushedMotorSwerve(id, isDriveMotor, Type.kQuadrature, 8192, false); + case "throughbore_dataport": + return new SparkMaxBrushedMotorSwerve(id, isDriveMotor, Type.kNoSensor, 8192, true); + case "greyhill_63r256_dataport": + return new SparkMaxBrushedMotorSwerve(id, isDriveMotor, Type.kQuadrature, 1024, true); + case "srx_mag_encoder_dataport": + return new SparkMaxBrushedMotorSwerve(id, isDriveMotor, Type.kQuadrature, 4096, true); + default: + if (isDriveMotor) + { + throw new RuntimeException("Spark MAX " + id + " MUST have a encoder attached to the motor controller."); + } + // We are creating a motor for an angle motor which will use the absolute encoder attached to the data port. + return new SparkMaxBrushedMotorSwerve(id, isDriveMotor, Type.kNoSensor, 0, false); + } + case "neo": case "sparkmax": return new SparkMaxSwerve(id, isDriveMotor); case "falcon": diff --git a/swervelib/simulation/ctre/PhysicsSim.java b/swervelib/simulation/ctre/PhysicsSim.java index 1b9122d..189e49c 100644 --- a/swervelib/simulation/ctre/PhysicsSim.java +++ b/swervelib/simulation/ctre/PhysicsSim.java @@ -11,8 +11,8 @@ import java.util.ArrayList; public class PhysicsSim { - private static final PhysicsSim sim = new PhysicsSim(); - private final ArrayList _simProfiles = new ArrayList(); + private static PhysicsSim sim; + private final ArrayList _simProfiles = new ArrayList(); /** * Gets the robot simulator instance. @@ -21,6 +21,10 @@ public class PhysicsSim */ public static PhysicsSim getInstance() { + if (sim == null) + { + sim = new PhysicsSim(); + } return sim; } diff --git a/swervelib/telemetry/SwerveDriveTelemetry.java b/swervelib/telemetry/SwerveDriveTelemetry.java index c5ed414..7c1f546 100644 --- a/swervelib/telemetry/SwerveDriveTelemetry.java +++ b/swervelib/telemetry/SwerveDriveTelemetry.java @@ -1,5 +1,6 @@ package swervelib.telemetry; +import edu.wpi.first.wpilibj.RobotBase; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; /** @@ -9,60 +10,68 @@ public class SwerveDriveTelemetry { /** - * The number of swerve modules + * The current telemetry verbosity level. */ - public static int moduleCount; + public static TelemetryVerbosity verbosity = TelemetryVerbosity.MACHINE; + /** + * State of simulation of the Robot, used to optimize retrieval. + */ + public static boolean isSimulation = RobotBase.isSimulation(); /** * The number of swerve modules */ - public static double[] wheelLocations; + public static int moduleCount; + /** + * The number of swerve modules + */ + public static double[] wheelLocations; /** * An array of rotation and velocity values describing the measured state of each swerve module */ - public static double[] measuredStates; + public static double[] measuredStates; /** * An array of rotation and velocity values describing the desired state of each swerve module */ - public static double[] desiredStates; + public static double[] desiredStates; /** * The robot's current rotation based on odometry or gyro readings */ - public static double robotRotation = 0; + public static double robotRotation = 0; /** * The maximum achievable speed of the modules, used to adjust the size of the vectors. */ - public static double maxSpeed; + public static double maxSpeed; /** * The units of the module rotations and robot rotation */ - public static String rotationUnit = "degrees"; + public static String rotationUnit = "degrees"; /** * The distance between the left and right modules. */ - public static double sizeLeftRight; + public static double sizeLeftRight; /** * The distance between the front and back modules. */ - public static double sizeFrontBack; + public static double sizeFrontBack; /** * The direction the robot should be facing when the "Robot Rotation" is zero or blank. This option is often useful to * align with odometry data or match videos. 'up', 'right', 'down' or 'left' */ - public static String forwardDirection = "up"; + public static String forwardDirection = "up"; /** * The maximum achievable angular velocity of the robot. This is used to visualize the angular velocity from the * chassis speeds properties. */ - public static double maxAngularVelocity; + public static double maxAngularVelocity; /** * The maximum achievable angular velocity of the robot. This is used to visualize the angular velocity from the * chassis speeds properties. */ - public static double[] measuredChassisSpeeds = new double[3]; + public static double[] measuredChassisSpeeds = new double[3]; /** * Describes the desired forward, sideways and angular velocity of the robot. */ - public static double[] desiredChassisSpeeds = new double[3]; + public static double[] desiredChassisSpeeds = new double[3]; /** * Upload data to smartdashboard @@ -83,4 +92,27 @@ public class SwerveDriveTelemetry SmartDashboard.putNumberArray("swerve/measuredChassisSpeeds", measuredChassisSpeeds); SmartDashboard.putNumberArray("swerve/desiredChassisSpeeds", desiredChassisSpeeds); } + + /** + * Verbosity of telemetry data sent back. + */ + public enum TelemetryVerbosity + { + /** + * No telemetry data is sent back. + */ + NONE, + /** + * Low telemetry data, only post the robot position on the field. + */ + LOW, + /** + * Full swerve drive data is sent back in both human and machine readable forms. + */ + HIGH, + /** + * Only send the machine readable data related to swerve drive. + */ + MACHINE + } }