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
Nested ClassesModifier and TypeClassDescriptionstatic enumVerbosity of telemetry data sent back. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic 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 StringThe direction the robot should be facing when the "Robot Rotation" is zero or blank.static booleanState of simulation of the Robot, used to optimize retrieval.static doubleThe maximum achievable angular velocity of the robot.static doubleThe 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 intThe number of swerve modulesstatic doubleThe robot's current rotation based on odometry or gyro readingsstatic StringThe units of the module rotations and robot rotationstatic doubleThe distance between the front and back modules.static doubleThe distance between the left and right modules.The current telemetry verbosity level.static double[]The number of swerve modules -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
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 number of swerve modules -
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
-