mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-07-03 07:21:40 +00:00
Removed requirement for odometry to be called in the subsystem.
This commit is contained in:
@@ -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>SwerveDrive</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
@@ -112,7 +112,7 @@ loadScripts(document, 'script');</script>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">Invert odometry readings of drive motor positions, used as a patch for debugging currently.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color"><code>final <a href="math/SwerveKinematics2.html" title="class in swervelib.math">SwerveKinematics2</a></code></div>
|
||||
<div class="col-first even-row-color"><code>final edu.wpi.first.math.kinematics.SwerveDriveKinematics</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#kinematics" class="member-name-link">kinematics</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">Swerve Kinematics object utilizing second order kinematics.</div>
|
||||
@@ -127,40 +127,45 @@ loadScripts(document, 'script');</script>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">Counter to synchronize the modules relative encoder with absolute encoder when not moving.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color"><code>private <a href="simulation/SwerveIMUSimulation.html" title="class in swervelib.simulation">SwerveIMUSimulation</a></code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#simIMU" class="member-name-link">simIMU</a></code></div>
|
||||
<div class="col-first odd-row-color"><code>private final edu.wpi.first.wpilibj.Notifier</code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#odometryThread" class="member-name-link">odometryThread</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">WPILib <code>Notifier</code> to keep odometry up to date.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color"><code>private <a href="simulation/SwerveIMUSimulation.html" title="class in swervelib.simulation">SwerveIMUSimulation</a></code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#simIMU" class="member-name-link">simIMU</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">Simulation of the swerve drive.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color"><code>edu.wpi.first.math.Matrix<edu.wpi.first.math.numbers.N3,<wbr>edu.wpi.first.math.numbers.N1></code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#stateStdDevs" class="member-name-link">stateStdDevs</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="col-first odd-row-color"><code>edu.wpi.first.math.Matrix<edu.wpi.first.math.numbers.N3,<wbr>edu.wpi.first.math.numbers.N1></code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#stateStdDevs" class="member-name-link">stateStdDevs</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">Trustworthiness of the internal model of how motors should be moving Measured in expected standard deviation
|
||||
(meters of position and degrees of rotation)</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color"><code><a href="SwerveController.html" title="class in swervelib">SwerveController</a></code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#swerveController" class="member-name-link">swerveController</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="col-first even-row-color"><code><a href="SwerveController.html" title="class in swervelib">SwerveController</a></code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#swerveController" class="member-name-link">swerveController</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">Swerve controller for controlling heading of the robot.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color"><code>final <a href="parser/SwerveDriveConfiguration.html" title="class in swervelib.parser">SwerveDriveConfiguration</a></code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#swerveDriveConfiguration" class="member-name-link">swerveDriveConfiguration</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="col-first odd-row-color"><code>final <a href="parser/SwerveDriveConfiguration.html" title="class in swervelib.parser">SwerveDriveConfiguration</a></code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#swerveDriveConfiguration" class="member-name-link">swerveDriveConfiguration</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">Swerve drive configuration.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color"><code>final <a href="math/SwervePoseEstimator2.html" title="class in swervelib.math">SwervePoseEstimator2</a></code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#swerveDrivePoseEstimator" class="member-name-link">swerveDrivePoseEstimator</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="col-first even-row-color"><code>final edu.wpi.first.math.estimator.SwerveDrivePoseEstimator</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#swerveDrivePoseEstimator" class="member-name-link">swerveDrivePoseEstimator</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">Swerve odometry.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color"><code>private final <a href="SwerveModule.html" title="class in swervelib">SwerveModule</a>[]</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#swerveModules" class="member-name-link">swerveModules</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="col-first odd-row-color"><code>private final <a href="SwerveModule.html" title="class in swervelib">SwerveModule</a>[]</code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#swerveModules" class="member-name-link">swerveModules</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">Swerve modules.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color"><code>edu.wpi.first.math.Matrix<edu.wpi.first.math.numbers.N3,<wbr>edu.wpi.first.math.numbers.N1></code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#visionMeasurementStdDevs" class="member-name-link">visionMeasurementStdDevs</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="col-first even-row-color"><code>edu.wpi.first.math.Matrix<edu.wpi.first.math.numbers.N3,<wbr>edu.wpi.first.math.numbers.N1></code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#visionMeasurementStdDevs" class="member-name-link">visionMeasurementStdDevs</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">Trustworthiness of the vision system Measured in expected standard deviation (meters of position and degrees of
|
||||
rotation)</div>
|
||||
</div>
|
||||
@@ -294,7 +299,7 @@ loadScripts(document, 'script');</script>
|
||||
<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 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-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.kinematics.SwerveModuleState[]</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>
|
||||
@@ -362,7 +367,7 @@ loadScripts(document, 'script');</script>
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="block">Set the maximum speed of the drive motors, modified <a href="parser/SwerveControllerConfiguration.html#maxSpeed"><code>SwerveControllerConfiguration.maxSpeed</code></a> and
|
||||
<a href="parser/SwerveDriveConfiguration.html#maxSpeed"><code>SwerveDriveConfiguration.maxSpeed</code></a> which is used for the
|
||||
<a href="#setRawModuleStates(swervelib.math.SwerveModuleState2%5B%5D,boolean)"><code>setRawModuleStates(SwerveModuleState2[], boolean)</code></a> function and
|
||||
<a href="#setRawModuleStates(edu.wpi.first.math.kinematics.SwerveModuleState%5B%5D,boolean)"><code>setRawModuleStates(SwerveModuleState[], boolean)</code></a> function and
|
||||
<a href="SwerveController.html#getTargetSpeeds(double,double,double,double,double)"><code>SwerveController.getTargetSpeeds(double, double, double, double, double)</code></a> functions.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
||||
@@ -371,7 +376,7 @@ loadScripts(document, 'script');</script>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="block">Set the maximum speed of the drive motors, modified <a href="parser/SwerveControllerConfiguration.html#maxSpeed"><code>SwerveControllerConfiguration.maxSpeed</code></a> and
|
||||
<a href="parser/SwerveDriveConfiguration.html#maxSpeed"><code>SwerveDriveConfiguration.maxSpeed</code></a> which is used for the
|
||||
<a href="#setRawModuleStates(swervelib.math.SwerveModuleState2%5B%5D,boolean)"><code>setRawModuleStates(SwerveModuleState2[], boolean)</code></a> function and
|
||||
<a href="#setRawModuleStates(edu.wpi.first.math.kinematics.SwerveModuleState%5B%5D,boolean)"><code>setRawModuleStates(SwerveModuleState[], boolean)</code></a> function and
|
||||
<a href="SwerveController.html#getTargetSpeeds(double,double,double,double,double)"><code>SwerveController.getTargetSpeeds(double, double, double, double, double)</code></a> functions.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
||||
@@ -384,10 +389,10 @@ loadScripts(document, 'script');</script>
|
||||
<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="#setModuleStateOptimization(boolean)" class="member-name-link">setModuleStateOptimization</a><wbr>(boolean optimizationEnabled)</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="block">Configure whether the <a href="math/SwerveModuleState2.html" title="class in swervelib.math"><code>SwerveModuleState2</code></a> will be optimized to prevent spinning more than 90deg.</div>
|
||||
<div class="block">Configure whether the <code>SwerveModuleState</code> will be optimized to prevent spinning more than 90deg.</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="#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>[] desiredStates,
|
||||
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setModuleStates(edu.wpi.first.math.kinematics.SwerveModuleState%5B%5D,boolean)" class="member-name-link">setModuleStates</a><wbr>(edu.wpi.first.math.kinematics.SwerveModuleState[] desiredStates,
|
||||
boolean isOpenLoop)</code></div>
|
||||
<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>
|
||||
@@ -397,12 +402,22 @@ loadScripts(document, 'script');</script>
|
||||
<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 odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>private void</code></div>
|
||||
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setRawModuleStates(swervelib.math.SwerveModuleState2%5B%5D,boolean)" class="member-name-link">setRawModuleStates</a><wbr>(<a href="math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a>[] desiredStates,
|
||||
boolean isOpenLoop)</code></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="#setOdometryPeriod(double)" class="member-name-link">setOdometryPeriod</a><wbr>(double period)</code></div>
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="block">Set the odometry update period in seconds.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>private void</code></div>
|
||||
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setRawModuleStates(edu.wpi.first.math.kinematics.SwerveModuleState%5B%5D,boolean)" class="member-name-link">setRawModuleStates</a><wbr>(edu.wpi.first.math.kinematics.SwerveModuleState[] desiredStates,
|
||||
boolean isOpenLoop)</code></div>
|
||||
<div class="col-last even-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="#stopOdometryThread()" class="member-name-link">stopOdometryThread</a>()</code></div>
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="block">Stop the odometry thread in favor of manually updating odometry.</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">
|
||||
@@ -438,7 +453,7 @@ loadScripts(document, 'script');</script>
|
||||
<li>
|
||||
<section class="detail" id="kinematics">
|
||||
<h3>kinematics</h3>
|
||||
<div class="member-signature"><span class="modifiers">public final</span> <span class="return-type"><a href="math/SwerveKinematics2.html" title="class in swervelib.math">SwerveKinematics2</a></span> <span class="element-name">kinematics</span></div>
|
||||
<div class="member-signature"><span class="modifiers">public final</span> <span class="return-type">edu.wpi.first.math.kinematics.SwerveDriveKinematics</span> <span class="element-name">kinematics</span></div>
|
||||
<div class="block">Swerve Kinematics object utilizing second order kinematics.</div>
|
||||
</section>
|
||||
</li>
|
||||
@@ -452,7 +467,7 @@ loadScripts(document, 'script');</script>
|
||||
<li>
|
||||
<section class="detail" id="swerveDrivePoseEstimator">
|
||||
<h3>swerveDrivePoseEstimator</h3>
|
||||
<div class="member-signature"><span class="modifiers">public final</span> <span class="return-type"><a href="math/SwervePoseEstimator2.html" title="class in swervelib.math">SwervePoseEstimator2</a></span> <span class="element-name">swerveDrivePoseEstimator</span></div>
|
||||
<div class="member-signature"><span class="modifiers">public final</span> <span class="return-type">edu.wpi.first.math.estimator.SwerveDrivePoseEstimator</span> <span class="element-name">swerveDrivePoseEstimator</span></div>
|
||||
<div class="block">Swerve odometry.</div>
|
||||
</section>
|
||||
</li>
|
||||
@@ -536,6 +551,13 @@ loadScripts(document, 'script');</script>
|
||||
<div class="block">The last heading set in radians.</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="odometryThread">
|
||||
<h3>odometryThread</h3>
|
||||
<div class="member-signature"><span class="modifiers">private final</span> <span class="return-type">edu.wpi.first.wpilibj.Notifier</span> <span class="element-name">odometryThread</span></div>
|
||||
<div class="block">WPILib <code>Notifier</code> to keep odometry up to date.</div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
@@ -550,9 +572,9 @@ loadScripts(document, 'script');</script>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="element-name">SwerveDrive</span><wbr><span class="parameters">(<a href="parser/SwerveDriveConfiguration.html" title="class in swervelib.parser">SwerveDriveConfiguration</a> config,
|
||||
<a href="parser/SwerveControllerConfiguration.html" title="class in swervelib.parser">SwerveControllerConfiguration</a> controllerConfig)</span></div>
|
||||
<div class="block">Creates a new swerve drivebase subsystem. Robot is controlled via the <a href="#drive(edu.wpi.first.math.geometry.Translation2d,double,boolean,boolean)"><code>drive(edu.wpi.first.math.geometry.Translation2d, double, boolean, boolean)</code></a> method, or via the
|
||||
<a href="#setRawModuleStates(swervelib.math.SwerveModuleState2%5B%5D,boolean)"><code>setRawModuleStates(swervelib.math.SwerveModuleState2[], boolean)</code></a> method. The <a href="#drive(edu.wpi.first.math.geometry.Translation2d,double,boolean,boolean)"><code>drive(edu.wpi.first.math.geometry.Translation2d, double, boolean, boolean)</code></a> method incorporates kinematics-- it
|
||||
<a href="#setRawModuleStates(edu.wpi.first.math.kinematics.SwerveModuleState%5B%5D,boolean)"><code>setRawModuleStates(edu.wpi.first.math.kinematics.SwerveModuleState[], boolean)</code></a> method. The <a href="#drive(edu.wpi.first.math.geometry.Translation2d,double,boolean,boolean)"><code>drive(edu.wpi.first.math.geometry.Translation2d, double, boolean, boolean)</code></a> method incorporates kinematics-- it
|
||||
takes a translation and rotation, as well as parameters for field-centric and closed-loop velocity control.
|
||||
<a href="#setRawModuleStates(swervelib.math.SwerveModuleState2%5B%5D,boolean)"><code>setRawModuleStates(swervelib.math.SwerveModuleState2[], boolean)</code></a> takes a list of SwerveModuleStates and directly passes them to the modules.
|
||||
<a href="#setRawModuleStates(edu.wpi.first.math.kinematics.SwerveModuleState%5B%5D,boolean)"><code>setRawModuleStates(edu.wpi.first.math.kinematics.SwerveModuleState[], boolean)</code></a> takes a list of SwerveModuleStates and directly passes them to the modules.
|
||||
This subsystem also handles odometry.</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
@@ -571,14 +593,32 @@ loadScripts(document, 'script');</script>
|
||||
<h2>Method Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="setOdometryPeriod(double)">
|
||||
<h3>setOdometryPeriod</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setOdometryPeriod</span><wbr><span class="parameters">(double period)</span></div>
|
||||
<div class="block">Set the odometry update period in seconds.</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>period</code> - period in seconds.</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="stopOdometryThread()">
|
||||
<h3>stopOdometryThread</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">stopOdometryThread</span>()</div>
|
||||
<div class="block">Stop the odometry thread in favor of manually updating odometry.</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="drive(edu.wpi.first.math.geometry.Translation2d,double,boolean,boolean)">
|
||||
<h3>drive</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">drive</span><wbr><span class="parameters">(edu.wpi.first.math.geometry.Translation2d translation,
|
||||
double rotation,
|
||||
boolean fieldRelative,
|
||||
boolean isOpenLoop)</span></div>
|
||||
<div class="block">The primary method for controlling the drivebase. Takes a Translation2d and a rotation rate, and calculates and
|
||||
commands module states accordingly. Can use either open-loop or closed-loop velocity control for the wheel
|
||||
<div class="block">The primary method for controlling the drivebase. Takes a <code>Translation2d</code> and a rotation rate, and calculates
|
||||
and commands module states accordingly. Can use either open-loop or closed-loop velocity control for the wheel
|
||||
velocities. Also has field- and robot-relative modes, which affect how the translation vector is used. This method
|
||||
defaults to no heading correction.</div>
|
||||
<dl class="notes">
|
||||
@@ -640,9 +680,9 @@ loadScripts(document, 'script');</script>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="setRawModuleStates(swervelib.math.SwerveModuleState2[],boolean)">
|
||||
<section class="detail" id="setRawModuleStates(edu.wpi.first.math.kinematics.SwerveModuleState[],boolean)">
|
||||
<h3>setRawModuleStates</h3>
|
||||
<div class="member-signature"><span class="modifiers">private</span> <span class="return-type">void</span> <span class="element-name">setRawModuleStates</span><wbr><span class="parameters">(<a href="math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a>[] desiredStates,
|
||||
<div class="member-signature"><span class="modifiers">private</span> <span class="return-type">void</span> <span class="element-name">setRawModuleStates</span><wbr><span class="parameters">(edu.wpi.first.math.kinematics.SwerveModuleState[] desiredStates,
|
||||
boolean isOpenLoop)</span></div>
|
||||
<div class="block">Set the module states (azimuth and velocity) directly. Used primarily for auto pathing.</div>
|
||||
<dl class="notes">
|
||||
@@ -653,9 +693,9 @@ loadScripts(document, 'script');</script>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="setModuleStates(swervelib.math.SwerveModuleState2[],boolean)">
|
||||
<section class="detail" id="setModuleStates(edu.wpi.first.math.kinematics.SwerveModuleState[],boolean)">
|
||||
<h3>setModuleStates</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setModuleStates</span><wbr><span class="parameters">(<a href="math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a>[] desiredStates,
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setModuleStates</span><wbr><span class="parameters">(edu.wpi.first.math.kinematics.SwerveModuleState[] desiredStates,
|
||||
boolean isOpenLoop)</span></div>
|
||||
<div class="block">Set the module states (azimuth and velocity) directly. Used primarily for auto paths.</div>
|
||||
<dl class="notes">
|
||||
@@ -736,7 +776,7 @@ loadScripts(document, 'script');</script>
|
||||
<li>
|
||||
<section class="detail" id="getStates()">
|
||||
<h3>getStates</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a>[]</span> <span class="element-name">getStates</span>()</div>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">edu.wpi.first.math.kinematics.SwerveModuleState[]</span> <span class="element-name">getStates</span>()</div>
|
||||
<div class="block">Gets the current module states (azimuth and velocity)</div>
|
||||
<dl class="notes">
|
||||
<dt>Returns:</dt>
|
||||
@@ -836,7 +876,7 @@ loadScripts(document, 'script');</script>
|
||||
boolean updateModuleFeedforward)</span></div>
|
||||
<div class="block">Set the maximum speed of the drive motors, modified <a href="parser/SwerveControllerConfiguration.html#maxSpeed"><code>SwerveControllerConfiguration.maxSpeed</code></a> and
|
||||
<a href="parser/SwerveDriveConfiguration.html#maxSpeed"><code>SwerveDriveConfiguration.maxSpeed</code></a> which is used for the
|
||||
<a href="#setRawModuleStates(swervelib.math.SwerveModuleState2%5B%5D,boolean)"><code>setRawModuleStates(SwerveModuleState2[], boolean)</code></a> function and
|
||||
<a href="#setRawModuleStates(edu.wpi.first.math.kinematics.SwerveModuleState%5B%5D,boolean)"><code>setRawModuleStates(SwerveModuleState[], boolean)</code></a> function and
|
||||
<a href="SwerveController.html#getTargetSpeeds(double,double,double,double,double)"><code>SwerveController.getTargetSpeeds(double, double, double, double, double)</code></a> functions. This function overrides
|
||||
what was placed in the JSON and could damage your motor/robot if set too high or unachievable rates.</div>
|
||||
<dl class="notes">
|
||||
@@ -854,7 +894,7 @@ loadScripts(document, 'script');</script>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setMaximumSpeed</span><wbr><span class="parameters">(double maximumSpeed)</span></div>
|
||||
<div class="block">Set the maximum speed of the drive motors, modified <a href="parser/SwerveControllerConfiguration.html#maxSpeed"><code>SwerveControllerConfiguration.maxSpeed</code></a> and
|
||||
<a href="parser/SwerveDriveConfiguration.html#maxSpeed"><code>SwerveDriveConfiguration.maxSpeed</code></a> which is used for the
|
||||
<a href="#setRawModuleStates(swervelib.math.SwerveModuleState2%5B%5D,boolean)"><code>setRawModuleStates(SwerveModuleState2[], boolean)</code></a> function and
|
||||
<a href="#setRawModuleStates(edu.wpi.first.math.kinematics.SwerveModuleState%5B%5D,boolean)"><code>setRawModuleStates(SwerveModuleState[], boolean)</code></a> function and
|
||||
<a href="SwerveController.html#getTargetSpeeds(double,double,double,double,double)"><code>SwerveController.getTargetSpeeds(double, double, double, double, double)</code></a> functions. This function overrides
|
||||
what was placed in the JSON and could damage your motor/robot if set too high or unachievable rates. Overwrites the
|
||||
<a href="SwerveModule.html#feedforward"><code>SwerveModule.feedforward</code></a>.</div>
|
||||
@@ -1023,7 +1063,7 @@ loadScripts(document, 'script');</script>
|
||||
<section class="detail" id="setModuleStateOptimization(boolean)">
|
||||
<h3>setModuleStateOptimization</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setModuleStateOptimization</span><wbr><span class="parameters">(boolean optimizationEnabled)</span></div>
|
||||
<div class="block">Configure whether the <a href="math/SwerveModuleState2.html" title="class in swervelib.math"><code>SwerveModuleState2</code></a> will be optimized to prevent spinning more than 90deg.</div>
|
||||
<div class="block">Configure whether the <code>SwerveModuleState</code> will be optimized to prevent spinning more than 90deg.</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>optimizationEnabled</code> - Whether the module optimization is enabled.</dd>
|
||||
|
||||
Reference in New Issue
Block a user