diff --git a/docs/allclasses-index.html b/docs/allclasses-index.html index d89a5cc..da70b13 100644 --- a/docs/allclasses-index.html +++ b/docs/allclasses-index.html @@ -1,7 +1,7 @@
- +SwerveDrivePoseEstimator with the given timestamp of the vision
+ measurement.Rotation2d.voiddrive(edu.wpi.first.math.geometry.Translation2d translation,
+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.
+
+void
+drive(edu.wpi.first.math.geometry.Translation2d translation,
double rotation,
boolean fieldRelative,
boolean isOpenLoop)
-
+
The primary method for controlling the drivebase.
-edu.wpi.first.math.kinematics.ChassisSpeeds
-
-
+edu.wpi.first.math.kinematics.ChassisSpeeds
+
+
Gets the current field-relative velocity (x, y and omega) of the robot
-edu.wpi.first.math.geometry.Rotation3d
-
-
+edu.wpi.first.math.geometry.Rotation3d
+
+
Gets the current gyro Rotation3d of the robot, as reported by the imu.
-edu.wpi.first.math.kinematics.SwerveModulePosition[]
-
-
+edu.wpi.first.math.kinematics.SwerveModulePosition[]
+
+
Gets the current module positions (azimuth and wheel position (meters))
-edu.wpi.first.math.geometry.Rotation2d
-getPitch()
-
+edu.wpi.first.math.geometry.Rotation2d
+getPitch()
+
Gets the current pitch angle of the robot, as reported by the imu.
-edu.wpi.first.math.geometry.Pose2d
-getPose()
-
+edu.wpi.first.math.geometry.Pose2d
+getPose()
+
Gets the current pose (position and rotation) of the robot, as reported by odometry.
-edu.wpi.first.math.kinematics.ChassisSpeeds
-
-
+edu.wpi.first.math.kinematics.ChassisSpeeds
+
+
Gets the current robot-relative velocity (x, y and omega) of the robot
-edu.wpi.first.math.geometry.Rotation2d
-getRoll()
-
+edu.wpi.first.math.geometry.Rotation2d
+getRoll()
+
Gets the current roll angle of the robot, as reported by the imu.
-
-
-
+
+
+
Gets the current module states (azimuth and velocity)
-edu.wpi.first.math.geometry.Pose2d[]
-getSwerveModulePoses(edu.wpi.first.math.geometry.Pose2d robotPose)
-
+edu.wpi.first.math.geometry.Pose2d[]
+getSwerveModulePoses(edu.wpi.first.math.geometry.Pose2d robotPose)
+
Get the swerve module poses and on the field relative to the robot.
-edu.wpi.first.math.geometry.Rotation2d
-getYaw()
-
+edu.wpi.first.math.geometry.Rotation2d
+getYaw()
+
Gets the current yaw angle of the robot, as reported by the imu.
-void
-lock()
-
+void
+lock()
+
Lock the swerve drive to prevent it from moving.
-void
-replaceSwerveModuleFeedforward(edu.wpi.first.math.controller.SimpleMotorFeedforward feedforward)
-
+void
+replaceSwerveModuleFeedforward(edu.wpi.first.math.controller.SimpleMotorFeedforward feedforward)
+
Setup the swerve module feedforward.
-void
-resetOdometry(edu.wpi.first.math.geometry.Pose2d pose)
-
+void
+resetOdometry(edu.wpi.first.math.geometry.Pose2d pose)
+
Resets odometry to the given pose.
-void
-setChassisSpeeds(edu.wpi.first.math.kinematics.ChassisSpeeds chassisSpeeds)
-
+void
+setChassisSpeeds(edu.wpi.first.math.kinematics.ChassisSpeeds chassisSpeeds)
+
Set field-relative chassis speeds with closed-loop velocity control.
-void
-
-
+void
+
+
Point all modules toward the robot center, thus making the robot very difficult to move.
-void
-setModuleStates(SwerveModuleState2[] desiredStates,
+void
+setModuleStates(SwerveModuleState2[] desiredStates,
boolean isOpenLoop)
-
+
Set the module states (azimuth and velocity) directly.
-void
-setMotorBrake(boolean brake)
-
+void
+setMotorBrake(boolean brake)
+
Sets the drive motors to brake/coast mode.
-void
-
-
+void
+
+
Synchronize angle motor integrated encoders with data from absolute encoders.
-void
-
-
+void
+
+
Update odometry should be run every loop.
-void
-zeroGyro()
-
+void
+zeroGyro()
+
Resets the gyro angle to zero and resets odometry to the same position, but facing toward 0.
@@ -630,6 +637,21 @@ loadScripts(document, 'script');
Synchronize angle motor integrated encoders with data from absolute encoders.
+
+
+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.
+
+- Parameters:
+robotPose - Robot Pose2d as measured by vision.
+timestamp - Timestamp the measurement was taken as time since FPGATimestamp, could be taken from
+ Timer.getFPGATimestamp().
+
+
+
diff --git a/docs/swervelib/SwerveModule.html b/docs/swervelib/SwerveModule.html
index 2bfe44b..e012fc3 100644
--- a/docs/swervelib/SwerveModule.html
+++ b/docs/swervelib/SwerveModule.html
@@ -1,7 +1,7 @@
-
+
SwerveModule
diff --git a/docs/swervelib/encoders/CANCoderSwerve.html b/docs/swervelib/encoders/CANCoderSwerve.html
index 388b019..c76689d 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 1d459ac..5ce3efb 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 e7f6f7f..39d0ef8 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 cef0a12..fa3dd18 100644
--- a/docs/swervelib/encoders/package-summary.html
+++ b/docs/swervelib/encoders/package-summary.html
@@ -1,7 +1,7 @@
-
+
swervelib.encoders
diff --git a/docs/swervelib/encoders/package-tree.html b/docs/swervelib/encoders/package-tree.html
index d8a46cc..7e2a768 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/NavXSwerve.html b/docs/swervelib/imu/NavXSwerve.html
index 63ca7a8..a0b33b1 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 c98f0fc..aebacb0 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 3a01db3..4b8bbdb 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 87a1a39..53660f6 100644
--- a/docs/swervelib/imu/SwerveIMU.html
+++ b/docs/swervelib/imu/SwerveIMU.html
@@ -1,7 +1,7 @@
-
+
SwerveIMU
diff --git a/docs/swervelib/imu/package-summary.html b/docs/swervelib/imu/package-summary.html
index f4db2cd..f3fcb50 100644
--- a/docs/swervelib/imu/package-summary.html
+++ b/docs/swervelib/imu/package-summary.html
@@ -1,7 +1,7 @@
-
+
swervelib.imu
diff --git a/docs/swervelib/imu/package-tree.html b/docs/swervelib/imu/package-tree.html
index ad97d45..2345bfd 100644
--- a/docs/swervelib/imu/package-tree.html
+++ b/docs/swervelib/imu/package-tree.html
@@ -1,7 +1,7 @@
-
+
swervelib.imu Class Hierarchy
diff --git a/docs/swervelib/math/SwerveKinematics2.html b/docs/swervelib/math/SwerveKinematics2.html
index 54c2a0b..1576335 100644
--- a/docs/swervelib/math/SwerveKinematics2.html
+++ b/docs/swervelib/math/SwerveKinematics2.html
@@ -1,7 +1,7 @@
-
+
SwerveKinematics2
@@ -81,8 +81,8 @@ loadScripts(document, 'script');
public class SwerveKinematics2
extends edu.wpi.first.math.kinematics.SwerveDriveKinematics
Clone of WPI SwerveKinematics, which implements second order kinematics when calculating modules states from chassis
- speed.
- Makes use of SwerveModuleState2 to add the angular velocity that is required of the module as an output.
+ speed. Makes use of SwerveModuleState2 to add the angular velocity that is required of the module as an
+ output.
diff --git a/docs/swervelib/math/SwerveMath.html b/docs/swervelib/math/SwerveMath.html
index 5a4e174..ebc3af5 100644
--- a/docs/swervelib/math/SwerveMath.html
+++ b/docs/swervelib/math/SwerveMath.html
@@ -1,7 +1,7 @@
-
+
SwerveMath
diff --git a/docs/swervelib/math/SwerveModuleState2.html b/docs/swervelib/math/SwerveModuleState2.html
index 128774a..03efca3 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 c881bcf..2cee4ec 100644
--- a/docs/swervelib/math/package-summary.html
+++ b/docs/swervelib/math/package-summary.html
@@ -1,7 +1,7 @@
-
+
swervelib.math
diff --git a/docs/swervelib/math/package-tree.html b/docs/swervelib/math/package-tree.html
index 17473c9..04516c3 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 e22edd7..f8e3e50 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 fcc44e8..3d851b5 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 d54ee9b..25a3598 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 a668c08..a104784 100644
--- a/docs/swervelib/motors/TalonFXSwerve.html
+++ b/docs/swervelib/motors/TalonFXSwerve.html
@@ -1,7 +1,7 @@
-
+
TalonFXSwerve
@@ -273,13 +273,6 @@ loadScripts(document, 'script');
Field Details
-
-
-motor
-com.ctre.phoenix.motorcontrol.can.WPI_TalonFX motor
-TalonFX motor controller.
-
-
--
factoryDefaultOccurred
private final boolean factoryDefaultOccurred
@@ -295,6 +288,13 @@ loadScripts(document, 'script');
-
+
+motor
+com.ctre.phoenix.motorcontrol.can.WPI_TalonFX motor
+TalonFX motor controller.
+
+
+-
absoluteEncoder
private boolean absoluteEncoder
diff --git a/docs/swervelib/motors/TalonSRXSwerve.CTRE_pidIdx.html b/docs/swervelib/motors/TalonSRXSwerve.CTRE_pidIdx.html
index 2620809..fa6d70c 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 38c7904..a1bef98 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 21dd08a..f2028ea 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 ca52652..c48dd54 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 bc04965..db39230 100644
--- a/docs/swervelib/motors/package-summary.html
+++ b/docs/swervelib/motors/package-summary.html
@@ -1,7 +1,7 @@
-
+
swervelib.motors
diff --git a/docs/swervelib/motors/package-tree.html b/docs/swervelib/motors/package-tree.html
index c657952..7ff6dca 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 60e010d..63796dc 100644
--- a/docs/swervelib/package-summary.html
+++ b/docs/swervelib/package-summary.html
@@ -1,7 +1,7 @@
-
+
swervelib
diff --git a/docs/swervelib/package-tree.html b/docs/swervelib/package-tree.html
index e3a229a..9016fd2 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 21d7dd5..7646cd6 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 751e66d..1b4040c 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 b3af8c3..e07fc7b 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 b13390e..63a8803 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 5db3531..fb07157 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 a185a55..0fa420d 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 9d5d864..bc54823 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 a130248..515b309 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 fd018a0..db63d6b 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 efbca26..c74f72d 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 e396ca5..f16c65d 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 bdd82f1..df082bd 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 7fbfeef..587d2f3 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 bc18b2b..d2dd9ab 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 a54eb6c..7fc4ce6 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 b651770..4ff6a4b 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 06b7936..121e1e8 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 e81fef7..47fcd53 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 b59d162..1755925 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 4aed5ee..7fc9c8e 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 478ac97..38c0549 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 5c10706..09cacd8 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 d1fde8e..0bfb2ff 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 3e332f5..4ef5f5b 100644
--- a/docs/swervelib/parser/package-summary.html
+++ b/docs/swervelib/parser/package-summary.html
@@ -1,7 +1,7 @@
-
+
swervelib.parser
diff --git a/docs/swervelib/parser/package-tree.html b/docs/swervelib/parser/package-tree.html
index 1d13a4b..03d6b88 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/swervelib/SwerveDrive.java b/swervelib/SwerveDrive.java
index 06e4399..a8b0488 100644
--- a/swervelib/SwerveDrive.java
+++ b/swervelib/SwerveDrive.java
@@ -461,4 +461,17 @@ public class SwerveDrive
module.synchronizeEncoders();
}
}
+
+ /**
+ * Add a vision measurement to the {@link SwerveDrivePoseEstimator} 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()}.
+ */
+ public void addVisionMeasurement(Pose2d robotPose, double timestamp)
+ {
+ swerveDrivePoseEstimator.addVisionMeasurement(robotPose, timestamp);
+ }
}
diff --git a/swervelib/SwerveModule.java b/swervelib/SwerveModule.java
index 5f1d12a..2e9d2cb 100644
--- a/swervelib/SwerveModule.java
+++ b/swervelib/SwerveModule.java
@@ -200,7 +200,7 @@ public class SwerveModule
{
velocity = driveMotor.getVelocity();
azimuth = Rotation2d.fromDegrees(angleMotor.getPosition());
- omega = angleMotor.getVelocity();
+ omega = Math.toRadians(angleMotor.getVelocity());
} else
{
velocity = speed;
diff --git a/swervelib/motors/TalonFXSwerve.java b/swervelib/motors/TalonFXSwerve.java
index 4139994..d6ee95d 100644
--- a/swervelib/motors/TalonFXSwerve.java
+++ b/swervelib/motors/TalonFXSwerve.java
@@ -18,14 +18,14 @@ import swervelib.parser.PIDFConfig;
public class TalonFXSwerve extends SwerveMotor
{
+ /**
+ * Factory default already occurred.
+ */
+ private final boolean factoryDefaultOccurred = false;
/**
* TalonFX motor controller.
*/
WPI_TalonFX motor;
- /**
- * Factory default already occurred.
- */
- private final boolean factoryDefaultOccurred = false;
/**
* Whether the absolute encoder is integrated.
*/
@@ -218,7 +218,7 @@ public class TalonFXSwerve extends SwerveMotor
@Override
public double getVelocity()
{
- return motor.getSelectedSensorVelocity() * (100 * positionConversionFactor);
+ return motor.getSelectedSensorVelocity() * (10 * positionConversionFactor);
}
/**
diff --git a/swervelib/motors/TalonSRXSwerve.java b/swervelib/motors/TalonSRXSwerve.java
index 71317d3..3e43a8a 100644
--- a/swervelib/motors/TalonSRXSwerve.java
+++ b/swervelib/motors/TalonSRXSwerve.java
@@ -206,7 +206,7 @@ public class TalonSRXSwerve extends SwerveMotor
@Override
public double getVelocity()
{
- return motor.getSelectedSensorVelocity() * (100 * positionConversionFactor);
+ return motor.getSelectedSensorVelocity() * (10 * positionConversionFactor);
}
/**