Updated documentation. Added swerve measurement function

This commit is contained in:
thenetworkgrinch
2023-02-14 22:37:45 -06:00
parent 9a7ba52cee
commit 54f7e442f7
92 changed files with 206 additions and 166 deletions

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>All Classes and Interfaces</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>All Packages</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>Constant Field Values</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>API Help</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>A-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -85,6 +85,11 @@ loadScripts(document, 'script');</script>
<dd>
<div class="block">Absolute encoder offset from 0 in degrees.</div>
</dd>
<dt><a href="../swervelib/SwerveDrive.html#addVisionMeasurement(edu.wpi.first.math.geometry.Pose2d,double)" class="member-name-link">addVisionMeasurement(Pose2d, double)</a> - Method in class swervelib.<a href="../swervelib/SwerveDrive.html" title="class in swervelib">SwerveDrive</a></dt>
<dd>
<div class="block">Add a vision measurement to the <code>SwerveDrivePoseEstimator</code> with the given timestamp of the vision
measurement.</div>
</dd>
<dt><a href="../swervelib/math/SwerveModuleState2.html#angle" class="member-name-link">angle</a> - Variable in class swervelib.math.<a href="../swervelib/math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a></dt>
<dd>
<div class="block">Swerve module angle as a <code>Rotation2d</code>.</div>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>K-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>L-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>M-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>N-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>O-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>P-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>R-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>S-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>T-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>U-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>B-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>V-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>W-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>X-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>Y-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>Z-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>C-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>D-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>E-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>F-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>G-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>H-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>I-Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>Overview</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>Generated Documentation (Untitled)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>SwerveController</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>SwerveDrive</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -172,112 +172,119 @@ loadScripts(document, 'script');</script>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#drive(edu.wpi.first.math.geometry.Translation2d,double,boolean,boolean)" class="member-name-link">drive</a><wbr>(edu.wpi.first.math.geometry.Translation2d&nbsp;translation,
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addVisionMeasurement(edu.wpi.first.math.geometry.Pose2d,double)" class="member-name-link">addVisionMeasurement</a><wbr>(edu.wpi.first.math.geometry.Pose2d&nbsp;robotPose,
double&nbsp;timestamp)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Add a vision measurement to the <code>SwerveDrivePoseEstimator</code> with the given timestamp of the vision
measurement.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#drive(edu.wpi.first.math.geometry.Translation2d,double,boolean,boolean)" class="member-name-link">drive</a><wbr>(edu.wpi.first.math.geometry.Translation2d&nbsp;translation,
double&nbsp;rotation,
boolean&nbsp;fieldRelative,
boolean&nbsp;isOpenLoop)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">The primary method for controlling the drivebase.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.kinematics.ChassisSpeeds</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getFieldVelocity()" class="member-name-link">getFieldVelocity</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.kinematics.ChassisSpeeds</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getFieldVelocity()" class="member-name-link">getFieldVelocity</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the current field-relative velocity (x, y and omega) of the robot</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.geometry.Rotation3d</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getGyroRotation3d()" class="member-name-link">getGyroRotation3d</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.geometry.Rotation3d</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getGyroRotation3d()" class="member-name-link">getGyroRotation3d</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the current gyro Rotation3d of the robot, as reported by the imu.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.kinematics.SwerveModulePosition[]</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getModulePositions()" class="member-name-link">getModulePositions</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.kinematics.SwerveModulePosition[]</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getModulePositions()" class="member-name-link">getModulePositions</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the current module positions (azimuth and wheel position (meters))</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.geometry.Rotation2d</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPitch()" class="member-name-link">getPitch</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.geometry.Rotation2d</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPitch()" class="member-name-link">getPitch</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the current pitch angle of the robot, as reported by the imu.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.geometry.Pose2d</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPose()" class="member-name-link">getPose</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.geometry.Pose2d</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPose()" class="member-name-link">getPose</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the current pose (position and rotation) of the robot, as reported by odometry.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.kinematics.ChassisSpeeds</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRobotVelocity()" class="member-name-link">getRobotVelocity</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.kinematics.ChassisSpeeds</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRobotVelocity()" class="member-name-link">getRobotVelocity</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the current robot-relative velocity (x, y and omega) of the robot</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.geometry.Rotation2d</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRoll()" class="member-name-link">getRoll</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.geometry.Rotation2d</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRoll()" class="member-name-link">getRoll</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the current roll angle of the robot, as reported by the imu.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a>[]</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getStates()" class="member-name-link">getStates</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a>[]</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getStates()" class="member-name-link">getStates</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the current module states (azimuth and velocity)</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.geometry.Pose2d[]</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSwerveModulePoses(edu.wpi.first.math.geometry.Pose2d)" class="member-name-link">getSwerveModulePoses</a><wbr>(edu.wpi.first.math.geometry.Pose2d&nbsp;robotPose)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.geometry.Pose2d[]</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSwerveModulePoses(edu.wpi.first.math.geometry.Pose2d)" class="member-name-link">getSwerveModulePoses</a><wbr>(edu.wpi.first.math.geometry.Pose2d&nbsp;robotPose)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Get the swerve module poses and on the field relative to the robot.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.geometry.Rotation2d</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getYaw()" class="member-name-link">getYaw</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.geometry.Rotation2d</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getYaw()" class="member-name-link">getYaw</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the current yaw angle of the robot, as reported by the imu.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#lock()" class="member-name-link">lock</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#lock()" class="member-name-link">lock</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Lock the swerve drive to prevent it from moving.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#replaceSwerveModuleFeedforward(edu.wpi.first.math.controller.SimpleMotorFeedforward)" class="member-name-link">replaceSwerveModuleFeedforward</a><wbr>(edu.wpi.first.math.controller.SimpleMotorFeedforward&nbsp;feedforward)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#replaceSwerveModuleFeedforward(edu.wpi.first.math.controller.SimpleMotorFeedforward)" class="member-name-link">replaceSwerveModuleFeedforward</a><wbr>(edu.wpi.first.math.controller.SimpleMotorFeedforward&nbsp;feedforward)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Setup the swerve module feedforward.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#resetOdometry(edu.wpi.first.math.geometry.Pose2d)" class="member-name-link">resetOdometry</a><wbr>(edu.wpi.first.math.geometry.Pose2d&nbsp;pose)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#resetOdometry(edu.wpi.first.math.geometry.Pose2d)" class="member-name-link">resetOdometry</a><wbr>(edu.wpi.first.math.geometry.Pose2d&nbsp;pose)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Resets odometry to the given pose.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setChassisSpeeds(edu.wpi.first.math.kinematics.ChassisSpeeds)" class="member-name-link">setChassisSpeeds</a><wbr>(edu.wpi.first.math.kinematics.ChassisSpeeds&nbsp;chassisSpeeds)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setChassisSpeeds(edu.wpi.first.math.kinematics.ChassisSpeeds)" class="member-name-link">setChassisSpeeds</a><wbr>(edu.wpi.first.math.kinematics.ChassisSpeeds&nbsp;chassisSpeeds)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Set field-relative chassis speeds with closed-loop velocity control.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setDriveBrake()" class="member-name-link">setDriveBrake</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setDriveBrake()" class="member-name-link">setDriveBrake</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Point all modules toward the robot center, thus making the robot very difficult to move.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setModuleStates(swervelib.math.SwerveModuleState2%5B%5D,boolean)" class="member-name-link">setModuleStates</a><wbr>(<a href="math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a>[]&nbsp;desiredStates,
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setModuleStates(swervelib.math.SwerveModuleState2%5B%5D,boolean)" class="member-name-link">setModuleStates</a><wbr>(<a href="math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a>[]&nbsp;desiredStates,
boolean&nbsp;isOpenLoop)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Set the module states (azimuth and velocity) directly.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setMotorBrake(boolean)" class="member-name-link">setMotorBrake</a><wbr>(boolean&nbsp;brake)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setMotorBrake(boolean)" class="member-name-link">setMotorBrake</a><wbr>(boolean&nbsp;brake)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the drive motors to brake/coast mode.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#synchronizeModuleEncoders()" class="member-name-link">synchronizeModuleEncoders</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#synchronizeModuleEncoders()" class="member-name-link">synchronizeModuleEncoders</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Synchronize angle motor integrated encoders with data from absolute encoders.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#updateOdometry()" class="member-name-link">updateOdometry</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#updateOdometry()" class="member-name-link">updateOdometry</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Update odometry should be run every loop.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#zeroGyro()" class="member-name-link">zeroGyro</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#zeroGyro()" class="member-name-link">zeroGyro</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Resets the gyro angle to zero and resets odometry to the same position, but facing toward 0.</div>
</div>
</div>
@@ -630,6 +637,21 @@ loadScripts(document, 'script');</script>
<div class="block">Synchronize angle motor integrated encoders with data from absolute encoders.</div>
</section>
</li>
<li>
<section class="detail" id="addVisionMeasurement(edu.wpi.first.math.geometry.Pose2d,double)">
<h3>addVisionMeasurement</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">addVisionMeasurement</span><wbr><span class="parameters">(edu.wpi.first.math.geometry.Pose2d&nbsp;robotPose,
double&nbsp;timestamp)</span></div>
<div class="block">Add a vision measurement to the <code>SwerveDrivePoseEstimator</code> with the given timestamp of the vision
measurement. <b>THIS WILL BREAK IF UPDATED TOO OFTEN.</b></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>robotPose</code> - Robot <code>Pose2d</code> as measured by vision.</dd>
<dd><code>timestamp</code> - Timestamp the measurement was taken as time since FPGATimestamp, could be taken from
<code>Timer.getFPGATimestamp()</code>.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>SwerveModule</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>CANCoderSwerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>SparkMaxEncoderSwerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>SwerveAbsoluteEncoder</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>swervelib.encoders</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>swervelib.encoders Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>NavXSwerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>Pigeon2Swerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>PigeonSwerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>SwerveIMU</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>swervelib.imu</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>swervelib.imu Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>SwerveKinematics2</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -81,8 +81,8 @@ loadScripts(document, 'script');</script>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">SwerveKinematics2</span>
<span class="extends-implements">extends edu.wpi.first.math.kinematics.SwerveDriveKinematics</span></div>
<div class="block">Clone of WPI SwerveKinematics, which implements second order kinematics when calculating modules states from chassis
speed.
Makes use of <a href="SwerveModuleState2.html" title="class in swervelib.math"><code>SwerveModuleState2</code></a> to add the angular velocity that is required of the module as an output.</div>
speed. Makes use of <a href="SwerveModuleState2.html" title="class in swervelib.math"><code>SwerveModuleState2</code></a> to add the angular velocity that is required of the module as an
output.</div>
</section>
<section class="summary">
<ul class="summary-list">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>SwerveMath</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>SwerveModuleState2</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>swervelib.math</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>swervelib.math Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>SparkMaxSwerve.SparkMAX_slotIdx</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>SparkMaxSwerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>SwerveMotor</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>TalonFXSwerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -273,13 +273,6 @@ loadScripts(document, 'script');</script>
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="motor">
<h3>motor</h3>
<div class="member-signature"><span class="return-type">com.ctre.phoenix.motorcontrol.can.WPI_TalonFX</span>&nbsp;<span class="element-name">motor</span></div>
<div class="block">TalonFX motor controller.</div>
</section>
</li>
<li>
<section class="detail" id="factoryDefaultOccurred">
<h3>factoryDefaultOccurred</h3>
<div class="member-signature"><span class="modifiers">private final</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">factoryDefaultOccurred</span></div>
@@ -295,6 +288,13 @@ loadScripts(document, 'script');</script>
</section>
</li>
<li>
<section class="detail" id="motor">
<h3>motor</h3>
<div class="member-signature"><span class="return-type">com.ctre.phoenix.motorcontrol.can.WPI_TalonFX</span>&nbsp;<span class="element-name">motor</span></div>
<div class="block">TalonFX motor controller.</div>
</section>
</li>
<li>
<section class="detail" id="absoluteEncoder">
<h3>absoluteEncoder</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">absoluteEncoder</span></div>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>TalonSRXSwerve.CTRE_pidIdx</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>TalonSRXSwerve.CTRE_remoteSensor</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>TalonSRXSwerve.CTRE_slotIdx</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>TalonSRXSwerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>swervelib.motors</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>swervelib.motors Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>swervelib</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>swervelib Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>PIDFConfig</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>SwerveControllerConfiguration</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>SwerveDriveConfiguration</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>SwerveModuleConfiguration</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>SwerveModulePhysicalCharacteristics</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>SwerveParser</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>PIDFRange</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>swervelib.parser.deserializer</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>swervelib.parser.deserializer Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>ControllerPropertiesJson</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>DeviceJson</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>ModuleJson</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>MotorConfigDouble</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>MotorConfigInt</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>PIDFPropertiesJson</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>PhysicalPropertiesJson</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>SwerveDriveJson</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>BoolMotorJson</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>LocationJson</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>swervelib.parser.json.modules</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>swervelib.parser.json.modules Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>swervelib.parser.json</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>swervelib.parser.json Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>swervelib.parser</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Feb 14 22:01:24 CST 2023 -->
<!-- Generated by javadoc (17) on Tue Feb 14 22:37:00 CST 2023 -->
<title>swervelib.parser Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -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. <b>THIS WILL BREAK IF UPDATED TOO OFTEN.</b>
*
* @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);
}
}

View File

@@ -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;

View File

@@ -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);
}
/**

View File

@@ -206,7 +206,7 @@ public class TalonSRXSwerve extends SwerveMotor
@Override
public double getVelocity()
{
return motor.getSelectedSensorVelocity() * (100 * positionConversionFactor);
return motor.getSelectedSensorVelocity() * (10 * positionConversionFactor);
}
/**