From e8f6ca3659f2f125f6be19903e96384797e77d13 Mon Sep 17 00:00:00 2001 From: thenetworkgrinch Date: Wed, 15 Feb 2023 22:18:27 -0600 Subject: [PATCH] Updated docs, renamed SwerveDrive lock function and setBrake function --- docs/allclasses-index.html | 44 ++- docs/allpackages-index.html | 4 +- docs/constant-values.html | 2 +- docs/element-list | 1 + docs/help-doc.html | 2 +- docs/index-files/index-1.html | 48 ++- docs/index-files/index-10.html | 2 +- docs/index-files/index-11.html | 14 +- docs/index-files/index-12.html | 6 +- docs/index-files/index-13.html | 2 +- docs/index-files/index-14.html | 6 +- docs/index-files/index-15.html | 2 +- docs/index-files/index-16.html | 2 +- docs/index-files/index-17.html | 60 +++- docs/index-files/index-18.html | 10 +- docs/index-files/index-19.html | 11 +- docs/index-files/index-2.html | 2 +- docs/index-files/index-20.html | 2 +- docs/index-files/index-21.html | 2 +- docs/index-files/index-22.html | 2 +- docs/index-files/index-23.html | 18 +- docs/index-files/index-24.html | 2 +- docs/index-files/index-3.html | 18 +- docs/index-files/index-4.html | 6 +- docs/index-files/index-5.html | 2 +- docs/index-files/index-6.html | 26 +- docs/index-files/index-7.html | 64 +++- docs/index-files/index-8.html | 2 +- docs/index-files/index-9.html | 14 +- docs/index.html | 4 +- docs/member-search-index.js | 2 +- docs/overview-summary.html | 2 +- docs/overview-tree.html | 11 +- docs/package-search-index.js | 2 +- docs/swervelib/SwerveController.html | 2 +- docs/swervelib/SwerveDrive.html | 156 +++++---- docs/swervelib/SwerveModule.html | 118 ++----- docs/swervelib/encoders/CANCoderSwerve.html | 2 +- .../encoders/SparkMaxEncoderSwerve.html | 2 +- .../encoders/SwerveAbsoluteEncoder.html | 2 +- docs/swervelib/encoders/package-summary.html | 4 +- docs/swervelib/encoders/package-tree.html | 2 +- docs/swervelib/imu/ADIS16448Swerve.html | 285 ++++++++++++++++ docs/swervelib/imu/ADIS16470Swerve.html | 285 ++++++++++++++++ docs/swervelib/imu/ADXRS450Swerve.html | 285 ++++++++++++++++ docs/swervelib/imu/AnalogGyroSwerve.html | 289 ++++++++++++++++ docs/swervelib/imu/NavXSwerve.html | 2 +- docs/swervelib/imu/Pigeon2Swerve.html | 2 +- docs/swervelib/imu/PigeonSwerve.html | 2 +- docs/swervelib/imu/SwerveIMU.html | 4 +- docs/swervelib/imu/package-summary.html | 20 +- docs/swervelib/imu/package-tree.html | 6 +- docs/swervelib/math/SwerveKinematics2.html | 2 +- docs/swervelib/math/SwerveMath.html | 7 +- docs/swervelib/math/SwerveModuleState2.html | 2 +- docs/swervelib/math/package-summary.html | 4 +- docs/swervelib/math/package-tree.html | 2 +- .../SparkMaxSwerve.SparkMAX_slotIdx.html | 2 +- docs/swervelib/motors/SparkMaxSwerve.html | 2 +- docs/swervelib/motors/SwerveMotor.html | 2 +- docs/swervelib/motors/TalonFXSwerve.html | 2 +- .../motors/TalonSRXSwerve.CTRE_pidIdx.html | 2 +- .../TalonSRXSwerve.CTRE_remoteSensor.html | 2 +- .../motors/TalonSRXSwerve.CTRE_slotIdx.html | 2 +- docs/swervelib/motors/TalonSRXSwerve.html | 2 +- docs/swervelib/motors/package-summary.html | 4 +- docs/swervelib/motors/package-tree.html | 2 +- docs/swervelib/package-summary.html | 4 +- docs/swervelib/package-tree.html | 2 +- docs/swervelib/parser/PIDFConfig.html | 2 +- .../parser/SwerveControllerConfiguration.html | 2 +- .../parser/SwerveDriveConfiguration.html | 2 +- .../parser/SwerveModuleConfiguration.html | 2 +- .../SwerveModulePhysicalCharacteristics.html | 2 +- docs/swervelib/parser/SwerveParser.html | 2 +- .../parser/deserializer/PIDFRange.html | 2 +- .../parser/deserializer/package-summary.html | 2 +- .../parser/deserializer/package-tree.html | 2 +- .../parser/json/ControllerPropertiesJson.html | 2 +- docs/swervelib/parser/json/DeviceJson.html | 2 +- docs/swervelib/parser/json/ModuleJson.html | 2 +- .../parser/json/MotorConfigDouble.html | 2 +- .../swervelib/parser/json/MotorConfigInt.html | 2 +- .../parser/json/PIDFPropertiesJson.html | 2 +- .../parser/json/PhysicalPropertiesJson.html | 2 +- .../parser/json/SwerveDriveJson.html | 2 +- .../parser/json/modules/BoolMotorJson.html | 2 +- .../parser/json/modules/LocationJson.html | 2 +- .../parser/json/modules/package-summary.html | 2 +- .../parser/json/modules/package-tree.html | 2 +- .../parser/json/package-summary.html | 2 +- docs/swervelib/parser/json/package-tree.html | 2 +- docs/swervelib/parser/package-summary.html | 4 +- docs/swervelib/parser/package-tree.html | 2 +- .../simulation/SwerveIMUSimulation.html | 316 ++++++++++++++++++ .../simulation/SwerveModuleSimulation.html | 294 ++++++++++++++++ .../swervelib/simulation/package-summary.html | 109 ++++++ docs/swervelib/simulation/package-tree.html | 72 ++++ docs/type-search-index.js | 2 +- swervelib/SwerveDrive.java | 103 ++++-- swervelib/SwerveModule.java | 43 +-- swervelib/imu/ADIS16448Swerve.java | 84 +++++ swervelib/imu/ADIS16470Swerve.java | 83 +++++ swervelib/imu/ADXRS450Swerve.java | 84 +++++ swervelib/imu/AnalogGyroSwerve.java | 89 +++++ swervelib/imu/NavXSwerve.java | 13 +- swervelib/math/SwerveMath.java | 6 +- swervelib/motors/TalonFXSwerve.java | 4 +- swervelib/parser/json/DeviceJson.java | 12 + swervelib/simulation/SwerveIMUSimulation.java | 106 ++++++ .../simulation/SwerveModuleSimulation.java | 88 +++++ 111 files changed, 3086 insertions(+), 384 deletions(-) create mode 100644 docs/swervelib/imu/ADIS16448Swerve.html create mode 100644 docs/swervelib/imu/ADIS16470Swerve.html create mode 100644 docs/swervelib/imu/ADXRS450Swerve.html create mode 100644 docs/swervelib/imu/AnalogGyroSwerve.html create mode 100644 docs/swervelib/simulation/SwerveIMUSimulation.html create mode 100644 docs/swervelib/simulation/SwerveModuleSimulation.html create mode 100644 docs/swervelib/simulation/package-summary.html create mode 100644 docs/swervelib/simulation/package-tree.html create mode 100644 swervelib/imu/ADIS16448Swerve.java create mode 100644 swervelib/imu/ADIS16470Swerve.java create mode 100644 swervelib/imu/ADXRS450Swerve.java create mode 100644 swervelib/imu/AnalogGyroSwerve.java create mode 100644 swervelib/simulation/SwerveIMUSimulation.java create mode 100644 swervelib/simulation/SwerveModuleSimulation.java diff --git a/docs/allclasses-index.html b/docs/allclasses-index.html index 8e266b7..36bc1e3 100644 --- a/docs/allclasses-index.html +++ b/docs/allclasses-index.html @@ -1,7 +1,7 @@ - + All Classes and Interfaces @@ -60,6 +60,22 @@ loadScripts(document, 'script');
Class
Description
+ +
+
IMU Swerve class for the ADIS16448_IMU device.
+
+ +
+
IMU Swerve class for the ADIS16470_IMU device.
+
+ +
+
IMU Swerve class for the ADXRS450_Gyro device.
+
+ +
+
Creates a IMU for AnalogGyro devices, only uses yaw.
+
Inverted motor JSON parsed class.
@@ -160,27 +176,35 @@ loadScripts(document, 'script');
Swerve IMU abstraction to define a standard interface with a swerve drive.
- +
+
Simulation for SwerveDrive IMU.
+
+ +
Clone of WPI SwerveKinematics, which implements second order kinematics when calculating modules states from chassis speed.
- -
+ +
Mathematical functions which pertain to swerve drive.
- -
+ +
The Swerve Module class which represents and controls Swerve Modules for the swerve drive.
- -
+ +
Swerve Module configuration class which is used to configure SwerveModule.
- -
+ +
Configuration class which stores physical characteristics shared between every swerve module.
+ +
+
Class to hold simulation data for SwerveModule
+
Second order kinematics swerve module state.
diff --git a/docs/allpackages-index.html b/docs/allpackages-index.html index 4d5d7e6..b7af180 100644 --- a/docs/allpackages-index.html +++ b/docs/allpackages-index.html @@ -1,7 +1,7 @@ - + All Packages @@ -72,6 +72,8 @@ loadScripts(document, 'script');
 
 
+ +
 
diff --git a/docs/constant-values.html b/docs/constant-values.html index 12911a5..588a90a 100644 --- a/docs/constant-values.html +++ b/docs/constant-values.html @@ -1,7 +1,7 @@ - + Constant Field Values diff --git a/docs/element-list b/docs/element-list index 03f6719..f9425ee 100644 --- a/docs/element-list +++ b/docs/element-list @@ -7,3 +7,4 @@ swervelib.parser swervelib.parser.deserializer swervelib.parser.json swervelib.parser.json.modules +swervelib.simulation diff --git a/docs/help-doc.html b/docs/help-doc.html index ba5c5a3..1d91b4c 100644 --- a/docs/help-doc.html +++ b/docs/help-doc.html @@ -1,7 +1,7 @@ - + API Help diff --git a/docs/index-files/index-1.html b/docs/index-files/index-1.html index e7fd7d5..0cb44e9 100644 --- a/docs/index-files/index-1.html +++ b/docs/index-files/index-1.html @@ -1,7 +1,7 @@ - + A-Index @@ -85,10 +85,42 @@ loadScripts(document, 'script');
Absolute encoder offset from 0 in degrees.
-
addVisionMeasurement(Pose2d, double) - Method in class swervelib.SwerveDrive
+
addVisionMeasurement(Pose2d, double, boolean) - Method in class swervelib.SwerveDrive
-
Add a vision measurement to the SwerveDrivePoseEstimator with the given timestamp of the vision - measurement.
+
Add a vision measurement to the SwerveDrivePoseEstimator and update the SwerveIMU gyro reading with + the given timestamp of the vision measurement.
+
+
ADIS16448Swerve - Class in swervelib.imu
+
+
IMU Swerve class for the ADIS16448_IMU device.
+
+
ADIS16448Swerve() - Constructor for class swervelib.imu.ADIS16448Swerve
+
+
Construct the ADIS16448 imu and reset default configurations.
+
+
ADIS16470Swerve - Class in swervelib.imu
+
+
IMU Swerve class for the ADIS16470_IMU device.
+
+
ADIS16470Swerve() - Constructor for class swervelib.imu.ADIS16470Swerve
+
+
Construct the ADIS16470 imu and reset default configurations.
+
+
ADXRS450Swerve - Class in swervelib.imu
+
+
IMU Swerve class for the ADXRS450_Gyro device.
+
+
ADXRS450Swerve() - Constructor for class swervelib.imu.ADXRS450Swerve
+
+
Construct the ADXRS450 imu and reset default configurations.
+
+
AnalogGyroSwerve - Class in swervelib.imu
+
+
Creates a IMU for AnalogGyro devices, only uses yaw.
+
+
AnalogGyroSwerve(int) - Constructor for class swervelib.imu.AnalogGyroSwerve
+
+
Analog port in which the gyroscope is connected.
angle - Variable in class swervelib.math.SwerveModuleState2
@@ -114,13 +146,9 @@ loadScripts(document, 'script');
The PIDF with Integral Zone used for the angle motor.
-
angle - Variable in class swervelib.SwerveDrive
+
angle - Variable in class swervelib.simulation.SwerveIMUSimulation
-
The current angle of the robot and last time odometry during simulations.
-
-
angle - Variable in class swervelib.SwerveModule
-
-
Current state.
+
Heading of the robot.
angleEncoderPulsePerRotation - Variable in class swervelib.parser.SwerveModulePhysicalCharacteristics
diff --git a/docs/index-files/index-10.html b/docs/index-files/index-10.html index 0c511d7..dd3d9cd 100644 --- a/docs/index-files/index-10.html +++ b/docs/index-files/index-10.html @@ -1,7 +1,7 @@ - + K-Index diff --git a/docs/index-files/index-11.html b/docs/index-files/index-11.html index 9d9d966..ec3d240 100644 --- a/docs/index-files/index-11.html +++ b/docs/index-files/index-11.html @@ -1,7 +1,7 @@ - + L-Index @@ -61,13 +61,13 @@ loadScripts(document, 'script');
Last angle set for the swerve module.
-
lastTime - Variable in class swervelib.SwerveDrive
+
lastTime - Variable in class swervelib.simulation.SwerveIMUSimulation
-
The current angle of the robot and last time odometry during simulations.
+
The last time the timer was read, used to determine position changes.
-
lastTime - Variable in class swervelib.SwerveModule
+
lastTime - Variable in class swervelib.simulation.SwerveModuleSimulation
-
Current state.
+
Last time queried.
limitVelocity(Translation2d, ChassisSpeeds, Pose2d, double, double, double, Translation3d, SwerveDriveConfiguration) - Static method in class swervelib.math.SwerveMath
@@ -84,6 +84,10 @@ loadScripts(document, 'script');
LocationJson() - Constructor for class swervelib.parser.json.modules.LocationJson
 
+
lockPose() - Method in class swervelib.SwerveDrive
+
+
Point all modules toward the robot center, thus making the robot very difficult to move.
+
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 f686866..bb7d69a 100644 --- a/docs/index-files/index-12.html +++ b/docs/index-files/index-12.html @@ -1,7 +1,7 @@ - + M-Index @@ -143,6 +143,10 @@ loadScripts(document, 'script');
Swerve Modules.
+
moduleSynchronizationCounter - Variable in class swervelib.SwerveDrive
+
+
Counter to synchronize the modules relative encoder with absolute encoder when not moving.
+
MotionProfile - Enum constant in enum class swervelib.motors.TalonSRXSwerve.CTRE_slotIdx
Slot 3, meant for motion profiles.
diff --git a/docs/index-files/index-13.html b/docs/index-files/index-13.html index 5e19d61..856221b 100644 --- a/docs/index-files/index-13.html +++ b/docs/index-files/index-13.html @@ -1,7 +1,7 @@ - + N-Index diff --git a/docs/index-files/index-14.html b/docs/index-files/index-14.html index 405b54c..5ee9853 100644 --- a/docs/index-files/index-14.html +++ b/docs/index-files/index-14.html @@ -1,7 +1,7 @@ - + O-Index @@ -53,10 +53,6 @@ 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

O

-
omega - Variable in class swervelib.SwerveModule
-
-
Current state.
-
omegaRadPerSecond - Variable in class swervelib.math.SwerveModuleState2
Rad per sec
diff --git a/docs/index-files/index-15.html b/docs/index-files/index-15.html index 7a298d2..6cf224b 100644 --- a/docs/index-files/index-15.html +++ b/docs/index-files/index-15.html @@ -1,7 +1,7 @@ - + P-Index diff --git a/docs/index-files/index-16.html b/docs/index-files/index-16.html index 9f8ad12..078025c 100644 --- a/docs/index-files/index-16.html +++ b/docs/index-files/index-16.html @@ -1,7 +1,7 @@ - + R-Index diff --git a/docs/index-files/index-17.html b/docs/index-files/index-17.html index d1faf77..e4322c5 100644 --- a/docs/index-files/index-17.html +++ b/docs/index-files/index-17.html @@ -1,7 +1,7 @@ - + S-Index @@ -85,6 +85,10 @@ loadScripts(document, 'script');
Set the absolute encoder to be a compatible absolute encoder.
+
setAngle(double) - Method in class swervelib.simulation.SwerveIMUSimulation
+
+
Set the heading of the robot.
+
setAngle(double) - Method in class swervelib.SwerveModule
Set the angle for the module.
@@ -117,10 +121,6 @@ loadScripts(document, 'script');
Set the desired state of the swerve module.
-
setDriveBrake() - Method in class swervelib.SwerveDrive
-
-
Point all modules toward the robot center, thus making the robot very difficult to move.
-
setInverted(boolean) - Method in class swervelib.motors.SparkMaxSwerve
Set the motor to be inverted.
@@ -229,6 +229,22 @@ loadScripts(document, 'script');
Set the voltage compensation for the swerve module motor.
+
setYaw(double) - Method in class swervelib.imu.ADIS16448Swerve
+
+
Set the yaw in degrees.
+
+
setYaw(double) - Method in class swervelib.imu.ADIS16470Swerve
+
+
Set the yaw in degrees.
+
+
setYaw(double) - Method in class swervelib.imu.ADXRS450Swerve
+
+
Set the yaw in degrees.
+
+
setYaw(double) - Method in class swervelib.imu.AnalogGyroSwerve
+
+
Set the yaw in degrees.
+
setYaw(double) - Method in class swervelib.imu.NavXSwerve
Set the yaw in degrees.
@@ -245,6 +261,14 @@ loadScripts(document, 'script');
Set the yaw in degrees.
+
simIMU - Variable in class swervelib.SwerveDrive
+
+
Simulation of the swerve drive.
+
+
simModule - Variable in class swervelib.SwerveModule
+
+
Simulated swerve module.
+
Simulation - Enum constant in enum class swervelib.motors.SparkMaxSwerve.SparkMAX_slotIdx
Slot 3, used arbitrarily.
@@ -275,14 +299,14 @@ loadScripts(document, 'script');
REV Slots for PID configuration.
-
speed - Variable in class swervelib.SwerveModule
-
-
Current state.
-
speedMetersPerSecond - Variable in class swervelib.math.SwerveModuleState2
Swerve module speed in meters per second.
+
state - Variable in class swervelib.simulation.SwerveModuleSimulation
+
+
Current simulated swerve module state.
+
SwerveAbsoluteEncoder - Class in swervelib.encoders
Swerve abstraction class to define a standard interface with absolute encoders for swerve modules..
@@ -354,6 +378,14 @@ loadScripts(document, 'script');
SwerveIMU() - Constructor for class swervelib.imu.SwerveIMU
 
+
SwerveIMUSimulation - Class in swervelib.simulation
+
+
Simulation for SwerveDrive IMU.
+
+
SwerveIMUSimulation() - Constructor for class swervelib.simulation.SwerveIMUSimulation
+
+
Create the swerve drive IMU simulation.
+
SwerveKinematics2 - Class in swervelib.math
Clone of WPI SwerveKinematics, which implements second order kinematics when calculating modules states from chassis @@ -381,6 +413,8 @@ loadScripts(document, 'script');
 
swervelib.parser.json.modules - package swervelib.parser.json.modules
 
+
swervelib.simulation - package swervelib.simulation
+
 
SwerveMath - Class in swervelib.math
Mathematical functions which pertain to swerve drive.
@@ -423,6 +457,14 @@ loadScripts(document, 'script');
Swerve modules.
+
SwerveModuleSimulation - Class in swervelib.simulation
+
+
Class to hold simulation data for SwerveModule
+
+
SwerveModuleSimulation() - Constructor for class swervelib.simulation.SwerveModuleSimulation
+
+
Create simulation class and initialize module at 0.
+
SwerveModuleState2 - Class in swervelib.math
Second order kinematics swerve module state.
diff --git a/docs/index-files/index-18.html b/docs/index-files/index-18.html index 12e882a..b1a768f 100644 --- a/docs/index-files/index-18.html +++ b/docs/index-files/index-18.html @@ -1,7 +1,7 @@ - + T-Index @@ -101,13 +101,13 @@ loadScripts(document, 'script');
Third PID slot for talons.
-
time - Variable in class swervelib.SwerveModule
+
timer - Variable in class swervelib.simulation.SwerveIMUSimulation
-
Timer for simulation.
+
Main timer to control movement estimations.
-
timer - Variable in class swervelib.SwerveDrive
+
timer - Variable in class swervelib.simulation.SwerveModuleSimulation
-
Time during simulations.
+
Main timer to simulate the passage of time.
toChassisSpeeds(SwerveModuleState2...) - Method in class swervelib.math.SwerveKinematics2
diff --git a/docs/index-files/index-19.html b/docs/index-files/index-19.html index 31827c9..2229e0f 100644 --- a/docs/index-files/index-19.html +++ b/docs/index-files/index-19.html @@ -1,7 +1,7 @@ - + U-Index @@ -57,6 +57,15 @@ loadScripts(document, 'script');
Update odometry should be run every loop.
+
updateOdometry(SwerveKinematics2, SwerveModuleState2[], Pose2d[], Field2d) - Method in class swervelib.simulation.SwerveIMUSimulation
+
+
Update the odometry of the simulated SwerveDrive and post the SwerveModule + states to the Field2d.
+
+
updateStateAndPosition(SwerveModuleState2) - Method in class swervelib.simulation.SwerveModuleSimulation
+
+
Update the position and state of the module.
+
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-2.html b/docs/index-files/index-2.html index acd5817..480f432 100644 --- a/docs/index-files/index-2.html +++ b/docs/index-files/index-2.html @@ -1,7 +1,7 @@ - + B-Index diff --git a/docs/index-files/index-20.html b/docs/index-files/index-20.html index 9532bac..4b2c2a9 100644 --- a/docs/index-files/index-20.html +++ b/docs/index-files/index-20.html @@ -1,7 +1,7 @@ - + V-Index diff --git a/docs/index-files/index-21.html b/docs/index-files/index-21.html index 7683dd2..780bb36 100644 --- a/docs/index-files/index-21.html +++ b/docs/index-files/index-21.html @@ -1,7 +1,7 @@ - + W-Index diff --git a/docs/index-files/index-22.html b/docs/index-files/index-22.html index da4fa85..21540ea 100644 --- a/docs/index-files/index-22.html +++ b/docs/index-files/index-22.html @@ -1,7 +1,7 @@ - + X-Index diff --git a/docs/index-files/index-23.html b/docs/index-files/index-23.html index b6fea90..a7ed783 100644 --- a/docs/index-files/index-23.html +++ b/docs/index-files/index-23.html @@ -1,7 +1,7 @@ - + Y-Index @@ -57,6 +57,22 @@ loadScripts(document, 'script');
Location of the swerve module in inches from the center of the robot vertically.
+
yawOffset - Variable in class swervelib.imu.ADIS16448Swerve
+
+
Offset for the ADIS16448 yaw reading.
+
+
yawOffset - Variable in class swervelib.imu.ADIS16470Swerve
+
+
Offset for the ADIS16470 yaw reading.
+
+
yawOffset - Variable in class swervelib.imu.ADXRS450Swerve
+
+
Offset for the ADXRS450 yaw reading.
+
+
yawOffset - Variable in class swervelib.imu.AnalogGyroSwerve
+
+
The yaw offset for the gyroscope.
+
yawOffset - Variable in class swervelib.imu.NavXSwerve
Offset for the NavX yaw reading.
diff --git a/docs/index-files/index-24.html b/docs/index-files/index-24.html index 157f001..2fb80c7 100644 --- a/docs/index-files/index-24.html +++ b/docs/index-files/index-24.html @@ -1,7 +1,7 @@ - + Z-Index diff --git a/docs/index-files/index-3.html b/docs/index-files/index-3.html index 4db40ae..a0f6b92 100644 --- a/docs/index-files/index-3.html +++ b/docs/index-files/index-3.html @@ -1,7 +1,7 @@ - + C-Index @@ -113,6 +113,22 @@ loadScripts(document, 'script');
Clear sticky faults on the encoder.
+
clearStickyFaults() - Method in class swervelib.imu.ADIS16448Swerve
+
+
Clear sticky faults on IMU.
+
+
clearStickyFaults() - Method in class swervelib.imu.ADIS16470Swerve
+
+
Clear sticky faults on IMU.
+
+
clearStickyFaults() - Method in class swervelib.imu.ADXRS450Swerve
+
+
Clear sticky faults on IMU.
+
+
clearStickyFaults() - Method in class swervelib.imu.AnalogGyroSwerve
+
+
Clear sticky faults on IMU.
+
clearStickyFaults() - Method in class swervelib.imu.NavXSwerve
Clear sticky faults on IMU.
diff --git a/docs/index-files/index-4.html b/docs/index-files/index-4.html index 3e67787..6f9f310 100644 --- a/docs/index-files/index-4.html +++ b/docs/index-files/index-4.html @@ -1,7 +1,7 @@ - + D-Index @@ -128,9 +128,9 @@ loadScripts(document, 'script');
The time it takes for the motor to go from 0 to full throttle in seconds.
-
dt - Variable in class swervelib.SwerveModule
+
dt - Variable in class swervelib.simulation.SwerveModuleSimulation
-
Current state.
+
Time delta since last update
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-5.html b/docs/index-files/index-5.html index 4e50daa..60f0345 100644 --- a/docs/index-files/index-5.html +++ b/docs/index-files/index-5.html @@ -1,7 +1,7 @@ - + E-Index diff --git a/docs/index-files/index-6.html b/docs/index-files/index-6.html index 91a35f0..d23e5a4 100644 --- a/docs/index-files/index-6.html +++ b/docs/index-files/index-6.html @@ -1,7 +1,7 @@ - + F-Index @@ -69,6 +69,22 @@ loadScripts(document, 'script');
Reset the encoder to factory defaults.
+
factoryDefault() - Method in class swervelib.imu.ADIS16448Swerve
+
+
Reset IMU to factory default.
+
+
factoryDefault() - Method in class swervelib.imu.ADIS16470Swerve
+
+
Reset IMU to factory default.
+
+
factoryDefault() - Method in class swervelib.imu.ADXRS450Swerve
+
+
Reset IMU to factory default.
+
+
factoryDefault() - Method in class swervelib.imu.AnalogGyroSwerve
+
+
Reset IMU to factory default.
+
factoryDefault() - Method in class swervelib.imu.NavXSwerve
Reset IMU to factory default.
@@ -113,9 +129,13 @@ loadScripts(document, 'script');
Configure the factory defaults.
-
fakePos - Variable in class swervelib.SwerveModule
+
fakePos - Variable in class swervelib.simulation.SwerveModuleSimulation
-
Current state.
+
Fake motor position.
+
+
fakeSpeed - Variable in class swervelib.simulation.SwerveModuleSimulation
+
+
The fake speed of the previous state, used to calculate SwerveModuleSimulation.fakePos.
feedforward - Variable in class swervelib.SwerveModule
diff --git a/docs/index-files/index-7.html b/docs/index-files/index-7.html index 3d667fa..4c46444 100644 --- a/docs/index-files/index-7.html +++ b/docs/index-files/index-7.html @@ -1,7 +1,7 @@ - + G-Index @@ -89,9 +89,29 @@ loadScripts(document, 'script');
Gets the current field-relative velocity (x, y and omega) of the robot
+
getGyroRotation3d() - Method in class swervelib.simulation.SwerveIMUSimulation
+
+
Gets the estimated gyro Rotation3d of the robot.
+
getGyroRotation3d() - Method in class swervelib.SwerveDrive
-
Gets the current gyro Rotation3d of the robot, as reported by the imu.
+
Gets the current gyro Rotation3d of the robot, as reported by the imu.
+
+
getIMU() - Method in class swervelib.imu.ADIS16448Swerve
+
+
Get the instantiated IMU object.
+
+
getIMU() - Method in class swervelib.imu.ADIS16470Swerve
+
+
Get the instantiated IMU object.
+
+
getIMU() - Method in class swervelib.imu.ADXRS450Swerve
+
+
Get the instantiated IMU object.
+
+
getIMU() - Method in class swervelib.imu.AnalogGyroSwerve
+
+
Get the instantiated IMU object.
getIMU() - Method in class swervelib.imu.NavXSwerve
@@ -133,6 +153,10 @@ loadScripts(document, 'script');
Get the motor object from the module.
+
getPitch() - Method in class swervelib.simulation.SwerveIMUSimulation
+
+
Pitch is not simulated currently, always returns 0.
+
getPitch() - Method in class swervelib.SwerveDrive
Gets the current pitch angle of the robot, as reported by the imu.
@@ -157,6 +181,10 @@ loadScripts(document, 'script');
Get the position of the integrated encoder.
+
getPosition() - Method in class swervelib.simulation.SwerveModuleSimulation
+
+
Get the simulated swerve module position.
+
getPosition() - Method in class swervelib.SwerveModule
Get the position of the swerve module.
@@ -173,10 +201,18 @@ loadScripts(document, 'script');
Gets the current robot-relative velocity (x, y and omega) of the robot
+
getRoll() - Method in class swervelib.simulation.SwerveIMUSimulation
+
+
Roll is not simulated currently, always returns 0.
+
getRoll() - Method in class swervelib.SwerveDrive
Gets the current roll angle of the robot, as reported by the imu.
+
getState() - Method in class swervelib.simulation.SwerveModuleSimulation
+
+
Get the SwerveModuleState2 of the simulated module.
+
getState() - Method in class swervelib.SwerveModule
Get the Swerve Module state.
@@ -217,10 +253,30 @@ loadScripts(document, 'script');
Get the velocity of the integrated encoder.
+
getYaw() - Method in class swervelib.simulation.SwerveIMUSimulation
+
+
Get the estimated angle of the robot.
+
getYaw() - Method in class swervelib.SwerveDrive
Gets the current yaw angle of the robot, as reported by the imu.
+
getYawPitchRoll(double[]) - Method in class swervelib.imu.ADIS16448Swerve
+
+
Fetch the yaw/pitch/roll from the IMU.
+
+
getYawPitchRoll(double[]) - Method in class swervelib.imu.ADIS16470Swerve
+
+
Fetch the yaw/pitch/roll from the IMU.
+
+
getYawPitchRoll(double[]) - Method in class swervelib.imu.ADXRS450Swerve
+
+
Fetch the yaw/pitch/roll from the IMU.
+
+
getYawPitchRoll(double[]) - Method in class swervelib.imu.AnalogGyroSwerve
+
+
Fetch the yaw/pitch/roll from the IMU.
+
getYawPitchRoll(double[]) - Method in class swervelib.imu.NavXSwerve
Fetch the yaw/pitch/roll from the IMU.
@@ -237,6 +293,10 @@ loadScripts(document, 'script');
Fetch the yaw/pitch/roll from the IMU.
+
gyro - Variable in class swervelib.imu.AnalogGyroSwerve
+
+
Gyroscope object.
+
gyro - Variable in class swervelib.imu.NavXSwerve
NavX IMU.
diff --git a/docs/index-files/index-8.html b/docs/index-files/index-8.html index d625d26..a3a95b1 100644 --- a/docs/index-files/index-8.html +++ b/docs/index-files/index-8.html @@ -1,7 +1,7 @@ - + H-Index diff --git a/docs/index-files/index-9.html b/docs/index-files/index-9.html index 9134510..35cfc5b 100644 --- a/docs/index-files/index-9.html +++ b/docs/index-files/index-9.html @@ -1,7 +1,7 @@ - + I-Index @@ -61,6 +61,18 @@ loadScripts(document, 'script');
The CAN ID or pin ID of the device.
+
imu - Variable in class swervelib.imu.ADIS16448Swerve
+
+
ADIS16448_IMU device to read the current headings from.
+
+
imu - Variable in class swervelib.imu.ADIS16470Swerve
+
+
ADIS16470_IMU device to read the current headings from.
+
+
imu - Variable in class swervelib.imu.ADXRS450Swerve
+
+
ADXRS450_Gyro device to read the current headings from.
+
imu - Variable in class swervelib.imu.Pigeon2Swerve
Pigeon2 IMU device.
diff --git a/docs/index.html b/docs/index.html index 0190f34..36aadaf 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,7 +1,7 @@ - + Overview @@ -70,6 +70,8 @@ loadScripts(document, 'script');
 
 
+ +
 
diff --git a/docs/member-search-index.js b/docs/member-search-index.js index d0a13f0..6c5e45c 100644 --- a/docs/member-search-index.js +++ b/docs/member-search-index.js @@ -1 +1 @@ -memberSearchIndex = [{"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":"SwerveDrive","l":"addVisionMeasurement(Pose2d, double)","u":"addVisionMeasurement(edu.wpi.first.math.geometry.Pose2d,double)"},{"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","c":"SwerveDrive","l":"angle"},{"p":"swervelib","c":"SwerveModule","l":"angle"},{"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.parser","c":"SwerveModuleConfiguration","l":"angleMotor"},{"p":"swervelib","c":"SwerveModule","l":"angleMotor"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"angleMotorCurrentLimit"},{"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.motors","c":"TalonSRXSwerve.CTRE_pidIdx","l":"AUXILIARY_PID"},{"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":"CANCoderSwerve","l":"clearStickyFaults()"},{"p":"swervelib.encoders","c":"SparkMaxEncoderSwerve","l":"clearStickyFaults()"},{"p":"swervelib.encoders","c":"SwerveAbsoluteEncoder","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","c":"SwerveModule","l":"configuration"},{"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":"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.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.motors","c":"TalonSRXSwerve.CTRE_pidIdx","l":"CTRE_pidIdx()","u":"%3Cinit%3E()"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_remoteSensor","l":"CTRE_remoteSensor()","u":"%3Cinit%3E()"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_slotIdx","l":"CTRE_slotIdx()","u":"%3Cinit%3E()"},{"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.parser.json","c":"DeviceJson","l":"DeviceJson()","u":"%3Cinit%3E()"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_slotIdx","l":"Distance"},{"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","c":"SwerveModule","l":"dt"},{"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":"CANCoderSwerve","l":"factoryDefault()"},{"p":"swervelib.encoders","c":"SparkMaxEncoderSwerve","l":"factoryDefault()"},{"p":"swervelib.encoders","c":"SwerveAbsoluteEncoder","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","c":"SwerveModule","l":"fakePos"},{"p":"swervelib","c":"SwerveModule","l":"feedforward"},{"p":"swervelib","c":"SwerveDrive","l":"field"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_pidIdx","l":"FOURTH_PID"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"gearRatio"},{"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":"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","c":"SwerveDrive","l":"getGyroRotation3d()"},{"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.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","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","c":"SwerveModule","l":"getPosition()"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"getPositionEncoderConversion(boolean)"},{"p":"swervelib","c":"SwerveModule","l":"getRelativePosition()"},{"p":"swervelib","c":"SwerveDrive","l":"getRobotVelocity()"},{"p":"swervelib","c":"SwerveDrive","l":"getRoll()"},{"p":"swervelib","c":"SwerveModule","l":"getState()"},{"p":"swervelib","c":"SwerveDrive","l":"getStates()"},{"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","c":"SwerveDrive","l":"getYaw()"},{"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":"NavXSwerve","l":"gyro"},{"p":"swervelib.parser.json","c":"ControllerPropertiesJson","l":"heading"},{"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":"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.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":"SwerveController","l":"lastAngle"},{"p":"swervelib","c":"SwerveModule","l":"lastAngle"},{"p":"swervelib","c":"SwerveDrive","l":"lastTime"},{"p":"swervelib","c":"SwerveModule","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.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.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.parser.deserializer","c":"PIDFRange","l":"min"},{"p":"swervelib.parser","c":"SwerveParser","l":"moduleConfigs"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","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.motors","c":"TalonSRXSwerve.CTRE_slotIdx","l":"MotionProfile"},{"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()","u":"%3Cinit%3E()"},{"p":"swervelib","c":"SwerveModule","l":"omega"},{"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.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":"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.motors","c":"TalonSRXSwerve.CTRE_pidIdx","l":"PRIMARY_PID"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"rampRate"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_remoteSensor","l":"REMOTE_SENSOR_0"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_remoteSensor","l":"REMOTE_SENSOR_1"},{"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.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","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","c":"SwerveDrive","l":"setDriveBrake()"},{"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":"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.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"Simulation"},{"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","c":"SwerveModule","l":"speed"},{"p":"swervelib.math","c":"SwerveModuleState2","l":"speedMetersPerSecond"},{"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.imu","c":"SwerveIMU","l":"SwerveIMU()","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)","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)"},{"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.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.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.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.motors","c":"TalonSRXSwerve.CTRE_pidIdx","l":"THIRD_PID"},{"p":"swervelib","c":"SwerveModule","l":"time"},{"p":"swervelib","c":"SwerveDrive","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.motors","c":"TalonSRXSwerve.CTRE_slotIdx","l":"Turning"},{"p":"swervelib.parser.json","c":"DeviceJson","l":"type"},{"p":"swervelib","c":"SwerveDrive","l":"updateOdometry()"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_pidIdx","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_remoteSensor","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_slotIdx","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"values()"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_pidIdx","l":"values()"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_remoteSensor","l":"values()"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_slotIdx","l":"values()"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"Velocity"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_slotIdx","l":"Velocity"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"velocityPIDF"},{"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","c":"SwerveController","l":"withinHypotDeadband(double, double)","u":"withinHypotDeadband(double,double)"},{"p":"swervelib.parser.json.modules","c":"LocationJson","l":"x"},{"p":"swervelib.parser.json.modules","c":"LocationJson","l":"y"},{"p":"swervelib.imu","c":"NavXSwerve","l":"yawOffset"},{"p":"swervelib","c":"SwerveDrive","l":"zeroGyro()"}];updateSearchResults(); \ No newline at end of file +memberSearchIndex = [{"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":"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.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","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.parser","c":"SwerveModuleConfiguration","l":"angleMotor"},{"p":"swervelib","c":"SwerveModule","l":"angleMotor"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"angleMotorCurrentLimit"},{"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.motors","c":"TalonSRXSwerve.CTRE_pidIdx","l":"AUXILIARY_PID"},{"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":"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","c":"SwerveModule","l":"configuration"},{"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":"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.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.motors","c":"TalonSRXSwerve.CTRE_pidIdx","l":"CTRE_pidIdx()","u":"%3Cinit%3E()"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_remoteSensor","l":"CTRE_remoteSensor()","u":"%3Cinit%3E()"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_slotIdx","l":"CTRE_slotIdx()","u":"%3Cinit%3E()"},{"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.parser.json","c":"DeviceJson","l":"DeviceJson()","u":"%3Cinit%3E()"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_slotIdx","l":"Distance"},{"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":"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":"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.motors","c":"TalonSRXSwerve.CTRE_pidIdx","l":"FOURTH_PID"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"gearRatio"},{"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":"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.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","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","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","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.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.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":"SwerveController","l":"lastAngle"},{"p":"swervelib","c":"SwerveModule","l":"lastAngle"},{"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.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.parser.deserializer","c":"PIDFRange","l":"min"},{"p":"swervelib.parser","c":"SwerveParser","l":"moduleConfigs"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","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":"TalonSRXSwerve.CTRE_slotIdx","l":"MotionProfile"},{"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()","u":"%3Cinit%3E()"},{"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.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":"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.motors","c":"TalonSRXSwerve.CTRE_pidIdx","l":"PRIMARY_PID"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"rampRate"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_remoteSensor","l":"REMOTE_SENSOR_0"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_remoteSensor","l":"REMOTE_SENSOR_1"},{"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.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","c":"SwerveDrive","l":"simIMU"},{"p":"swervelib","c":"SwerveModule","l":"simModule"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"Simulation"},{"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.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)","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)"},{"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.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.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.motors","c":"TalonSRXSwerve.CTRE_pidIdx","l":"THIRD_PID"},{"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.motors","c":"TalonSRXSwerve.CTRE_slotIdx","l":"Turning"},{"p":"swervelib.parser.json","c":"DeviceJson","l":"type"},{"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":"TalonSRXSwerve.CTRE_pidIdx","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_remoteSensor","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_slotIdx","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"values()"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_pidIdx","l":"values()"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_remoteSensor","l":"values()"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_slotIdx","l":"values()"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"Velocity"},{"p":"swervelib.motors","c":"TalonSRXSwerve.CTRE_slotIdx","l":"Velocity"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"velocityPIDF"},{"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","c":"SwerveController","l":"withinHypotDeadband(double, double)","u":"withinHypotDeadband(double,double)"},{"p":"swervelib.parser.json.modules","c":"LocationJson","l":"x"},{"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":"SwerveDrive","l":"zeroGyro()"}];updateSearchResults(); \ No newline at end of file diff --git a/docs/overview-summary.html b/docs/overview-summary.html index 3037f91..b2e0cf7 100644 --- a/docs/overview-summary.html +++ b/docs/overview-summary.html @@ -1,7 +1,7 @@ - + Generated Documentation (Untitled) diff --git a/docs/overview-tree.html b/docs/overview-tree.html index 2beb521..0159156 100644 --- a/docs/overview-tree.html +++ b/docs/overview-tree.html @@ -1,7 +1,7 @@ - + Class Hierarchy @@ -59,7 +59,8 @@ loadScripts(document, 'script');
  • swervelib.parser,
  • swervelib.parser.deserializer,
  • swervelib.parser.json,
  • -
  • swervelib.parser.json.modules
  • +
  • swervelib.parser.json.modules,
  • +
  • swervelib.simulation
  • @@ -96,15 +97,21 @@ loadScripts(document, 'script');
  • swervelib.imu.SwerveIMU
  • +
  • swervelib.simulation.SwerveIMUSimulation
  • swervelib.math.SwerveMath
  • swervelib.SwerveModule
  • swervelib.parser.SwerveModuleConfiguration
  • swervelib.parser.SwerveModulePhysicalCharacteristics
  • +
  • swervelib.simulation.SwerveModuleSimulation
  • edu.wpi.first.math.kinematics.SwerveModuleState (implements java.lang.Comparable<T>)
    • swervelib.math.SwerveModuleState2
    • diff --git a/docs/package-search-index.js b/docs/package-search-index.js index 376d7fc..d14f7be 100644 --- a/docs/package-search-index.js +++ b/docs/package-search-index.js @@ -1 +1 @@ -packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"swervelib"},{"l":"swervelib.encoders"},{"l":"swervelib.imu"},{"l":"swervelib.math"},{"l":"swervelib.motors"},{"l":"swervelib.parser"},{"l":"swervelib.parser.deserializer"},{"l":"swervelib.parser.json"},{"l":"swervelib.parser.json.modules"}];updateSearchResults(); \ No newline at end of file +packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"swervelib"},{"l":"swervelib.encoders"},{"l":"swervelib.imu"},{"l":"swervelib.math"},{"l":"swervelib.motors"},{"l":"swervelib.parser"},{"l":"swervelib.parser.deserializer"},{"l":"swervelib.parser.json"},{"l":"swervelib.parser.json.modules"},{"l":"swervelib.simulation"}];updateSearchResults(); \ No newline at end of file diff --git a/docs/swervelib/SwerveController.html b/docs/swervelib/SwerveController.html index 303d3e6..314b1b0 100644 --- a/docs/swervelib/SwerveController.html +++ b/docs/swervelib/SwerveController.html @@ -1,7 +1,7 @@ - + SwerveController diff --git a/docs/swervelib/SwerveDrive.html b/docs/swervelib/SwerveDrive.html index f482316..db489cc 100644 --- a/docs/swervelib/SwerveDrive.html +++ b/docs/swervelib/SwerveDrive.html @@ -1,7 +1,7 @@ - + SwerveDrive @@ -91,30 +91,30 @@ loadScripts(document, 'script');
      Modifier and Type
      Field
      Description
      -
      private double
      - +
      edu.wpi.first.wpilibj.smartdashboard.Field2d
      +
      -
      The current angle of the robot and last time odometry during simulations.
      -
      -
      edu.wpi.first.wpilibj.smartdashboard.Field2d
      - -
      Field object.
      -
      private SwerveIMU
      - -
      +
      private SwerveIMU
      + +
      Swerve IMU device for sensing the heading of the robot.
      - - -
      + + +
      Swerve Kinematics object utilizing second order kinematics.
      -
      private double
      - +
      private int
      + +
      +
      Counter to synchronize the modules relative encoder with absolute encoder when not moving.
      +
      + +
      -
      The current angle of the robot and last time odometry during simulations.
      +
      Simulation of the swerve drive.
      @@ -136,11 +136,6 @@ loadScripts(document, 'script');
      Swerve modules.
      -
      private edu.wpi.first.wpilibj.Timer
      - -
      -
      Time during simulations.
      -
  • @@ -172,11 +167,12 @@ loadScripts(document, 'script');
    Method
    Description
    void
    -
    addVisionMeasurement(edu.wpi.first.math.geometry.Pose2d robotPose, - double timestamp)
    +
    addVisionMeasurement(edu.wpi.first.math.geometry.Pose2d robotPose, + double timestamp, + boolean soft)
    -
    Add a vision measurement to the SwerveDrivePoseEstimator with the given timestamp of the vision - measurement.
    +
    Add a vision measurement to the SwerveDrivePoseEstimator and update the SwerveIMU gyro reading with + the given timestamp of the vision measurement.
    void
    drive(edu.wpi.first.math.geometry.Translation2d translation, @@ -194,7 +190,7 @@ loadScripts(document, 'script');
    edu.wpi.first.math.geometry.Rotation3d
    -
    Gets the current gyro Rotation3d of the robot, as reported by the imu.
    +
    Gets the current gyro Rotation3d of the robot, as reported by the imu.
    edu.wpi.first.math.kinematics.SwerveModulePosition[]
    @@ -237,31 +233,31 @@ loadScripts(document, 'script');
    Gets the current yaw angle of the robot, as reported by the imu.
    void
    -
    postTrajectory(edu.wpi.first.math.trajectory.Trajectory trajectory)
    -
    -
    Post the trajectory to the field
    -
    -
    void
    -
    replaceSwerveModuleFeedforward(edu.wpi.first.math.controller.SimpleMotorFeedforward feedforward)
    -
    -
    Setup the swerve module feedforward.
    -
    -
    void
    -
    resetOdometry(edu.wpi.first.math.geometry.Pose2d pose)
    -
    -
    Resets odometry to the given pose.
    -
    -
    void
    -
    setChassisSpeeds(edu.wpi.first.math.kinematics.ChassisSpeeds chassisSpeeds)
    -
    -
    Set chassis speeds with closed-loop velocity control.
    -
    -
    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)
    +
    +
    Post the trajectory to the field
    +
    +
    void
    +
    replaceSwerveModuleFeedforward(edu.wpi.first.math.controller.SimpleMotorFeedforward feedforward)
    +
    +
    Setup the swerve module feedforward.
    +
    +
    void
    +
    resetOdometry(edu.wpi.first.math.geometry.Pose2d pose)
    +
    +
    Resets odometry to the given pose.
    +
    +
    void
    +
    setChassisSpeeds(edu.wpi.first.math.kinematics.ChassisSpeeds chassisSpeeds)
    +
    +
    Set chassis speeds with closed-loop velocity control.
    +
    +
    void
    setModuleStates(SwerveModuleState2[] desiredStates, boolean isOpenLoop)
    @@ -354,24 +350,17 @@ loadScripts(document, 'script');
  • -
    -

    angle

    -
    private double angle
    -
    The current angle of the robot and last time odometry during simulations.
    +
    +

    simIMU

    +
    private SwerveIMUSimulation simIMU
    +
    Simulation of the swerve drive.
  • -
    -

    lastTime

    -
    private double lastTime
    -
    The current angle of the robot and last time odometry during simulations.
    -
    -
  • -
  • -
    -

    timer

    -
    private edu.wpi.first.wpilibj.Timer timer
    -
    Time during simulations.
    +
    +

    moduleSynchronizationCounter

    +
    private int moduleSynchronizationCounter
    +
    Counter to synchronize the modules relative encoder with absolute encoder when not moving.
  • @@ -387,10 +376,11 @@ loadScripts(document, 'script');

    SwerveDrive

    public SwerveDrive(SwerveDriveConfiguration config, SwerveControllerConfiguration controllerConfig)
    -
    Creates a new swerve drivebase subsystem. Robot is controlled via the drive() method, or via the setModuleStates() - method. The drive() method incorporates kinematics— it takes a translation and rotation, as well as parameters for - field-centric and closed-loop velocity control. setModuleStates() takes a list of SwerveModuleStates and directly - passes them to the modules. This subsystem also handles odometry.
    +
    Creates a new swerve drivebase subsystem. Robot is controlled via the drive(edu.wpi.first.math.geometry.Translation2d, double, boolean, boolean) method, or via the + setModuleStates(swervelib.math.SwerveModuleState2[], boolean) method. The drive(edu.wpi.first.math.geometry.Translation2d, double, boolean, boolean) method incorporates kinematics— it takes + a translation and rotation, as well as parameters for field-centric and closed-loop velocity control. + setModuleStates(swervelib.math.SwerveModuleState2[], boolean) takes a list of SwerveModuleStates and directly passes them to the modules. + This subsystem also handles odometry.
    Parameters:
    config - The SwerveDriveConfiguration configuration to base the swerve drive off of.
    @@ -578,7 +568,7 @@ loadScripts(document, 'script');

    getGyroRotation3d

    public edu.wpi.first.math.geometry.Rotation3d getGyroRotation3d()
    -
    Gets the current gyro Rotation3d of the robot, as reported by the imu.
    +
    Gets the current gyro Rotation3d of the robot, as reported by the imu.
    Returns:
    The heading as a Rotation3d angle
    @@ -597,10 +587,11 @@ loadScripts(document, 'script');
  • -
    -

    setDriveBrake

    -
    public void setDriveBrake()
    -
    Point all modules toward the robot center, thus making the robot very difficult to move.
    +
    +

    lockPose

    +
    public void lockPose()
    +
    Point all modules toward the robot center, thus making the robot very difficult to move. Forcing the robot to keep + the current pose.
  • @@ -631,7 +622,9 @@ loadScripts(document, 'script');

    updateOdometry

    public void updateOdometry()
    -
    Update odometry should be run every loop.
    +
    Update odometry should be run every loop. Synchronizes module absolute encoders with relative encoders + periodically. In simulation mode will also post the pose of each module. Updates SmartDashboard with module encoder + readings and states.
  • @@ -642,17 +635,22 @@ loadScripts(document, 'script');
  • -
    +

    addVisionMeasurement

    public void addVisionMeasurement(edu.wpi.first.math.geometry.Pose2d robotPose, - double timestamp)
    -
    Add a vision measurement to the SwerveDrivePoseEstimator with the given timestamp of the vision - measurement. THIS WILL BREAK IF UPDATED TOO OFTEN.
    + double timestamp, + boolean soft)
  • +
    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 FPGATimestamp, could be taken from - Timer.getFPGATimestamp().
    +
    timestamp - Timestamp the measurement was taken as time since startup, should be taken from + 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).
    diff --git a/docs/swervelib/SwerveModule.html b/docs/swervelib/SwerveModule.html index 798527f..1aaf066 100644 --- a/docs/swervelib/SwerveModule.html +++ b/docs/swervelib/SwerveModule.html @@ -1,7 +1,7 @@ - + SwerveModule @@ -96,75 +96,45 @@ loadScripts(document, 'script');
    Absolute encoder for swerve drive.
    -
    double
    - +
    private final SwerveMotor
    +
    -
    Current state.
    -
    -
    private final SwerveMotor
    - -
    Swerve Motors.
    -
    private final double
    - -
    +
    private final double
    + +
    Angle offset from the absolute encoder.
    - - -
    + + +
    Swerve module configuration options.
    -
    private final SwerveMotor
    - -
    +
    private final SwerveMotor
    + +
    Swerve Motors.
    -
    double
    - -
    -
    Current state.
    -
    -
    double
    - +
    edu.wpi.first.math.controller.SimpleMotorFeedforward
    +
    -
    Current state.
    -
    -
    edu.wpi.first.math.controller.SimpleMotorFeedforward
    - -
    Feedforward for drive motor during closed loop control.
    -
    double
    - -
    -
    Last angle set for the swerve module.
    -
    double
    - +
    -
    Current state.
    +
    Last angle set for the swerve module.
    int
    Module number for kinematics, usually 0 to 3.
    -
    double
    - + +
    -
    Current state.
    -
    -
    double
    - -
    -
    Current state.
    -
    -
    private edu.wpi.first.wpilibj.Timer
    - -
    -
    Timer for simulation.
    +
    Simulated swerve module.
    @@ -311,52 +281,10 @@ loadScripts(document, 'script');
  • -
    -

    angle

    -
    public double angle
    -
    Current state.
    -
    -
  • -
  • -
    -

    omega

    -
    public double omega
    -
    Current state.
    -
    -
  • -
  • -
    -

    speed

    -
    public double speed
    -
    Current state.
    -
    -
  • -
  • -
    -

    fakePos

    -
    public double fakePos
    -
    Current state.
    -
    -
  • -
  • -
    -

    lastTime

    -
    public double lastTime
    -
    Current state.
    -
    -
  • -
  • -
    -

    dt

    -
    public double dt
    -
    Current state.
    -
    -
  • -
  • -
    -

    time

    -
    private edu.wpi.first.wpilibj.Timer time
    -
    Timer for simulation.
    +
    +

    simModule

    +
    private SwerveModuleSimulation simModule
    +
    Simulated swerve module.
  • diff --git a/docs/swervelib/encoders/CANCoderSwerve.html b/docs/swervelib/encoders/CANCoderSwerve.html index c4bce34..e8ed17a 100644 --- a/docs/swervelib/encoders/CANCoderSwerve.html +++ b/docs/swervelib/encoders/CANCoderSwerve.html @@ -1,7 +1,7 @@ - + CANCoderSwerve diff --git a/docs/swervelib/encoders/SparkMaxEncoderSwerve.html b/docs/swervelib/encoders/SparkMaxEncoderSwerve.html index e3cd5e2..b60cfea 100644 --- a/docs/swervelib/encoders/SparkMaxEncoderSwerve.html +++ b/docs/swervelib/encoders/SparkMaxEncoderSwerve.html @@ -1,7 +1,7 @@ - + SparkMaxEncoderSwerve diff --git a/docs/swervelib/encoders/SwerveAbsoluteEncoder.html b/docs/swervelib/encoders/SwerveAbsoluteEncoder.html index 2056261..8053bff 100644 --- a/docs/swervelib/encoders/SwerveAbsoluteEncoder.html +++ b/docs/swervelib/encoders/SwerveAbsoluteEncoder.html @@ -1,7 +1,7 @@ - + SwerveAbsoluteEncoder diff --git a/docs/swervelib/encoders/package-summary.html b/docs/swervelib/encoders/package-summary.html index 927023a..189bfef 100644 --- a/docs/swervelib/encoders/package-summary.html +++ b/docs/swervelib/encoders/package-summary.html @@ -1,7 +1,7 @@ - + swervelib.encoders @@ -78,6 +78,8 @@ loadScripts(document, 'script');
     
     
    + +
     
    diff --git a/docs/swervelib/encoders/package-tree.html b/docs/swervelib/encoders/package-tree.html index 0fe3ddd..53c64d6 100644 --- a/docs/swervelib/encoders/package-tree.html +++ b/docs/swervelib/encoders/package-tree.html @@ -1,7 +1,7 @@ - + swervelib.encoders Class Hierarchy diff --git a/docs/swervelib/imu/ADIS16448Swerve.html b/docs/swervelib/imu/ADIS16448Swerve.html new file mode 100644 index 0000000..f64a9a8 --- /dev/null +++ b/docs/swervelib/imu/ADIS16448Swerve.html @@ -0,0 +1,285 @@ + + + + +ADIS16448Swerve + + + + + + + + + + + + + + + +
    + +
    +
    + +
    +
    Package swervelib.imu
    +

    Class ADIS16448Swerve

    +
    +
    java.lang.Object +
    swervelib.imu.SwerveIMU +
    swervelib.imu.ADIS16448Swerve
    +
    +
    +
    +
    +
    public class ADIS16448Swerve +extends SwerveIMU
    +
    IMU Swerve class for the ADIS16448_IMU device.
    +
    +
    +
      + +
    • +
      +

      Field Summary

      +
      Fields
      +
      +
      Modifier and Type
      +
      Field
      +
      Description
      +
      private final edu.wpi.first.wpilibj.ADIS16448_IMU
      + +
      +
      ADIS16448_IMU device to read the current headings from.
      +
      +
      private double
      + +
      +
      Offset for the ADIS16448 yaw reading.
      +
      +
      +
      +
    • + +
    • +
      +

      Constructor Summary

      +
      Constructors
      +
      +
      Constructor
      +
      Description
      + +
      +
      Construct the ADIS16448 imu and reset default configurations.
      +
      +
      +
      +
    • + +
    • +
      +

      Method Summary

      +
      +
      +
      +
      +
      Modifier and Type
      +
      Method
      +
      Description
      +
      void
      + +
      +
      Clear sticky faults on IMU.
      +
      +
      void
      + +
      +
      Reset IMU to factory default.
      +
      + + +
      +
      Get the instantiated IMU object.
      +
      +
      void
      +
      getYawPitchRoll(double[] yprArray)
      +
      +
      Fetch the yaw/pitch/roll from the IMU.
      +
      +
      void
      +
      setYaw(double yaw)
      +
      +
      Set the yaw in degrees.
      +
      +
      +
      +
      +
      +

      Methods inherited from class java.lang.Object

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

      Field Details

      +
        +
      • +
        +

        imu

        +
        private final edu.wpi.first.wpilibj.ADIS16448_IMU imu
        +
        ADIS16448_IMU device to read the current headings from.
        +
        +
      • +
      • +
        +

        yawOffset

        +
        private double yawOffset
        +
        Offset for the ADIS16448 yaw reading.
        +
        +
      • +
      +
      +
    • + +
    • +
      +

      Constructor Details

      +
        +
      • +
        +

        ADIS16448Swerve

        +
        public ADIS16448Swerve()
        +
        Construct the ADIS16448 imu and reset default configurations. Publish the gyro to the SmartDashboard.
        +
        +
      • +
      +
      +
    • + +
    • +
      +

      Method Details

      +
        +
      • +
        +

        factoryDefault

        +
        public void factoryDefault()
        +
        Reset IMU to factory default.
        +
        +
        Specified by:
        +
        factoryDefault in class SwerveIMU
        +
        +
        +
      • +
      • +
        +

        clearStickyFaults

        +
        public void clearStickyFaults()
        +
        Clear sticky faults on IMU.
        +
        +
        Specified by:
        +
        clearStickyFaults in class SwerveIMU
        +
        +
        +
      • +
      • +
        +

        setYaw

        +
        public void setYaw(double yaw)
        +
        Set the yaw in degrees.
        +
        +
        Specified by:
        +
        setYaw in class SwerveIMU
        +
        Parameters:
        +
        yaw - Yaw angle in degrees.
        +
        +
        +
      • +
      • +
        +

        getYawPitchRoll

        +
        public void getYawPitchRoll(double[] yprArray)
        +
        Fetch the yaw/pitch/roll from the IMU.
        +
        +
        Specified by:
        +
        getYawPitchRoll in class SwerveIMU
        +
        Parameters:
        +
        yprArray - Array which will be filled with {yaw, pitch, roll} in degrees.
        +
        +
        +
      • +
      • +
        +

        getIMU

        +
        public Object getIMU()
        +
        Get the instantiated IMU object.
        +
        +
        Specified by:
        +
        getIMU in class SwerveIMU
        +
        Returns:
        +
        IMU object.
        +
        +
        +
      • +
      +
      +
    • +
    +
    + +
    +
    +
    + + diff --git a/docs/swervelib/imu/ADIS16470Swerve.html b/docs/swervelib/imu/ADIS16470Swerve.html new file mode 100644 index 0000000..573c8fb --- /dev/null +++ b/docs/swervelib/imu/ADIS16470Swerve.html @@ -0,0 +1,285 @@ + + + + +ADIS16470Swerve + + + + + + + + + + + + + + + +
    + +
    +
    + +
    +
    Package swervelib.imu
    +

    Class ADIS16470Swerve

    +
    +
    java.lang.Object +
    swervelib.imu.SwerveIMU +
    swervelib.imu.ADIS16470Swerve
    +
    +
    +
    +
    +
    public class ADIS16470Swerve +extends SwerveIMU
    +
    IMU Swerve class for the ADIS16470_IMU device.
    +
    +
    +
      + +
    • +
      +

      Field Summary

      +
      Fields
      +
      +
      Modifier and Type
      +
      Field
      +
      Description
      +
      private final edu.wpi.first.wpilibj.ADIS16470_IMU
      + +
      +
      ADIS16470_IMU device to read the current headings from.
      +
      +
      private double
      + +
      +
      Offset for the ADIS16470 yaw reading.
      +
      +
      +
      +
    • + +
    • +
      +

      Constructor Summary

      +
      Constructors
      +
      +
      Constructor
      +
      Description
      + +
      +
      Construct the ADIS16470 imu and reset default configurations.
      +
      +
      +
      +
    • + +
    • +
      +

      Method Summary

      +
      +
      +
      +
      +
      Modifier and Type
      +
      Method
      +
      Description
      +
      void
      + +
      +
      Clear sticky faults on IMU.
      +
      +
      void
      + +
      +
      Reset IMU to factory default.
      +
      + + +
      +
      Get the instantiated IMU object.
      +
      +
      void
      +
      getYawPitchRoll(double[] yprArray)
      +
      +
      Fetch the yaw/pitch/roll from the IMU.
      +
      +
      void
      +
      setYaw(double yaw)
      +
      +
      Set the yaw in degrees.
      +
      +
      +
      +
      +
      +

      Methods inherited from class java.lang.Object

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

      Field Details

      +
        +
      • +
        +

        imu

        +
        private final edu.wpi.first.wpilibj.ADIS16470_IMU imu
        +
        ADIS16470_IMU device to read the current headings from.
        +
        +
      • +
      • +
        +

        yawOffset

        +
        private double yawOffset
        +
        Offset for the ADIS16470 yaw reading.
        +
        +
      • +
      +
      +
    • + +
    • +
      +

      Constructor Details

      +
        +
      • +
        +

        ADIS16470Swerve

        +
        public ADIS16470Swerve()
        +
        Construct the ADIS16470 imu and reset default configurations. Publish the gyro to the SmartDashboard.
        +
        +
      • +
      +
      +
    • + +
    • +
      +

      Method Details

      +
        +
      • +
        +

        factoryDefault

        +
        public void factoryDefault()
        +
        Reset IMU to factory default.
        +
        +
        Specified by:
        +
        factoryDefault in class SwerveIMU
        +
        +
        +
      • +
      • +
        +

        clearStickyFaults

        +
        public void clearStickyFaults()
        +
        Clear sticky faults on IMU.
        +
        +
        Specified by:
        +
        clearStickyFaults in class SwerveIMU
        +
        +
        +
      • +
      • +
        +

        setYaw

        +
        public void setYaw(double yaw)
        +
        Set the yaw in degrees.
        +
        +
        Specified by:
        +
        setYaw in class SwerveIMU
        +
        Parameters:
        +
        yaw - Yaw angle in degrees.
        +
        +
        +
      • +
      • +
        +

        getYawPitchRoll

        +
        public void getYawPitchRoll(double[] yprArray)
        +
        Fetch the yaw/pitch/roll from the IMU.
        +
        +
        Specified by:
        +
        getYawPitchRoll in class SwerveIMU
        +
        Parameters:
        +
        yprArray - Array which will be filled with {yaw, pitch, roll} in degrees.
        +
        +
        +
      • +
      • +
        +

        getIMU

        +
        public Object getIMU()
        +
        Get the instantiated IMU object.
        +
        +
        Specified by:
        +
        getIMU in class SwerveIMU
        +
        Returns:
        +
        IMU object.
        +
        +
        +
      • +
      +
      +
    • +
    +
    + +
    +
    +
    + + diff --git a/docs/swervelib/imu/ADXRS450Swerve.html b/docs/swervelib/imu/ADXRS450Swerve.html new file mode 100644 index 0000000..03456c1 --- /dev/null +++ b/docs/swervelib/imu/ADXRS450Swerve.html @@ -0,0 +1,285 @@ + + + + +ADXRS450Swerve + + + + + + + + + + + + + + + +
    + +
    +
    + +
    +
    Package swervelib.imu
    +

    Class ADXRS450Swerve

    +
    +
    java.lang.Object +
    swervelib.imu.SwerveIMU +
    swervelib.imu.ADXRS450Swerve
    +
    +
    +
    +
    +
    public class ADXRS450Swerve +extends SwerveIMU
    +
    IMU Swerve class for the ADXRS450_Gyro device.
    +
    +
    +
      + +
    • +
      +

      Field Summary

      +
      Fields
      +
      +
      Modifier and Type
      +
      Field
      +
      Description
      +
      private final edu.wpi.first.wpilibj.ADXRS450_Gyro
      + +
      +
      ADXRS450_Gyro device to read the current headings from.
      +
      +
      private double
      + +
      +
      Offset for the ADXRS450 yaw reading.
      +
      +
      +
      +
    • + +
    • +
      +

      Constructor Summary

      +
      Constructors
      +
      +
      Constructor
      +
      Description
      + +
      +
      Construct the ADXRS450 imu and reset default configurations.
      +
      +
      +
      +
    • + +
    • +
      +

      Method Summary

      +
      +
      +
      +
      +
      Modifier and Type
      +
      Method
      +
      Description
      +
      void
      + +
      +
      Clear sticky faults on IMU.
      +
      +
      void
      + +
      +
      Reset IMU to factory default.
      +
      + + +
      +
      Get the instantiated IMU object.
      +
      +
      void
      +
      getYawPitchRoll(double[] yprArray)
      +
      +
      Fetch the yaw/pitch/roll from the IMU.
      +
      +
      void
      +
      setYaw(double yaw)
      +
      +
      Set the yaw in degrees.
      +
      +
      +
      +
      +
      +

      Methods inherited from class java.lang.Object

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

      Field Details

      +
        +
      • +
        +

        imu

        +
        private final edu.wpi.first.wpilibj.ADXRS450_Gyro imu
        +
        ADXRS450_Gyro device to read the current headings from.
        +
        +
      • +
      • +
        +

        yawOffset

        +
        private double yawOffset
        +
        Offset for the ADXRS450 yaw reading.
        +
        +
      • +
      +
      +
    • + +
    • +
      +

      Constructor Details

      +
        +
      • +
        +

        ADXRS450Swerve

        +
        public ADXRS450Swerve()
        +
        Construct the ADXRS450 imu and reset default configurations. Publish the gyro to the SmartDashboard.
        +
        +
      • +
      +
      +
    • + +
    • +
      +

      Method Details

      +
        +
      • +
        +

        factoryDefault

        +
        public void factoryDefault()
        +
        Reset IMU to factory default.
        +
        +
        Specified by:
        +
        factoryDefault in class SwerveIMU
        +
        +
        +
      • +
      • +
        +

        clearStickyFaults

        +
        public void clearStickyFaults()
        +
        Clear sticky faults on IMU.
        +
        +
        Specified by:
        +
        clearStickyFaults in class SwerveIMU
        +
        +
        +
      • +
      • +
        +

        setYaw

        +
        public void setYaw(double yaw)
        +
        Set the yaw in degrees.
        +
        +
        Specified by:
        +
        setYaw in class SwerveIMU
        +
        Parameters:
        +
        yaw - Yaw angle in degrees.
        +
        +
        +
      • +
      • +
        +

        getYawPitchRoll

        +
        public void getYawPitchRoll(double[] yprArray)
        +
        Fetch the yaw/pitch/roll from the IMU.
        +
        +
        Specified by:
        +
        getYawPitchRoll in class SwerveIMU
        +
        Parameters:
        +
        yprArray - Array which will be filled with {yaw, pitch, roll} in degrees.
        +
        +
        +
      • +
      • +
        +

        getIMU

        +
        public Object getIMU()
        +
        Get the instantiated IMU object.
        +
        +
        Specified by:
        +
        getIMU in class SwerveIMU
        +
        Returns:
        +
        IMU object.
        +
        +
        +
      • +
      +
      +
    • +
    +
    + +
    +
    +
    + + diff --git a/docs/swervelib/imu/AnalogGyroSwerve.html b/docs/swervelib/imu/AnalogGyroSwerve.html new file mode 100644 index 0000000..db58538 --- /dev/null +++ b/docs/swervelib/imu/AnalogGyroSwerve.html @@ -0,0 +1,289 @@ + + + + +AnalogGyroSwerve + + + + + + + + + + + + + + + +
    + +
    +
    + +
    +
    Package swervelib.imu
    +

    Class AnalogGyroSwerve

    +
    +
    java.lang.Object +
    swervelib.imu.SwerveIMU +
    swervelib.imu.AnalogGyroSwerve
    +
    +
    +
    +
    +
    public class AnalogGyroSwerve +extends SwerveIMU
    +
    Creates a IMU for AnalogGyro devices, only uses yaw.
    +
    +
    +
      + +
    • +
      +

      Field Summary

      +
      Fields
      +
      +
      Modifier and Type
      +
      Field
      +
      Description
      +
      private final edu.wpi.first.wpilibj.AnalogGyro
      + +
      +
      Gyroscope object.
      +
      +
      private double
      + +
      +
      The yaw offset for the gyroscope.
      +
      +
      +
      +
    • + +
    • +
      +

      Constructor Summary

      +
      Constructors
      +
      +
      Constructor
      +
      Description
      +
      AnalogGyroSwerve(int channel)
      +
      +
      Analog port in which the gyroscope is connected.
      +
      +
      +
      +
    • + +
    • +
      +

      Method Summary

      +
      +
      +
      +
      +
      Modifier and Type
      +
      Method
      +
      Description
      +
      void
      + +
      +
      Clear sticky faults on IMU.
      +
      +
      void
      + +
      +
      Reset IMU to factory default.
      +
      + + +
      +
      Get the instantiated IMU object.
      +
      +
      void
      +
      getYawPitchRoll(double[] yprArray)
      +
      +
      Fetch the yaw/pitch/roll from the IMU.
      +
      +
      void
      +
      setYaw(double yaw)
      +
      +
      Set the yaw in degrees.
      +
      +
      +
      +
      +
      +

      Methods inherited from class java.lang.Object

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

      Field Details

      +
        +
      • +
        +

        gyro

        +
        private final edu.wpi.first.wpilibj.AnalogGyro gyro
        +
        Gyroscope object.
        +
        +
      • +
      • +
        +

        yawOffset

        +
        private double yawOffset
        +
        The yaw offset for the gyroscope.
        +
        +
      • +
      +
      +
    • + +
    • +
      +

      Constructor Details

      +
        +
      • +
        +

        AnalogGyroSwerve

        +
        public AnalogGyroSwerve(int channel)
        +
        Analog port in which the gyroscope is connected. Can only be attached to analog ports 0 or 1.
        +
        +
        Parameters:
        +
        channel - Analog port 0 or 1.
        +
        +
        +
      • +
      +
      +
    • + +
    • +
      +

      Method Details

      +
        +
      • +
        +

        factoryDefault

        +
        public void factoryDefault()
        +
        Reset IMU to factory default.
        +
        +
        Specified by:
        +
        factoryDefault in class SwerveIMU
        +
        +
        +
      • +
      • +
        +

        clearStickyFaults

        +
        public void clearStickyFaults()
        +
        Clear sticky faults on IMU.
        +
        +
        Specified by:
        +
        clearStickyFaults in class SwerveIMU
        +
        +
        +
      • +
      • +
        +

        setYaw

        +
        public void setYaw(double yaw)
        +
        Set the yaw in degrees.
        +
        +
        Specified by:
        +
        setYaw in class SwerveIMU
        +
        Parameters:
        +
        yaw - Yaw angle in degrees.
        +
        +
        +
      • +
      • +
        +

        getYawPitchRoll

        +
        public void getYawPitchRoll(double[] yprArray)
        +
        Fetch the yaw/pitch/roll from the IMU.
        +
        +
        Specified by:
        +
        getYawPitchRoll in class SwerveIMU
        +
        Parameters:
        +
        yprArray - Array which will be filled with {yaw, pitch, roll} in degrees.
        +
        +
        +
      • +
      • +
        +

        getIMU

        +
        public Object getIMU()
        +
        Get the instantiated IMU object.
        +
        +
        Specified by:
        +
        getIMU in class SwerveIMU
        +
        Returns:
        +
        IMU object.
        +
        +
        +
      • +
      +
      +
    • +
    +
    + +
    +
    +
    + + diff --git a/docs/swervelib/imu/NavXSwerve.html b/docs/swervelib/imu/NavXSwerve.html index e33ea5d..fe4775f 100644 --- a/docs/swervelib/imu/NavXSwerve.html +++ b/docs/swervelib/imu/NavXSwerve.html @@ -1,7 +1,7 @@ - + NavXSwerve diff --git a/docs/swervelib/imu/Pigeon2Swerve.html b/docs/swervelib/imu/Pigeon2Swerve.html index 1bd58cc..16b1e75 100644 --- a/docs/swervelib/imu/Pigeon2Swerve.html +++ b/docs/swervelib/imu/Pigeon2Swerve.html @@ -1,7 +1,7 @@ - + Pigeon2Swerve diff --git a/docs/swervelib/imu/PigeonSwerve.html b/docs/swervelib/imu/PigeonSwerve.html index 6fecac0..b0ae35b 100644 --- a/docs/swervelib/imu/PigeonSwerve.html +++ b/docs/swervelib/imu/PigeonSwerve.html @@ -1,7 +1,7 @@ - + PigeonSwerve diff --git a/docs/swervelib/imu/SwerveIMU.html b/docs/swervelib/imu/SwerveIMU.html index 890f5d5..e4c5002 100644 --- a/docs/swervelib/imu/SwerveIMU.html +++ b/docs/swervelib/imu/SwerveIMU.html @@ -1,7 +1,7 @@ - + SwerveIMU @@ -77,7 +77,7 @@ loadScripts(document, 'script');
    Direct Known Subclasses:
    -
    NavXSwerve, Pigeon2Swerve, PigeonSwerve
    +
    ADIS16448Swerve, ADIS16470Swerve, ADXRS450Swerve, AnalogGyroSwerve, NavXSwerve, Pigeon2Swerve, PigeonSwerve

    public abstract class SwerveIMU diff --git a/docs/swervelib/imu/package-summary.html b/docs/swervelib/imu/package-summary.html index f211362..12d69e8 100644 --- a/docs/swervelib/imu/package-summary.html +++ b/docs/swervelib/imu/package-summary.html @@ -1,7 +1,7 @@ - + swervelib.imu @@ -78,6 +78,8 @@ loadScripts(document, 'script');
     
     
    + +
     
    @@ -87,6 +89,22 @@ loadScripts(document, 'script');
    Class
    Description
    + +
    +
    IMU Swerve class for the ADIS16448_IMU device.
    +
    + +
    +
    IMU Swerve class for the ADIS16470_IMU device.
    +
    + +
    +
    IMU Swerve class for the ADXRS450_Gyro device.
    +
    + +
    +
    Creates a IMU for AnalogGyro devices, only uses yaw.
    +
    Communicates with the NavX as the IMU.
    diff --git a/docs/swervelib/imu/package-tree.html b/docs/swervelib/imu/package-tree.html index 180148b..ef7ff2c 100644 --- a/docs/swervelib/imu/package-tree.html +++ b/docs/swervelib/imu/package-tree.html @@ -1,7 +1,7 @@ - + swervelib.imu Class Hierarchy @@ -61,6 +61,10 @@ loadScripts(document, 'script');
    • swervelib.imu.SwerveIMU
        +
      • swervelib.imu.ADIS16448Swerve
      • +
      • swervelib.imu.ADIS16470Swerve
      • +
      • swervelib.imu.ADXRS450Swerve
      • +
      • swervelib.imu.AnalogGyroSwerve
      • swervelib.imu.NavXSwerve
      • swervelib.imu.Pigeon2Swerve
      • swervelib.imu.PigeonSwerve
      • diff --git a/docs/swervelib/math/SwerveKinematics2.html b/docs/swervelib/math/SwerveKinematics2.html index 0b2c211..6d64d4e 100644 --- a/docs/swervelib/math/SwerveKinematics2.html +++ b/docs/swervelib/math/SwerveKinematics2.html @@ -1,7 +1,7 @@ - + SwerveKinematics2 diff --git a/docs/swervelib/math/SwerveMath.html b/docs/swervelib/math/SwerveMath.html index 378bc39..740edcb 100644 --- a/docs/swervelib/math/SwerveMath.html +++ b/docs/swervelib/math/SwerveMath.html @@ -1,7 +1,7 @@ - + SwerveMath @@ -336,7 +336,7 @@ loadScripts(document, 'script'); edu.wpi.first.math.geometry.Translation3d chassisCenterOfGravity, SwerveDriveConfiguration config)
    Calculates the maximum acceleration allowed in a direction without tipping the robot. Reads arm position from - NetworkTables and is passed the direction in question.
    + NetworkTables and is passed the direction in question.
    Requires modules to be named:
    "frontright.json", "frontleft.json", "backright.json", "backleft.json"
    Parameters:
    angle - The direction in which to calculate max acceleration, as a Rotation2d. Note that this @@ -363,7 +363,8 @@ loadScripts(document, 'script'); SwerveDriveConfiguration config)
    Limits a commanded velocity to prevent exceeding the maximum acceleration given by calcMaxAccel(Rotation2d, double, double, Translation3d, SwerveDriveConfiguration). Note that - this takes and returns field-relative velocities.
    + this takes and returns field-relative velocities.
    Requires modules to be named:
    "frontright.json", + "frontleft.json", "backright.json", "backleft.json"
    Parameters:
    commandedVelocity - The desired velocity
    diff --git a/docs/swervelib/math/SwerveModuleState2.html b/docs/swervelib/math/SwerveModuleState2.html index 073e61d..43693c4 100644 --- a/docs/swervelib/math/SwerveModuleState2.html +++ b/docs/swervelib/math/SwerveModuleState2.html @@ -1,7 +1,7 @@ - + SwerveModuleState2 diff --git a/docs/swervelib/math/package-summary.html b/docs/swervelib/math/package-summary.html index 61943fa..398486d 100644 --- a/docs/swervelib/math/package-summary.html +++ b/docs/swervelib/math/package-summary.html @@ -1,7 +1,7 @@ - + swervelib.math @@ -78,6 +78,8 @@ loadScripts(document, 'script');
     
     
    + +
     
    diff --git a/docs/swervelib/math/package-tree.html b/docs/swervelib/math/package-tree.html index d3543f5..299b822 100644 --- a/docs/swervelib/math/package-tree.html +++ b/docs/swervelib/math/package-tree.html @@ -1,7 +1,7 @@ - + swervelib.math Class Hierarchy diff --git a/docs/swervelib/motors/SparkMaxSwerve.SparkMAX_slotIdx.html b/docs/swervelib/motors/SparkMaxSwerve.SparkMAX_slotIdx.html index 5bebfbc..278c6eb 100644 --- a/docs/swervelib/motors/SparkMaxSwerve.SparkMAX_slotIdx.html +++ b/docs/swervelib/motors/SparkMaxSwerve.SparkMAX_slotIdx.html @@ -1,7 +1,7 @@ - + SparkMaxSwerve.SparkMAX_slotIdx diff --git a/docs/swervelib/motors/SparkMaxSwerve.html b/docs/swervelib/motors/SparkMaxSwerve.html index fd873af..54f4014 100644 --- a/docs/swervelib/motors/SparkMaxSwerve.html +++ b/docs/swervelib/motors/SparkMaxSwerve.html @@ -1,7 +1,7 @@ - + SparkMaxSwerve diff --git a/docs/swervelib/motors/SwerveMotor.html b/docs/swervelib/motors/SwerveMotor.html index 964903d..75f58fd 100644 --- a/docs/swervelib/motors/SwerveMotor.html +++ b/docs/swervelib/motors/SwerveMotor.html @@ -1,7 +1,7 @@ - + SwerveMotor diff --git a/docs/swervelib/motors/TalonFXSwerve.html b/docs/swervelib/motors/TalonFXSwerve.html index cd6e553..74e2269 100644 --- a/docs/swervelib/motors/TalonFXSwerve.html +++ b/docs/swervelib/motors/TalonFXSwerve.html @@ -1,7 +1,7 @@ - + TalonFXSwerve diff --git a/docs/swervelib/motors/TalonSRXSwerve.CTRE_pidIdx.html b/docs/swervelib/motors/TalonSRXSwerve.CTRE_pidIdx.html index 81d4831..ed9dc7e 100644 --- a/docs/swervelib/motors/TalonSRXSwerve.CTRE_pidIdx.html +++ b/docs/swervelib/motors/TalonSRXSwerve.CTRE_pidIdx.html @@ -1,7 +1,7 @@ - + TalonSRXSwerve.CTRE_pidIdx diff --git a/docs/swervelib/motors/TalonSRXSwerve.CTRE_remoteSensor.html b/docs/swervelib/motors/TalonSRXSwerve.CTRE_remoteSensor.html index 8db6353..7ae4edf 100644 --- a/docs/swervelib/motors/TalonSRXSwerve.CTRE_remoteSensor.html +++ b/docs/swervelib/motors/TalonSRXSwerve.CTRE_remoteSensor.html @@ -1,7 +1,7 @@ - + TalonSRXSwerve.CTRE_remoteSensor diff --git a/docs/swervelib/motors/TalonSRXSwerve.CTRE_slotIdx.html b/docs/swervelib/motors/TalonSRXSwerve.CTRE_slotIdx.html index 4bcbe22..ff305ab 100644 --- a/docs/swervelib/motors/TalonSRXSwerve.CTRE_slotIdx.html +++ b/docs/swervelib/motors/TalonSRXSwerve.CTRE_slotIdx.html @@ -1,7 +1,7 @@ - + TalonSRXSwerve.CTRE_slotIdx diff --git a/docs/swervelib/motors/TalonSRXSwerve.html b/docs/swervelib/motors/TalonSRXSwerve.html index 1c8d3af..7be882c 100644 --- a/docs/swervelib/motors/TalonSRXSwerve.html +++ b/docs/swervelib/motors/TalonSRXSwerve.html @@ -1,7 +1,7 @@ - + TalonSRXSwerve diff --git a/docs/swervelib/motors/package-summary.html b/docs/swervelib/motors/package-summary.html index dec8472..e88ffe9 100644 --- a/docs/swervelib/motors/package-summary.html +++ b/docs/swervelib/motors/package-summary.html @@ -1,7 +1,7 @@ - + swervelib.motors @@ -82,6 +82,8 @@ loadScripts(document, 'script');
     
     
    + +
     
    diff --git a/docs/swervelib/motors/package-tree.html b/docs/swervelib/motors/package-tree.html index 506adcf..3cb2113 100644 --- a/docs/swervelib/motors/package-tree.html +++ b/docs/swervelib/motors/package-tree.html @@ -1,7 +1,7 @@ - + swervelib.motors Class Hierarchy diff --git a/docs/swervelib/package-summary.html b/docs/swervelib/package-summary.html index 08b1744..45cadb3 100644 --- a/docs/swervelib/package-summary.html +++ b/docs/swervelib/package-summary.html @@ -1,7 +1,7 @@ - + swervelib @@ -78,6 +78,8 @@ loadScripts(document, 'script');
     
     
    + +
     
    diff --git a/docs/swervelib/package-tree.html b/docs/swervelib/package-tree.html index cc07a4c..c77650e 100644 --- a/docs/swervelib/package-tree.html +++ b/docs/swervelib/package-tree.html @@ -1,7 +1,7 @@ - + swervelib Class Hierarchy diff --git a/docs/swervelib/parser/PIDFConfig.html b/docs/swervelib/parser/PIDFConfig.html index ac4f641..c225736 100644 --- a/docs/swervelib/parser/PIDFConfig.html +++ b/docs/swervelib/parser/PIDFConfig.html @@ -1,7 +1,7 @@ - + PIDFConfig diff --git a/docs/swervelib/parser/SwerveControllerConfiguration.html b/docs/swervelib/parser/SwerveControllerConfiguration.html index 05f7f73..414a4c5 100644 --- a/docs/swervelib/parser/SwerveControllerConfiguration.html +++ b/docs/swervelib/parser/SwerveControllerConfiguration.html @@ -1,7 +1,7 @@ - + SwerveControllerConfiguration diff --git a/docs/swervelib/parser/SwerveDriveConfiguration.html b/docs/swervelib/parser/SwerveDriveConfiguration.html index 4418dbf..fd870a5 100644 --- a/docs/swervelib/parser/SwerveDriveConfiguration.html +++ b/docs/swervelib/parser/SwerveDriveConfiguration.html @@ -1,7 +1,7 @@ - + SwerveDriveConfiguration diff --git a/docs/swervelib/parser/SwerveModuleConfiguration.html b/docs/swervelib/parser/SwerveModuleConfiguration.html index 6996705..a0dc88d 100644 --- a/docs/swervelib/parser/SwerveModuleConfiguration.html +++ b/docs/swervelib/parser/SwerveModuleConfiguration.html @@ -1,7 +1,7 @@ - + SwerveModuleConfiguration diff --git a/docs/swervelib/parser/SwerveModulePhysicalCharacteristics.html b/docs/swervelib/parser/SwerveModulePhysicalCharacteristics.html index 035c143..6aada94 100644 --- a/docs/swervelib/parser/SwerveModulePhysicalCharacteristics.html +++ b/docs/swervelib/parser/SwerveModulePhysicalCharacteristics.html @@ -1,7 +1,7 @@ - + SwerveModulePhysicalCharacteristics diff --git a/docs/swervelib/parser/SwerveParser.html b/docs/swervelib/parser/SwerveParser.html index ec02445..7d68096 100644 --- a/docs/swervelib/parser/SwerveParser.html +++ b/docs/swervelib/parser/SwerveParser.html @@ -1,7 +1,7 @@ - + SwerveParser diff --git a/docs/swervelib/parser/deserializer/PIDFRange.html b/docs/swervelib/parser/deserializer/PIDFRange.html index 928fd06..5758647 100644 --- a/docs/swervelib/parser/deserializer/PIDFRange.html +++ b/docs/swervelib/parser/deserializer/PIDFRange.html @@ -1,7 +1,7 @@ - + PIDFRange diff --git a/docs/swervelib/parser/deserializer/package-summary.html b/docs/swervelib/parser/deserializer/package-summary.html index ccf272a..bc59543 100644 --- a/docs/swervelib/parser/deserializer/package-summary.html +++ b/docs/swervelib/parser/deserializer/package-summary.html @@ -1,7 +1,7 @@ - + swervelib.parser.deserializer diff --git a/docs/swervelib/parser/deserializer/package-tree.html b/docs/swervelib/parser/deserializer/package-tree.html index 694d7bf..378179e 100644 --- a/docs/swervelib/parser/deserializer/package-tree.html +++ b/docs/swervelib/parser/deserializer/package-tree.html @@ -1,7 +1,7 @@ - + swervelib.parser.deserializer Class Hierarchy diff --git a/docs/swervelib/parser/json/ControllerPropertiesJson.html b/docs/swervelib/parser/json/ControllerPropertiesJson.html index c1fd07d..53fbd7b 100644 --- a/docs/swervelib/parser/json/ControllerPropertiesJson.html +++ b/docs/swervelib/parser/json/ControllerPropertiesJson.html @@ -1,7 +1,7 @@ - + ControllerPropertiesJson diff --git a/docs/swervelib/parser/json/DeviceJson.html b/docs/swervelib/parser/json/DeviceJson.html index 054e471..fe9672b 100644 --- a/docs/swervelib/parser/json/DeviceJson.html +++ b/docs/swervelib/parser/json/DeviceJson.html @@ -1,7 +1,7 @@ - + DeviceJson diff --git a/docs/swervelib/parser/json/ModuleJson.html b/docs/swervelib/parser/json/ModuleJson.html index c14644d..e7494c8 100644 --- a/docs/swervelib/parser/json/ModuleJson.html +++ b/docs/swervelib/parser/json/ModuleJson.html @@ -1,7 +1,7 @@ - + ModuleJson diff --git a/docs/swervelib/parser/json/MotorConfigDouble.html b/docs/swervelib/parser/json/MotorConfigDouble.html index b7994f9..56bdac3 100644 --- a/docs/swervelib/parser/json/MotorConfigDouble.html +++ b/docs/swervelib/parser/json/MotorConfigDouble.html @@ -1,7 +1,7 @@ - + MotorConfigDouble diff --git a/docs/swervelib/parser/json/MotorConfigInt.html b/docs/swervelib/parser/json/MotorConfigInt.html index 7bc2f0e..e064b1b 100644 --- a/docs/swervelib/parser/json/MotorConfigInt.html +++ b/docs/swervelib/parser/json/MotorConfigInt.html @@ -1,7 +1,7 @@ - + MotorConfigInt diff --git a/docs/swervelib/parser/json/PIDFPropertiesJson.html b/docs/swervelib/parser/json/PIDFPropertiesJson.html index 5e346fa..2eec26f 100644 --- a/docs/swervelib/parser/json/PIDFPropertiesJson.html +++ b/docs/swervelib/parser/json/PIDFPropertiesJson.html @@ -1,7 +1,7 @@ - + PIDFPropertiesJson diff --git a/docs/swervelib/parser/json/PhysicalPropertiesJson.html b/docs/swervelib/parser/json/PhysicalPropertiesJson.html index 32b3285..5c8dd4e 100644 --- a/docs/swervelib/parser/json/PhysicalPropertiesJson.html +++ b/docs/swervelib/parser/json/PhysicalPropertiesJson.html @@ -1,7 +1,7 @@ - + PhysicalPropertiesJson diff --git a/docs/swervelib/parser/json/SwerveDriveJson.html b/docs/swervelib/parser/json/SwerveDriveJson.html index 1ec5cc6..d986895 100644 --- a/docs/swervelib/parser/json/SwerveDriveJson.html +++ b/docs/swervelib/parser/json/SwerveDriveJson.html @@ -1,7 +1,7 @@ - + SwerveDriveJson diff --git a/docs/swervelib/parser/json/modules/BoolMotorJson.html b/docs/swervelib/parser/json/modules/BoolMotorJson.html index 210ad7f..1b27e7a 100644 --- a/docs/swervelib/parser/json/modules/BoolMotorJson.html +++ b/docs/swervelib/parser/json/modules/BoolMotorJson.html @@ -1,7 +1,7 @@ - + BoolMotorJson diff --git a/docs/swervelib/parser/json/modules/LocationJson.html b/docs/swervelib/parser/json/modules/LocationJson.html index b175a3d..d4def59 100644 --- a/docs/swervelib/parser/json/modules/LocationJson.html +++ b/docs/swervelib/parser/json/modules/LocationJson.html @@ -1,7 +1,7 @@ - + LocationJson diff --git a/docs/swervelib/parser/json/modules/package-summary.html b/docs/swervelib/parser/json/modules/package-summary.html index f191a89..aa9cb7e 100644 --- a/docs/swervelib/parser/json/modules/package-summary.html +++ b/docs/swervelib/parser/json/modules/package-summary.html @@ -1,7 +1,7 @@ - + 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 5c8e3e5..04c1603 100644 --- a/docs/swervelib/parser/json/modules/package-tree.html +++ b/docs/swervelib/parser/json/modules/package-tree.html @@ -1,7 +1,7 @@ - + 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 f00f916..fa1c5dc 100644 --- a/docs/swervelib/parser/json/package-summary.html +++ b/docs/swervelib/parser/json/package-summary.html @@ -1,7 +1,7 @@ - + swervelib.parser.json diff --git a/docs/swervelib/parser/json/package-tree.html b/docs/swervelib/parser/json/package-tree.html index c23b409..2572569 100644 --- a/docs/swervelib/parser/json/package-tree.html +++ b/docs/swervelib/parser/json/package-tree.html @@ -1,7 +1,7 @@ - + swervelib.parser.json Class Hierarchy diff --git a/docs/swervelib/parser/package-summary.html b/docs/swervelib/parser/package-summary.html index ada167e..2e1befc 100644 --- a/docs/swervelib/parser/package-summary.html +++ b/docs/swervelib/parser/package-summary.html @@ -1,7 +1,7 @@ - + swervelib.parser @@ -82,6 +82,8 @@ loadScripts(document, 'script');
     
     
    + +
     
    diff --git a/docs/swervelib/parser/package-tree.html b/docs/swervelib/parser/package-tree.html index 4948a00..d5ddb79 100644 --- a/docs/swervelib/parser/package-tree.html +++ b/docs/swervelib/parser/package-tree.html @@ -1,7 +1,7 @@ - + swervelib.parser Class Hierarchy diff --git a/docs/swervelib/simulation/SwerveIMUSimulation.html b/docs/swervelib/simulation/SwerveIMUSimulation.html new file mode 100644 index 0000000..04a2769 --- /dev/null +++ b/docs/swervelib/simulation/SwerveIMUSimulation.html @@ -0,0 +1,316 @@ + + + + +SwerveIMUSimulation + + + + + + + + + + + + + + + +
    + +
    +
    + +
    + +

    Class SwerveIMUSimulation

    +
    +
    java.lang.Object +
    swervelib.simulation.SwerveIMUSimulation
    +
    +
    +
    +
    public class SwerveIMUSimulation +extends Object
    +
    Simulation for SwerveDrive IMU.
    +
    +
    +
      + +
    • +
      +

      Field Summary

      +
      Fields
      +
      +
      Modifier and Type
      +
      Field
      +
      Description
      +
      private double
      + +
      +
      Heading of the robot.
      +
      +
      private double
      + +
      +
      The last time the timer was read, used to determine position changes.
      +
      +
      private final edu.wpi.first.wpilibj.Timer
      + +
      +
      Main timer to control movement estimations.
      +
      +
      +
      +
    • + +
    • +
      +

      Constructor Summary

      +
      Constructors
      +
      +
      Constructor
      +
      Description
      + +
      +
      Create the swerve drive IMU simulation.
      +
      +
      +
      +
    • + +
    • +
      +

      Method Summary

      +
      +
      +
      +
      +
      Modifier and Type
      +
      Method
      +
      Description
      +
      edu.wpi.first.math.geometry.Rotation3d
      + +
      +
      Gets the estimated gyro Rotation3d of the robot.
      +
      +
      edu.wpi.first.math.geometry.Rotation2d
      + +
      +
      Pitch is not simulated currently, always returns 0.
      +
      +
      edu.wpi.first.math.geometry.Rotation2d
      + +
      +
      Roll is not simulated currently, always returns 0.
      +
      +
      edu.wpi.first.math.geometry.Rotation2d
      + +
      +
      Get the estimated angle of the robot.
      +
      +
      void
      +
      setAngle(double angle)
      +
      +
      Set the heading of the robot.
      +
      +
      void
      +
      updateOdometry(SwerveKinematics2 kinematics, + SwerveModuleState2[] states, + edu.wpi.first.math.geometry.Pose2d[] modulePoses, + edu.wpi.first.wpilibj.smartdashboard.Field2d field)
      +
      +
      Update the odometry of the simulated SwerveDrive and post the SwerveModule + states to the Field2d.
      +
      +
      +
      +
      +
      +

      Methods inherited from class java.lang.Object

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

      Field Details

      +
        +
      • +
        +

        timer

        +
        private final edu.wpi.first.wpilibj.Timer timer
        +
        Main timer to control movement estimations.
        +
        +
      • +
      • +
        +

        lastTime

        +
        private double lastTime
        +
        The last time the timer was read, used to determine position changes.
        +
        +
      • +
      • +
        +

        angle

        +
        private double angle
        +
        Heading of the robot.
        +
        +
      • +
      +
      +
    • + +
    • +
      +

      Constructor Details

      +
        +
      • +
        +

        SwerveIMUSimulation

        +
        public SwerveIMUSimulation()
        +
        Create the swerve drive IMU simulation.
        +
        +
      • +
      +
      +
    • + +
    • +
      +

      Method Details

      +
        +
      • +
        +

        getYaw

        +
        public edu.wpi.first.math.geometry.Rotation2d getYaw()
        +
        Get the estimated angle of the robot.
        +
        +
        Returns:
        +
        Rotation2d estimation of the robot.
        +
        +
        +
      • +
      • +
        +

        getPitch

        +
        public edu.wpi.first.math.geometry.Rotation2d getPitch()
        +
        Pitch is not simulated currently, always returns 0.
        +
        +
        Returns:
        +
        Pitch of the robot as Rotation2d.
        +
        +
        +
      • +
      • +
        +

        getRoll

        +
        public edu.wpi.first.math.geometry.Rotation2d getRoll()
        +
        Roll is not simulated currently, always returns 0.
        +
        +
        Returns:
        +
        Roll of the robot as Rotation2d.
        +
        +
        +
      • +
      • +
        +

        getGyroRotation3d

        +
        public edu.wpi.first.math.geometry.Rotation3d getGyroRotation3d()
        +
        Gets the estimated gyro Rotation3d of the robot.
        +
        +
        Returns:
        +
        The heading as a Rotation3d angle
        +
        +
        +
      • +
      • +
        +

        updateOdometry

        +
        public void updateOdometry(SwerveKinematics2 kinematics, + SwerveModuleState2[] states, + edu.wpi.first.math.geometry.Pose2d[] modulePoses, + edu.wpi.first.wpilibj.smartdashboard.Field2d field)
        +
        Update the odometry of the simulated SwerveDrive and post the SwerveModule + states to the Field2d.
        +
        +
        Parameters:
        +
        kinematics - SwerveKinematics2 of the swerve drive.
        +
        states - SwerveModuleState2 array of the module states.
        +
        modulePoses - Pose2d representing the swerve modules.
        +
        field - Field2d to update.
        +
        +
        +
      • +
      • +
        +

        setAngle

        +
        public void setAngle(double angle)
        +
        Set the heading of the robot.
        +
        +
        Parameters:
        +
        angle - Angle of the robot in radians.
        +
        +
        +
      • +
      +
      +
    • +
    +
    + +
    +
    +
    + + diff --git a/docs/swervelib/simulation/SwerveModuleSimulation.html b/docs/swervelib/simulation/SwerveModuleSimulation.html new file mode 100644 index 0000000..cf3e424 --- /dev/null +++ b/docs/swervelib/simulation/SwerveModuleSimulation.html @@ -0,0 +1,294 @@ + + + + +SwerveModuleSimulation + + + + + + + + + + + + + + + +
    + +
    +
    + +
    + +

    Class SwerveModuleSimulation

    +
    +
    java.lang.Object +
    swervelib.simulation.SwerveModuleSimulation
    +
    +
    +
    +
    public class SwerveModuleSimulation +extends Object
    +
    Class to hold simulation data for SwerveModule
    +
    +
    + +
    +
    +
      + +
    • +
      +

      Field Details

      +
        +
      • +
        +

        timer

        +
        private final edu.wpi.first.wpilibj.Timer timer
        +
        Main timer to simulate the passage of time.
        +
        +
      • +
      • +
        +

        dt

        +
        private double dt
        +
        Time delta since last update
        +
        +
      • +
      • +
        +

        fakePos

        +
        private double fakePos
        +
        Fake motor position.
        +
        +
      • +
      • +
        +

        fakeSpeed

        +
        private double fakeSpeed
        +
        The fake speed of the previous state, used to calculate fakePos.
        +
        +
      • +
      • +
        +

        lastTime

        +
        private double lastTime
        +
        Last time queried.
        +
        +
      • +
      • +
        +

        state

        +
        private SwerveModuleState2 state
        +
        Current simulated swerve module state.
        +
        +
      • +
      +
      +
    • + +
    • +
      +

      Constructor Details

      +
        +
      • +
        +

        SwerveModuleSimulation

        +
        public SwerveModuleSimulation()
        +
        Create simulation class and initialize module at 0.
        +
        +
      • +
      +
      +
    • + +
    • +
      +

      Method Details

      + +
      +
    • +
    +
    + +
    +
    +
    + + diff --git a/docs/swervelib/simulation/package-summary.html b/docs/swervelib/simulation/package-summary.html new file mode 100644 index 0000000..6cceb1e --- /dev/null +++ b/docs/swervelib/simulation/package-summary.html @@ -0,0 +1,109 @@ + + + + +swervelib.simulation + + + + + + + + + + + + + + + +
    + +
    +
    +
    +

    Package swervelib.simulation

    +
    +
    +
    package swervelib.simulation
    +
    + +
    +
    +
    +
    + + diff --git a/docs/swervelib/simulation/package-tree.html b/docs/swervelib/simulation/package-tree.html new file mode 100644 index 0000000..99b23d5 --- /dev/null +++ b/docs/swervelib/simulation/package-tree.html @@ -0,0 +1,72 @@ + + + + +swervelib.simulation Class Hierarchy + + + + + + + + + + + + + + + +
    + +
    +
    +
    +

    Hierarchy For Package swervelib.simulation

    +Package Hierarchies: + +
    +
    +

    Class Hierarchy

    + +
    +
    +
    +
    + + diff --git a/docs/type-search-index.js b/docs/type-search-index.js index d690a39..3b152dd 100644 --- a/docs/type-search-index.js +++ b/docs/type-search-index.js @@ -1 +1 @@ -typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"swervelib.parser.json.modules","l":"BoolMotorJson"},{"p":"swervelib.encoders","l":"CANCoderSwerve"},{"p":"swervelib.parser.json","l":"ControllerPropertiesJson"},{"p":"swervelib.motors","l":"TalonSRXSwerve.CTRE_pidIdx"},{"p":"swervelib.motors","l":"TalonSRXSwerve.CTRE_remoteSensor"},{"p":"swervelib.motors","l":"TalonSRXSwerve.CTRE_slotIdx"},{"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.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.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.imu","l":"SwerveIMU"},{"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.math","l":"SwerveModuleState2"},{"p":"swervelib.motors","l":"SwerveMotor"},{"p":"swervelib.parser","l":"SwerveParser"},{"p":"swervelib.motors","l":"TalonFXSwerve"},{"p":"swervelib.motors","l":"TalonSRXSwerve"}];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.imu","l":"AnalogGyroSwerve"},{"p":"swervelib.parser.json.modules","l":"BoolMotorJson"},{"p":"swervelib.encoders","l":"CANCoderSwerve"},{"p":"swervelib.parser.json","l":"ControllerPropertiesJson"},{"p":"swervelib.motors","l":"TalonSRXSwerve.CTRE_pidIdx"},{"p":"swervelib.motors","l":"TalonSRXSwerve.CTRE_remoteSensor"},{"p":"swervelib.motors","l":"TalonSRXSwerve.CTRE_slotIdx"},{"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.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.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.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.motors","l":"TalonFXSwerve"},{"p":"swervelib.motors","l":"TalonSRXSwerve"}];updateSearchResults(); \ No newline at end of file diff --git a/swervelib/SwerveDrive.java b/swervelib/SwerveDrive.java index 31f15eb..959ae54 100644 --- a/swervelib/SwerveDrive.java +++ b/swervelib/SwerveDrive.java @@ -22,6 +22,7 @@ import swervelib.math.SwerveKinematics2; import swervelib.math.SwerveModuleState2; import swervelib.parser.SwerveControllerConfiguration; import swervelib.parser.SwerveDriveConfiguration; +import swervelib.simulation.SwerveIMUSimulation; /** * Swerve Drive class representing and controlling the swerve drive. @@ -48,7 +49,7 @@ public class SwerveDrive /** * Field object. */ - public Field2d field = new Field2d(); + public Field2d field = new Field2d(); /** * Swerve controller for controlling heading of the robot. */ @@ -58,19 +59,20 @@ public class SwerveDrive */ private SwerveIMU imu; /** - * The current angle of the robot and last time odometry during simulations. + * Simulation of the swerve drive. */ - private double angle, lastTime; + private SwerveIMUSimulation simIMU; /** - * Time during simulations. + * Counter to synchronize the modules relative encoder with absolute encoder when not moving. */ - private Timer timer; + private int moduleSynchronizationCounter = 0; /** - * Creates a new swerve drivebase subsystem. Robot is controlled via the drive() method, or via the setModuleStates() - * method. The drive() method incorporates kinematics— it takes a translation and rotation, as well as parameters for - * field-centric and closed-loop velocity control. setModuleStates() takes a list of SwerveModuleStates and directly - * passes them to the modules. This subsystem also handles odometry. + * Creates a new swerve drivebase subsystem. Robot is controlled via the {@link SwerveDrive#drive} method, or via the + * {@link SwerveDrive#setModuleStates} method. The {@link SwerveDrive#drive} method incorporates kinematics— it takes + * a translation and rotation, as well as parameters for field-centric and closed-loop velocity control. + * {@link SwerveDrive#setModuleStates} takes a list of SwerveModuleStates and directly passes them to the modules. + * This subsystem also handles odometry. * * @param config The {@link SwerveDriveConfiguration} configuration to base the swerve drive off of. * @param controllerConfig The {@link SwerveControllerConfiguration} to use when creating the @@ -87,9 +89,7 @@ public class SwerveDrive // If the robot is real, instantiate the IMU instead. if (!Robot.isReal()) { - timer = new Timer(); - timer.start(); - lastTime = 0; + simIMU = new SwerveIMUSimulation(); } else { imu = config.imu; @@ -105,7 +105,7 @@ public class SwerveDrive 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, 1.0, 0.9)); // x,y,heading in radians; Vision measurement 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 zeroGyro(); SmartDashboard.putData("Field", field); @@ -276,7 +276,7 @@ public class SwerveDrive imu.setYaw(0); } else { - angle = 0; + simIMU.setAngle(0); } swerveController.lastAngle = 0; resetOdometry(new Pose2d(getPose().getTranslation(), new Rotation2d())); @@ -297,7 +297,7 @@ public class SwerveDrive return Rotation2d.fromDegrees(swerveDriveConfiguration.invertedIMU ? 360 - ypr[0] : ypr[0]); } else { - return new Rotation2d(angle); + return simIMU.getYaw(); } } @@ -316,7 +316,7 @@ public class SwerveDrive return Rotation2d.fromDegrees(swerveDriveConfiguration.invertedIMU ? 360 - ypr[1] : ypr[1]); } else { - return new Rotation2d(); + return simIMU.getPitch(); } } @@ -335,12 +335,12 @@ public class SwerveDrive return Rotation2d.fromDegrees(swerveDriveConfiguration.invertedIMU ? 360 - ypr[2] : ypr[2]); } else { - return new Rotation2d(); + return simIMU.getRoll(); } } /** - * Gets the current gyro Rotation3d of the robot, as reported by the imu. + * Gets the current gyro {@link Rotation3d} of the robot, as reported by the imu. * * @return The heading as a {@link Rotation3d} angle */ @@ -357,7 +357,7 @@ public class SwerveDrive Math.toRadians(swerveDriveConfiguration.invertedIMU ? 360 - ypr[0] : ypr[0])); } else { - return new Rotation3d(angle, 0, 0); + return simIMU.getGyroRotation3d(); } } @@ -375,9 +375,10 @@ public class SwerveDrive } /** - * Point all modules toward the robot center, thus making the robot very difficult to move. + * Point all modules toward the robot center, thus making the robot very difficult to move. Forcing the robot to keep + * the current pose. */ - public void setDriveBrake() + public void lockPose() { for (SwerveModule swerveModule : swerveModules) { @@ -418,7 +419,9 @@ public class SwerveDrive } /** - * Update odometry should be run every loop. + * Update odometry should be run every loop. Synchronizes module absolute encoders with relative encoders + * periodically. In simulation mode will also post the pose of each module. Updates SmartDashboard with module encoder + * readings and states. */ public void updateOdometry() { @@ -428,22 +431,34 @@ public class SwerveDrive // Update angle accumulator if the robot is simulated if (!Robot.isReal()) { - angle += kinematics.toChassisSpeeds(getStates()).omegaRadiansPerSecond * (timer.get() - lastTime); - lastTime = timer.get(); - field.getObject("XModules").setPoses(getSwerveModulePoses(swerveDrivePoseEstimator.getEstimatedPosition())); + simIMU.updateOdometry(kinematics, getStates(), + getSwerveModulePoses(swerveDrivePoseEstimator.getEstimatedPosition()), field); } field.setRobotPose(swerveDrivePoseEstimator.getEstimatedPosition()); double[] moduleStates = new double[swerveModules.length * 2]; + double sumOmega = 0; for (SwerveModule module : swerveModules) { - SmartDashboard.putNumber("Module" + module.moduleNumber + "Absolute Encoder", module.getAbsolutePosition()); + SwerveModuleState2 moduleState = module.getState(); + moduleStates[module.moduleNumber] = moduleState.angle.getDegrees(); + moduleStates[module.moduleNumber + 1] = moduleState.speedMetersPerSecond; + sumOmega += Math.abs(moduleState.omegaRadPerSecond); + SmartDashboard.putNumber("Module" + module.moduleNumber + "Relative Encoder", module.getRelativePosition()); - moduleStates[module.moduleNumber] = module.getState().angle.getDegrees(); - moduleStates[module.moduleNumber + 1] = module.getState().speedMetersPerSecond; + SmartDashboard.putNumber("Module" + module.moduleNumber + "Absolute Encoder", module.getAbsolutePosition()); } SmartDashboard.putNumberArray("moduleStates", moduleStates); + + // If the robot isn't moving synchronize the encoders every 100ms (Inspired by democrat's SDS lib) + // To ensure that everytime we initialize it works. + if (sumOmega <= .01 && ++moduleSynchronizationCounter > 5) + { + synchronizeModuleEncoders(); + moduleSynchronizationCounter = 0; + } + } /** @@ -458,15 +473,35 @@ public class SwerveDrive } /** - * Add a vision measurement to the {@link SwerveDrivePoseEstimator} with the given timestamp of the vision - * measurement. THIS WILL BREAK IF UPDATED TOO OFTEN. + * 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 FPGATimestamp, could be taken from - * {@link Timer#getFPGATimestamp()}. + * @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)}. */ - public void addVisionMeasurement(Pose2d robotPose, double timestamp) + public void addVisionMeasurement(Pose2d robotPose, double timestamp, boolean soft) { - swerveDrivePoseEstimator.addVisionMeasurement(robotPose, timestamp); + if (soft) + { + swerveDrivePoseEstimator.addVisionMeasurement(robotPose, timestamp); + } else + { + swerveDrivePoseEstimator.resetPosition(robotPose.getRotation(), getModulePositions(), robotPose); + } + + if (Robot.isReal()) + { + imu.setYaw(swerveDrivePoseEstimator.getEstimatedPosition().getRotation().getDegrees()); + // Yaw reset recommended by Team 1622 + } else + { + simIMU.setAngle(swerveDrivePoseEstimator.getEstimatedPosition().getRotation().getRadians()); + } } } diff --git a/swervelib/SwerveModule.java b/swervelib/SwerveModule.java index b4f8b3c..879b58b 100644 --- a/swervelib/SwerveModule.java +++ b/swervelib/SwerveModule.java @@ -4,13 +4,13 @@ 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.Timer; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import frc.robot.Robot; import swervelib.encoders.SwerveAbsoluteEncoder; import swervelib.math.SwerveModuleState2; import swervelib.motors.SwerveMotor; import swervelib.parser.SwerveModuleConfiguration; +import swervelib.simulation.SwerveModuleSimulation; /** * The Swerve Module class which represents and controls Swerve Modules for the swerve drive. @@ -47,13 +47,9 @@ public class SwerveModule */ public double lastAngle; /** - * Current state. + * Simulated swerve module. */ - public double angle, omega, speed, fakePos, lastTime, dt; - /** - * Timer for simulation. - */ - private Timer time; + private SwerveModuleSimulation simModule; /** * Construct the swerve module and initialize the swerve module motors and absolute encoder. @@ -63,10 +59,10 @@ public class SwerveModule */ public SwerveModule(int moduleNumber, SwerveModuleConfiguration moduleConfiguration) { - angle = 0; - speed = 0; - omega = 0; - fakePos = 0; +// angle = 0; +// speed = 0; +// omega = 0; +// fakePos = 0; this.moduleNumber = moduleNumber; configuration = moduleConfiguration; angleOffset = moduleConfiguration.angleOffset; @@ -110,14 +106,12 @@ public class SwerveModule driveMotor.burnFlash(); angleMotor.burnFlash(); - lastAngle = getState().angle.getDegrees(); - if (!Robot.isReal()) { - time = new Timer(); - time.start(); - lastTime = time.get(); + simModule = new SwerveModuleSimulation(); } + + lastAngle = getState().angle.getDegrees(); } /** @@ -164,14 +158,9 @@ public class SwerveModule if (!Robot.isReal()) { - dt = time.get() - lastTime; - fakePos += (speed * dt); - lastTime = time.get(); + simModule.updateStateAndPosition(desiredState); } - this.angle = desiredState.angle.getDegrees(); - omega = desiredState.omegaRadPerSecond; - speed = desiredState.speedMetersPerSecond; } /** @@ -181,9 +170,8 @@ public class SwerveModule */ public void setAngle(double angle) { - lastAngle = this.angle; - this.angle = angle; angleMotor.setReference(angle, 1 * configuration.angleKV); + lastAngle = angle; } /** @@ -203,9 +191,7 @@ public class SwerveModule omega = Math.toRadians(angleMotor.getVelocity()); } else { - velocity = speed; - azimuth = Rotation2d.fromDegrees(this.angle); - omega = this.omega; + return simModule.getState(); } return new SwerveModuleState2(velocity, azimuth, omega); } @@ -225,8 +211,7 @@ public class SwerveModule azimuth = Rotation2d.fromDegrees(angleMotor.getPosition()); } else { - position = fakePos; - azimuth = Rotation2d.fromDegrees(angle + (Math.toDegrees(omega) * dt)); + return simModule.getPosition(); } SmartDashboard.putNumber("Module " + moduleNumber + "Angle", azimuth.getDegrees()); return new SwerveModulePosition(position, azimuth); diff --git a/swervelib/imu/ADIS16448Swerve.java b/swervelib/imu/ADIS16448Swerve.java new file mode 100644 index 0000000..7f722b0 --- /dev/null +++ b/swervelib/imu/ADIS16448Swerve.java @@ -0,0 +1,84 @@ +package swervelib.imu; + +import edu.wpi.first.wpilibj.ADIS16448_IMU; +import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; + +/** + * IMU Swerve class for the {@link ADIS16448_IMU} device. + */ +public class ADIS16448Swerve extends SwerveIMU +{ + + /** + * {@link ADIS16448_IMU} device to read the current headings from. + */ + private final ADIS16448_IMU imu; + /** + * Offset for the ADIS16448 yaw reading. + */ + private double yawOffset = 0; + + /** + * Construct the ADIS16448 imu and reset default configurations. Publish the gyro to the SmartDashboard. + */ + public ADIS16448Swerve() + { + imu = new ADIS16448_IMU(); + factoryDefault(); + SmartDashboard.putData(imu); + } + + /** + * Reset IMU to factory default. + */ + @Override + public void factoryDefault() + { + yawOffset = imu.getAngle() % 360; + } + + /** + * Clear sticky faults on IMU. + */ + @Override + public void clearStickyFaults() + { + // Do nothing. + } + + /** + * Set the yaw in degrees. + * + * @param yaw Yaw angle in degrees. + */ + @Override + public void setYaw(double yaw) + { + yawOffset = (yaw % 360) + (imu.getAngle() % 360); + } + + /** + * Fetch the yaw/pitch/roll from the IMU. + * + * @param yprArray Array which will be filled with {yaw, pitch, roll} in degrees. + */ + @Override + public void getYawPitchRoll(double[] yprArray) + { + yprArray[0] = (imu.getAngle() % 360) - yawOffset; + yprArray[1] = imu.getXComplementaryAngle() % 360; + yprArray[2] = imu.getYComplementaryAngle() % 360; + } + + /** + * Get the instantiated IMU object. + * + * @return IMU object. + */ + @Override + public Object getIMU() + { + return imu; + } +} + diff --git a/swervelib/imu/ADIS16470Swerve.java b/swervelib/imu/ADIS16470Swerve.java new file mode 100644 index 0000000..34e8aef --- /dev/null +++ b/swervelib/imu/ADIS16470Swerve.java @@ -0,0 +1,83 @@ +package swervelib.imu; + +import edu.wpi.first.wpilibj.ADIS16470_IMU; +import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; + +/** + * IMU Swerve class for the {@link ADIS16470_IMU} device. + */ +public class ADIS16470Swerve extends SwerveIMU +{ + + /** + * {@link ADIS16470_IMU} device to read the current headings from. + */ + private final ADIS16470_IMU imu; + /** + * Offset for the ADIS16470 yaw reading. + */ + private double yawOffset = 0; + + /** + * Construct the ADIS16470 imu and reset default configurations. Publish the gyro to the SmartDashboard. + */ + public ADIS16470Swerve() + { + imu = new ADIS16470_IMU(); + factoryDefault(); + SmartDashboard.putData(imu); + } + + /** + * Reset IMU to factory default. + */ + @Override + public void factoryDefault() + { + yawOffset = imu.getAngle() % 360; + } + + /** + * Clear sticky faults on IMU. + */ + @Override + public void clearStickyFaults() + { + // Do nothing. + } + + /** + * Set the yaw in degrees. + * + * @param yaw Yaw angle in degrees. + */ + @Override + public void setYaw(double yaw) + { + yawOffset = (yaw % 360) + (imu.getAngle() % 360); + } + + /** + * Fetch the yaw/pitch/roll from the IMU. + * + * @param yprArray Array which will be filled with {yaw, pitch, roll} in degrees. + */ + @Override + public void getYawPitchRoll(double[] yprArray) + { + yprArray[0] = (imu.getAngle() % 360) - yawOffset; + yprArray[1] = imu.getXComplementaryAngle() % 360; + yprArray[2] = imu.getYComplementaryAngle() % 360; + } + + /** + * Get the instantiated IMU object. + * + * @return IMU object. + */ + @Override + public Object getIMU() + { + return imu; + } +} diff --git a/swervelib/imu/ADXRS450Swerve.java b/swervelib/imu/ADXRS450Swerve.java new file mode 100644 index 0000000..e32ba7c --- /dev/null +++ b/swervelib/imu/ADXRS450Swerve.java @@ -0,0 +1,84 @@ +package swervelib.imu; + +import edu.wpi.first.wpilibj.ADXRS450_Gyro; +import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; + +/** + * IMU Swerve class for the {@link ADXRS450_Gyro} device. + */ +public class ADXRS450Swerve extends SwerveIMU +{ + + /** + * {@link ADXRS450_Gyro} device to read the current headings from. + */ + private final ADXRS450_Gyro imu; + /** + * Offset for the ADXRS450 yaw reading. + */ + private double yawOffset = 0; + + /** + * Construct the ADXRS450 imu and reset default configurations. Publish the gyro to the SmartDashboard. + */ + public ADXRS450Swerve() + { + imu = new ADXRS450_Gyro(); + factoryDefault(); + SmartDashboard.putData(imu); + } + + /** + * Reset IMU to factory default. + */ + @Override + public void factoryDefault() + { + yawOffset = imu.getAngle() % 360; + } + + /** + * Clear sticky faults on IMU. + */ + @Override + public void clearStickyFaults() + { + // Do nothing. + } + + /** + * Set the yaw in degrees. + * + * @param yaw Yaw angle in degrees. + */ + @Override + public void setYaw(double yaw) + { + yawOffset = (yaw % 360) + (imu.getAngle() % 360); + } + + /** + * Fetch the yaw/pitch/roll from the IMU. + * + * @param yprArray Array which will be filled with {yaw, pitch, roll} in degrees. + */ + @Override + public void getYawPitchRoll(double[] yprArray) + { + yprArray[0] = (imu.getAngle() % 360) - yawOffset; + yprArray[1] = 0; + yprArray[2] = 0; + } + + /** + * Get the instantiated IMU object. + * + * @return IMU object. + */ + @Override + public Object getIMU() + { + return imu; + } + +} diff --git a/swervelib/imu/AnalogGyroSwerve.java b/swervelib/imu/AnalogGyroSwerve.java new file mode 100644 index 0000000..3b5cdc9 --- /dev/null +++ b/swervelib/imu/AnalogGyroSwerve.java @@ -0,0 +1,89 @@ +package swervelib.imu; + +import edu.wpi.first.wpilibj.AnalogGyro; +import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; + +/** + * Creates a IMU for {@link edu.wpi.first.wpilibj.AnalogGyro} devices, only uses yaw. + */ +public class AnalogGyroSwerve extends SwerveIMU +{ + + /** + * Gyroscope object. + */ + private final AnalogGyro gyro; + /** + * The yaw offset for the gyroscope. + */ + private double yawOffset; + + /** + * Analog port in which the gyroscope is connected. Can only be attached to analog ports 0 or 1. + * + * @param channel Analog port 0 or 1. + */ + public AnalogGyroSwerve(int channel) + { + if (!(channel == 0 || channel == 1)) + { + throw new RuntimeException("Analog Gyroscope must be attached to port 0 or 1 on the roboRIO.\n"); + } + gyro = new AnalogGyro(channel); + SmartDashboard.putData(gyro); + factoryDefault(); + } + + /** + * Reset IMU to factory default. + */ + @Override + public void factoryDefault() + { + yawOffset = gyro.getAngle() % 360; + } + + /** + * Clear sticky faults on IMU. + */ + @Override + public void clearStickyFaults() + { + // Do nothing. + } + + /** + * Set the yaw in degrees. + * + * @param yaw Yaw angle in degrees. + */ + @Override + public void setYaw(double yaw) + { + yawOffset = (yaw % 360) + (gyro.getAngle() % 360); + } + + /** + * Fetch the yaw/pitch/roll from the IMU. + * + * @param yprArray Array which will be filled with {yaw, pitch, roll} in degrees. + */ + @Override + public void getYawPitchRoll(double[] yprArray) + { + yprArray[0] = (gyro.getAngle() % 360) - yawOffset; + yprArray[1] = 0; + yprArray[2] = 0; + } + + /** + * Get the instantiated IMU object. + * + * @return IMU object. + */ + @Override + public Object getIMU() + { + return gyro; + } +} diff --git a/swervelib/imu/NavXSwerve.java b/swervelib/imu/NavXSwerve.java index 0a6c101..ac9e6f4 100644 --- a/swervelib/imu/NavXSwerve.java +++ b/swervelib/imu/NavXSwerve.java @@ -45,7 +45,7 @@ public class NavXSwerve extends SwerveIMU public void factoryDefault() { // gyro.reset(); // Reported to be slow - yawOffset = gyro.getYaw(); + yawOffset = gyro.getYaw() % 360; } /** @@ -65,10 +65,7 @@ public class NavXSwerve extends SwerveIMU public void setYaw(double yaw) { // gyro.reset(); // Reported to be slow using the offset. - if (yaw != 0) - { - yawOffset = yaw + gyro.getYaw(); - } + yawOffset = (yaw % 360) + (gyro.getYaw() % 360); } /** @@ -79,9 +76,9 @@ public class NavXSwerve extends SwerveIMU @Override public void getYawPitchRoll(double[] yprArray) { - yprArray[0] = gyro.getYaw() - yawOffset; - yprArray[1] = gyro.getPitch(); - yprArray[2] = gyro.getRoll(); + yprArray[0] = (gyro.getYaw() % 360) - yawOffset; + yprArray[1] = gyro.getPitch() % 360; + yprArray[2] = gyro.getRoll() % 360; } /** diff --git a/swervelib/math/SwerveMath.java b/swervelib/math/SwerveMath.java index 127d699..105dc9b 100644 --- a/swervelib/math/SwerveMath.java +++ b/swervelib/math/SwerveMath.java @@ -115,7 +115,8 @@ public class SwerveMath /** * Calculates the maximum acceleration allowed in a direction without tipping the robot. Reads arm position from - * NetworkTables and is passed the direction in question. + * NetworkTables and is passed the direction in question.
    Requires modules to be named:
    "frontright.json", "frontleft.json", "backright.json", "backleft.json"
    * * @param angle The direction in which to calculate max acceleration, as a Rotation2d. Note that this * is robot-relative. @@ -182,7 +183,8 @@ public class SwerveMath /** * Limits a commanded velocity to prevent exceeding the maximum acceleration given by * {@link SwerveMath#calcMaxAccel(Rotation2d, double, double, Translation3d, SwerveDriveConfiguration)}. Note that - * this takes and returns field-relative velocities. + * this takes and returns field-relative velocities.
    Requires modules to be named:
    "frontright.json", + * "frontleft.json", "backright.json", "backleft.json"
    * * @param commandedVelocity The desired velocity * @param fieldVelocity The velocity of the robot within a field relative state. diff --git a/swervelib/motors/TalonFXSwerve.java b/swervelib/motors/TalonFXSwerve.java index d6ee95d..d49470a 100644 --- a/swervelib/motors/TalonFXSwerve.java +++ b/swervelib/motors/TalonFXSwerve.java @@ -29,11 +29,11 @@ public class TalonFXSwerve extends SwerveMotor /** * Whether the absolute encoder is integrated. */ - private boolean absoluteEncoder = false; + private boolean absoluteEncoder = false; /** * The position conversion factor. */ - private double positionConversionFactor = 1; + private double positionConversionFactor = 1; /** * Constructor for TalonFX swerve motor. diff --git a/swervelib/parser/json/DeviceJson.java b/swervelib/parser/json/DeviceJson.java index 33f08e2..70438f7 100644 --- a/swervelib/parser/json/DeviceJson.java +++ b/swervelib/parser/json/DeviceJson.java @@ -3,6 +3,10 @@ package swervelib.parser.json; import swervelib.encoders.CANCoderSwerve; import swervelib.encoders.SparkMaxEncoderSwerve; import swervelib.encoders.SwerveAbsoluteEncoder; +import swervelib.imu.ADIS16448Swerve; +import swervelib.imu.ADIS16470Swerve; +import swervelib.imu.ADXRS450Swerve; +import swervelib.imu.AnalogGyroSwerve; import swervelib.imu.NavXSwerve; import swervelib.imu.Pigeon2Swerve; import swervelib.imu.PigeonSwerve; @@ -59,6 +63,14 @@ public class DeviceJson { switch (type) { + case "adis16448": + return new ADIS16448Swerve(); + case "adis16470": + return new ADIS16470Swerve(); + case "adxrs450": + return new ADXRS450Swerve(); + case "analog": + return new AnalogGyroSwerve(id); case "navx": return new NavXSwerve(); case "pigeon": diff --git a/swervelib/simulation/SwerveIMUSimulation.java b/swervelib/simulation/SwerveIMUSimulation.java new file mode 100644 index 0000000..069c801 --- /dev/null +++ b/swervelib/simulation/SwerveIMUSimulation.java @@ -0,0 +1,106 @@ +package swervelib.simulation; + +import edu.wpi.first.math.geometry.Pose2d; +import edu.wpi.first.math.geometry.Rotation2d; +import edu.wpi.first.math.geometry.Rotation3d; +import edu.wpi.first.wpilibj.Timer; +import edu.wpi.first.wpilibj.smartdashboard.Field2d; +import swervelib.math.SwerveKinematics2; +import swervelib.math.SwerveModuleState2; + +/** + * Simulation for {@link swervelib.SwerveDrive} IMU. + */ +public class SwerveIMUSimulation +{ + + /** + * Main timer to control movement estimations. + */ + private final Timer timer; + /** + * The last time the timer was read, used to determine position changes. + */ + private double lastTime; + /** + * Heading of the robot. + */ + private double angle; + + /** + * Create the swerve drive IMU simulation. + */ + public SwerveIMUSimulation() + { + timer = new Timer(); + timer.start(); + lastTime = timer.get(); + } + + /** + * Get the estimated angle of the robot. + * + * @return {@link Rotation2d} estimation of the robot. + */ + public Rotation2d getYaw() + { + return new Rotation2d(angle); + } + + /** + * Pitch is not simulated currently, always returns 0. + * + * @return Pitch of the robot as {@link Rotation2d}. + */ + public Rotation2d getPitch() + { + return new Rotation2d(); + } + + /** + * Roll is not simulated currently, always returns 0. + * + * @return Roll of the robot as {@link Rotation2d}. + */ + public Rotation2d getRoll() + { + return new Rotation2d(); + } + + /** + * Gets the estimated gyro {@link Rotation3d} of the robot. + * + * @return The heading as a {@link Rotation3d} angle + */ + public Rotation3d getGyroRotation3d() + { + return new Rotation3d(0, 0, angle); + } + + /** + * Update the odometry of the simulated {@link swervelib.SwerveDrive} and post the {@link swervelib.SwerveModule} + * states to the {@link Field2d}. + * + * @param kinematics {@link SwerveKinematics2} of the swerve drive. + * @param states {@link SwerveModuleState2} array of the module states. + * @param modulePoses {@link Pose2d} representing the swerve modules. + * @param field {@link Field2d} to update. + */ + public void updateOdometry(SwerveKinematics2 kinematics, SwerveModuleState2[] states, Pose2d[] modulePoses, + Field2d field) + { + angle += kinematics.toChassisSpeeds(states).omegaRadiansPerSecond * (timer.get() - lastTime); + lastTime = timer.get(); + field.getObject("XModules").setPoses(modulePoses); + } + + /** + * Set the heading of the robot. + * + * @param angle Angle of the robot in radians. + */ + public void setAngle(double angle) + { + this.angle = angle; + } +} diff --git a/swervelib/simulation/SwerveModuleSimulation.java b/swervelib/simulation/SwerveModuleSimulation.java new file mode 100644 index 0000000..8c635f6 --- /dev/null +++ b/swervelib/simulation/SwerveModuleSimulation.java @@ -0,0 +1,88 @@ +package swervelib.simulation; + +import edu.wpi.first.math.geometry.Rotation2d; +import edu.wpi.first.math.kinematics.SwerveModulePosition; +import edu.wpi.first.wpilibj.Timer; +import swervelib.math.SwerveModuleState2; + +/** + * Class to hold simulation data for {@link swervelib.SwerveModule} + */ +public class SwerveModuleSimulation +{ + + /** + * Main timer to simulate the passage of time. + */ + private final Timer timer; + /** + * Time delta since last update + */ + private double dt; + /** + * Fake motor position. + */ + private double fakePos; + /** + * The fake speed of the previous state, used to calculate {@link SwerveModuleSimulation#fakePos}. + */ + private double fakeSpeed; + /** + * Last time queried. + */ + private double lastTime; + /** + * Current simulated swerve module state. + */ + private SwerveModuleState2 state; + + /** + * Create simulation class and initialize module at 0. + */ + public SwerveModuleSimulation() + { + timer = new Timer(); + timer.start(); + lastTime = timer.get(); + state = new SwerveModuleState2(0, Rotation2d.fromDegrees(0), 0); + fakeSpeed = 0; + fakePos = 0; + dt = 0; + } + + /** + * Update the position and state of the module. Called from {@link swervelib.SwerveModule#setDesiredState} function + * when simulated. + * + * @param desiredState State the swerve module is set to. + */ + public void updateStateAndPosition(SwerveModuleState2 desiredState) + { + dt = timer.get() - lastTime; + fakePos += (fakeSpeed * dt); + lastTime = timer.get(); + + state = desiredState; + fakeSpeed = desiredState.speedMetersPerSecond; + } + + /** + * Get the simulated swerve module position. + * + * @return {@link SwerveModulePosition} of the simulated module. + */ + public SwerveModulePosition getPosition() + { + return new SwerveModulePosition(fakePos, state.angle.plus(new Rotation2d(state.omegaRadPerSecond * dt))); + } + + /** + * Get the {@link SwerveModuleState2} of the simulated module. + * + * @return {@link SwerveModuleState2} of the simulated module. + */ + public SwerveModuleState2 getState() + { + return state; + } +}