Package swervelib.telemetry
Class SwerveDriveTelemetry
java.lang.Object
swervelib.telemetry.SwerveDriveTelemetry
Telemetry to describe the
SwerveDrive
following frc-web-components. (Which
follows AdvantageKit)-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Verbosity of telemetry data sent back. -
Field Summary
Modifier and TypeFieldDescriptionstatic final Alert
AnAlert
for if the CAN ID is greater than 40.static double[]
Describes the desired forward, sideways and angular velocity of the robot.static double[]
An array of rotation and velocity values describing the desired state of each swerve modulestatic String
The direction the robot should be facing when the "Robot Rotation" is zero or blank.static final Alert
AnAlert
for if there is an I2C lockup issue on the roboRIO.static boolean
State of simulation of the Robot, used to optimize retrieval.static double
The maximum achievable angular velocity of the robot.static double
The maximum achievable speed of the modules, used to adjust the size of the vectors.static double[]
The maximum achievable angular velocity of the robot.static double[]
An array of rotation and velocity values describing the measured state of each swerve modulestatic int
The number of swerve modulesstatic double
The robot's current rotation based on odometry or gyro readingsstatic String
The units of the module rotations and robot rotationstatic final Alert
NavX serial comm issue.static double
The distance between the front and back modules.static double
The distance between the left and right modules.The current telemetry verbosity level.static double[]
The Locations of the swerve drive wheels. -
Constructor Summary
-
Method Summary
-
Field Details
-
canIdWarning
AnAlert
for if the CAN ID is greater than 40. -
i2cLockupWarning
AnAlert
for if there is an I2C lockup issue on the roboRIO. -
serialCommsIssueWarning
NavX serial comm issue. -
verbosity
The current telemetry verbosity level. -
isSimulation
public static boolean isSimulationState of simulation of the Robot, used to optimize retrieval. -
moduleCount
public static int moduleCountThe number of swerve modules -
wheelLocations
public static double[] wheelLocationsThe Locations of the swerve drive wheels. -
measuredStates
public static double[] measuredStatesAn array of rotation and velocity values describing the measured state of each swerve module -
desiredStates
public static double[] desiredStatesAn array of rotation and velocity values describing the desired state of each swerve module -
robotRotation
public static double robotRotationThe robot's current rotation based on odometry or gyro readings -
maxSpeed
public static double maxSpeedThe maximum achievable speed of the modules, used to adjust the size of the vectors. -
rotationUnit
The units of the module rotations and robot rotation -
sizeLeftRight
public static double sizeLeftRightThe distance between the left and right modules. -
sizeFrontBack
public static double sizeFrontBackThe distance between the front and back modules. -
forwardDirection
The direction the robot should be facing when the "Robot Rotation" is zero or blank. This option is often useful to align with odometry data or match videos. 'up', 'right', 'down' or 'left' -
maxAngularVelocity
public static double maxAngularVelocityThe maximum achievable angular velocity of the robot. This is used to visualize the angular velocity from the chassis speeds properties. -
measuredChassisSpeeds
public static double[] measuredChassisSpeedsThe maximum achievable angular velocity of the robot. This is used to visualize the angular velocity from the chassis speeds properties. -
desiredChassisSpeeds
public static double[] desiredChassisSpeedsDescribes the desired forward, sideways and angular velocity of the robot.
-
-
Constructor Details
-
SwerveDriveTelemetry
public SwerveDriveTelemetry()
-
-
Method Details
-
updateData
public static void updateData()Upload data to smartdashboard
-