Removed requirement for odometry to be called in the subsystem.

This commit is contained in:
thenetworkgrinch
2023-08-29 21:03:58 -05:00
parent 12f6e0ed38
commit 14f66bb679
120 changed files with 353 additions and 1826 deletions

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Aug 29 19:54:45 CDT 2023 -->
<!-- Generated by javadoc (17) on Tue Aug 29 21:02:56 CDT 2023 -->
<title>SwerveIMUSimulation</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -166,8 +166,8 @@ loadScripts(document, 'script');</script>
<div class="block">Set the heading of the robot.</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="#updateOdometry(swervelib.math.SwerveKinematics2,swervelib.math.SwerveModuleState2%5B%5D,edu.wpi.first.math.geometry.Pose2d%5B%5D,edu.wpi.first.wpilibj.smartdashboard.Field2d)" class="member-name-link">updateOdometry</a><wbr>(<a href="../math/SwerveKinematics2.html" title="class in swervelib.math">SwerveKinematics2</a>&nbsp;kinematics,
<a href="../math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a>[]&nbsp;states,
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#updateOdometry(edu.wpi.first.math.kinematics.SwerveDriveKinematics,edu.wpi.first.math.kinematics.SwerveModuleState%5B%5D,edu.wpi.first.math.geometry.Pose2d%5B%5D,edu.wpi.first.wpilibj.smartdashboard.Field2d)" class="member-name-link">updateOdometry</a><wbr>(edu.wpi.first.math.kinematics.SwerveDriveKinematics&nbsp;kinematics,
edu.wpi.first.math.kinematics.SwerveModuleState[]&nbsp;states,
edu.wpi.first.math.geometry.Pose2d[]&nbsp;modulePoses,
edu.wpi.first.wpilibj.smartdashboard.Field2d&nbsp;field)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
@@ -291,18 +291,18 @@ loadScripts(document, 'script');</script>
</section>
</li>
<li>
<section class="detail" id="updateOdometry(swervelib.math.SwerveKinematics2,swervelib.math.SwerveModuleState2[],edu.wpi.first.math.geometry.Pose2d[],edu.wpi.first.wpilibj.smartdashboard.Field2d)">
<section class="detail" id="updateOdometry(edu.wpi.first.math.kinematics.SwerveDriveKinematics,edu.wpi.first.math.kinematics.SwerveModuleState[],edu.wpi.first.math.geometry.Pose2d[],edu.wpi.first.wpilibj.smartdashboard.Field2d)">
<h3>updateOdometry</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">updateOdometry</span><wbr><span class="parameters">(<a href="../math/SwerveKinematics2.html" title="class in swervelib.math">SwerveKinematics2</a>&nbsp;kinematics,
<a href="../math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a>[]&nbsp;states,
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">updateOdometry</span><wbr><span class="parameters">(edu.wpi.first.math.kinematics.SwerveDriveKinematics&nbsp;kinematics,
edu.wpi.first.math.kinematics.SwerveModuleState[]&nbsp;states,
edu.wpi.first.math.geometry.Pose2d[]&nbsp;modulePoses,
edu.wpi.first.wpilibj.smartdashboard.Field2d&nbsp;field)</span></div>
<div class="block">Update the odometry of the simulated <a href="../SwerveDrive.html" title="class in swervelib"><code>SwerveDrive</code></a> and post the <a href="../SwerveModule.html" title="class in swervelib"><code>SwerveModule</code></a>
states to the <code>Field2d</code>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>kinematics</code> - <a href="../math/SwerveKinematics2.html" title="class in swervelib.math"><code>SwerveKinematics2</code></a> of the swerve drive.</dd>
<dd><code>states</code> - <a href="../math/SwerveModuleState2.html" title="class in swervelib.math"><code>SwerveModuleState2</code></a> array of the module states.</dd>
<dd><code>kinematics</code> - <code>SwerveDriveKinematics</code> of the swerve drive.</dd>
<dd><code>states</code> - <code>SwerveModuleState</code> array of the module states.</dd>
<dd><code>modulePoses</code> - <code>Pose2d</code> representing the swerve modules.</dd>
<dd><code>field</code> - <code>Field2d</code> to update.</dd>
</dl>