mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-28 07:01:39 +00:00
Updated to YAGSL 2024
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (17) -->
|
||||
<title>SwerveDrive (YAGSL-Example API)</title>
|
||||
<!-- Generated by javadoc (17) on Mon Jan 15 14:38:31 CST 2024 -->
|
||||
<title>SwerveDrive</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="dc.created" content="2024-01-15">
|
||||
<meta name="description" content="declaration: package: swervelib, class: SwerveDrive">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../script.js"></script>
|
||||
<script type="text/javascript" src="../script-dir/jquery-3.6.0.min.js"></script>
|
||||
<script type="text/javascript" src="../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
@@ -35,7 +36,7 @@ loadScripts(document, 'script');</script>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../index-all.html">Index</a></li>
|
||||
<li><a href="../index-files/index-1.html">Index</a></li>
|
||||
<li><a href="../help-doc.html#class">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -90,52 +91,112 @@ loadScripts(document, 'script');</script>
|
||||
<div class="table-header col-first">Modifier and Type</div>
|
||||
<div class="table-header col-second">Field</div>
|
||||
<div class="table-header col-last">Description</div>
|
||||
<div class="col-first even-row-color"><code>private double</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#attainableMaxRotationalVelocityRadiansPerSecond" class="member-name-link">attainableMaxRotationalVelocityRadiansPerSecond</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">The absolute max speed the robot can reach while rotating radians per second.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color"><code>private double</code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#attainableMaxTranslationalSpeedMetersPerSecond" class="member-name-link">attainableMaxTranslationalSpeedMetersPerSecond</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">The absolute max speed that your robot can reach while translating in meters per second.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color"><code>boolean</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#chassisVelocityCorrection" class="member-name-link">chassisVelocityCorrection</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">Correct chassis velocity in <a href="#drive(edu.wpi.first.math.geometry.Translation2d,double,boolean,boolean)"><code>drive(Translation2d, double, boolean, boolean)</code></a> using 254's
|
||||
correction.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color"><code>edu.wpi.first.wpilibj.smartdashboard.Field2d</code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#field" class="member-name-link">field</a></code></div>
|
||||
<div class="col-first odd-row-color"><code>private boolean</code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#correctionEnabled" class="member-name-link">correctionEnabled</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">Whether heading correction PID is currently active.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color"><code>edu.wpi.first.wpilibj.smartdashboard.Field2d</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#field" class="member-name-link">field</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">Field object.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color"><code>private final double</code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#HEADING_CORRECTION_DEADBAND" class="member-name-link">HEADING_CORRECTION_DEADBAND</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">Deadband for speeds in heading correction.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color"><code>boolean</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#headingCorrection" class="member-name-link">headingCorrection</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">Whether to correct heading when driving translationally.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color"><code>boolean</code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#invertOdometry" class="member-name-link">invertOdometry</a></code></div>
|
||||
<div class="col-first odd-row-color"><code>private <a href="imu/SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#imu" class="member-name-link">imu</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">Swerve IMU device for sensing the heading of the robot.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color"><code>boolean</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#invertOdometry" class="member-name-link">invertOdometry</a></code></div>
|
||||
<div class="col-last even-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 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="col-first odd-row-color"><code>final edu.wpi.first.math.kinematics.SwerveDriveKinematics</code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#kinematics" class="member-name-link">kinematics</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">Swerve Kinematics object.</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="#stateStdDevs" class="member-name-link">stateStdDevs</a></code></div>
|
||||
<div class="col-first even-row-color"><code>private double</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#lastHeadingRadians" class="member-name-link">lastHeadingRadians</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">The last heading set in radians.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color"><code>private double</code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#maxSpeedMPS" class="member-name-link">maxSpeedMPS</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">Maximum speed of the robot in meters per second.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color"><code>private int</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#moduleSynchronizationCounter" class="member-name-link">moduleSynchronizationCounter</a></code></div>
|
||||
<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 final <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/locks/Lock.html" title="class or interface in java.util.concurrent.locks" class="external-link">Lock</a></code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#odometryLock" class="member-name-link">odometryLock</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">Odometry lock to ensure thread safety.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color"><code>private final edu.wpi.first.wpilibj.Notifier</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#odometryThread" class="member-name-link">odometryThread</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">WPILib <code>Notifier</code> to keep odometry up to date.</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-last odd-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="block">Standard deviation of encoders and gyroscopes, usually should not change.</div>
|
||||
</div>
|
||||
<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="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="block">Swerve controller for controlling heading of the robot.</div>
|
||||
</div>
|
||||
<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="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="block">Swerve drive configuration.</div>
|
||||
</div>
|
||||
<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="col-first odd-row-color"><code>final edu.wpi.first.math.estimator.SwerveDrivePoseEstimator</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="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="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">
|
||||
@@ -371,8 +432,8 @@ loadScripts(document, 'script');</script>
|
||||
<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="#setMaximumSpeed(double)" class="member-name-link">setMaximumSpeed</a><wbr>(double maximumSpeed)</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 maximum speed of the drive motors, modified <code>maxSpeedMPS</code> which is used for the
|
||||
<code>setRawModuleStates(SwerveModuleState[], boolean)</code> function and
|
||||
<div class="block">Set the maximum speed of the drive motors, modified <a href="#maxSpeedMPS"><code>maxSpeedMPS</code></a> which is used for the
|
||||
<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>
|
||||
@@ -380,8 +441,8 @@ loadScripts(document, 'script');</script>
|
||||
boolean updateModuleFeedforward,
|
||||
double optimalVoltage)</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 maximum speed of the drive motors, modified <code>maxSpeedMPS</code> which is used for the
|
||||
<code>setRawModuleStates(SwerveModuleState[], boolean)</code> function and
|
||||
<div class="block">Set the maximum speed of the drive motors, modified <a href="#maxSpeedMPS"><code>maxSpeedMPS</code></a> which is used for the
|
||||
<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>
|
||||
@@ -407,24 +468,30 @@ 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 odometry update period in seconds.</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-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(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 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 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="#stopOdometryThread()" class="member-name-link">stopOdometryThread</a>()</code></div>
|
||||
<div class="col-last even-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">
|
||||
<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>
|
||||
@@ -466,6 +533,27 @@ loadScripts(document, 'script');</script>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="swerveModules">
|
||||
<h3>swerveModules</h3>
|
||||
<div class="member-signature"><span class="modifiers">private final</span> <span class="return-type"><a href="SwerveModule.html" title="class in swervelib">SwerveModule</a>[]</span> <span class="element-name">swerveModules</span></div>
|
||||
<div class="block">Swerve modules.</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>
|
||||
<li>
|
||||
<section class="detail" id="odometryLock">
|
||||
<h3>odometryLock</h3>
|
||||
<div class="member-signature"><span class="modifiers">private final</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/locks/Lock.html" title="class or interface in java.util.concurrent.locks" class="external-link">Lock</a></span> <span class="element-name">odometryLock</span></div>
|
||||
<div class="block">Odometry lock to ensure thread safety.</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="field">
|
||||
<h3>field</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">edu.wpi.first.wpilibj.smartdashboard.Field2d</span> <span class="element-name">field</span></div>
|
||||
@@ -513,12 +601,83 @@ loadScripts(document, 'script');</script>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="correctionEnabled">
|
||||
<h3>correctionEnabled</h3>
|
||||
<div class="member-signature"><span class="modifiers">private</span> <span class="return-type">boolean</span> <span class="element-name">correctionEnabled</span></div>
|
||||
<div class="block">Whether heading correction PID is currently active.</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="headingCorrection">
|
||||
<h3>headingCorrection</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">headingCorrection</span></div>
|
||||
<div class="block">Whether to correct heading when driving translationally. Set to true to enable.</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="imu">
|
||||
<h3>imu</h3>
|
||||
<div class="member-signature"><span class="modifiers">private</span> <span class="return-type"><a href="imu/SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></span> <span class="element-name">imu</span></div>
|
||||
<div class="block">Swerve IMU device for sensing the heading of the robot.</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="simIMU">
|
||||
<h3>simIMU</h3>
|
||||
<div class="member-signature"><span class="modifiers">private</span> <span class="return-type"><a href="simulation/SwerveIMUSimulation.html" title="class in swervelib.simulation">SwerveIMUSimulation</a></span> <span class="element-name">simIMU</span></div>
|
||||
<div class="block">Simulation of the swerve drive.</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="moduleSynchronizationCounter">
|
||||
<h3>moduleSynchronizationCounter</h3>
|
||||
<div class="member-signature"><span class="modifiers">private</span> <span class="return-type">int</span> <span class="element-name">moduleSynchronizationCounter</span></div>
|
||||
<div class="block">Counter to synchronize the modules relative encoder with absolute encoder when not moving.</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="HEADING_CORRECTION_DEADBAND">
|
||||
<h3>HEADING_CORRECTION_DEADBAND</h3>
|
||||
<div class="member-signature"><span class="modifiers">private final</span> <span class="return-type">double</span> <span class="element-name">HEADING_CORRECTION_DEADBAND</span></div>
|
||||
<div class="block">Deadband for speeds in heading correction.</div>
|
||||
<dl class="notes">
|
||||
<dt>See Also:</dt>
|
||||
<dd>
|
||||
<ul class="see-list">
|
||||
<li><a href="../constant-values.html#swervelib.SwerveDrive.HEADING_CORRECTION_DEADBAND">Constant Field Values</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="lastHeadingRadians">
|
||||
<h3>lastHeadingRadians</h3>
|
||||
<div class="member-signature"><span class="modifiers">private</span> <span class="return-type">double</span> <span class="element-name">lastHeadingRadians</span></div>
|
||||
<div class="block">The last heading set in radians.</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="attainableMaxTranslationalSpeedMetersPerSecond">
|
||||
<h3>attainableMaxTranslationalSpeedMetersPerSecond</h3>
|
||||
<div class="member-signature"><span class="modifiers">private</span> <span class="return-type">double</span> <span class="element-name">attainableMaxTranslationalSpeedMetersPerSecond</span></div>
|
||||
<div class="block">The absolute max speed that your robot can reach while translating in meters per second.</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="attainableMaxRotationalVelocityRadiansPerSecond">
|
||||
<h3>attainableMaxRotationalVelocityRadiansPerSecond</h3>
|
||||
<div class="member-signature"><span class="modifiers">private</span> <span class="return-type">double</span> <span class="element-name">attainableMaxRotationalVelocityRadiansPerSecond</span></div>
|
||||
<div class="block">The absolute max speed the robot can reach while rotating radians per second.</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="maxSpeedMPS">
|
||||
<h3>maxSpeedMPS</h3>
|
||||
<div class="member-signature"><span class="modifiers">private</span> <span class="return-type">double</span> <span class="element-name">maxSpeedMPS</span></div>
|
||||
<div class="block">Maximum speed of the robot in meters per second.</div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
@@ -534,9 +693,9 @@ loadScripts(document, 'script');</script>
|
||||
<a href="parser/SwerveControllerConfiguration.html" title="class in swervelib.parser">SwerveControllerConfiguration</a> controllerConfig,
|
||||
double maxSpeedMPS)</span></div>
|
||||
<div class="block">Creates a new swerve drivebase subsystem. Robot is controlled via the <a href="#drive(edu.wpi.first.math.kinematics.ChassisSpeeds)"><code>drive(edu.wpi.first.math.kinematics.ChassisSpeeds)</code></a> method, or via the
|
||||
<code>setRawModuleStates(edu.wpi.first.math.kinematics.SwerveModuleState[], boolean)</code> method. The <a href="#drive(edu.wpi.first.math.kinematics.ChassisSpeeds)"><code>drive(edu.wpi.first.math.kinematics.ChassisSpeeds)</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.kinematics.ChassisSpeeds)"><code>drive(edu.wpi.first.math.kinematics.ChassisSpeeds)</code></a> method incorporates kinematics-- it
|
||||
takes a translation and rotation, as well as parameters for field-centric and closed-loop velocity control.
|
||||
<code>setRawModuleStates(edu.wpi.first.math.kinematics.SwerveModuleState[], boolean)</code> 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>
|
||||
@@ -745,6 +904,19 @@ loadScripts(document, 'script');</script>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<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">(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">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>desiredStates</code> - A list of SwerveModuleStates to send to the modules.</dd>
|
||||
<dd><code>isOpenLoop</code> - Whether to use closed-loop velocity control. Set to true to disable closed-loop.</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<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">(edu.wpi.first.math.kinematics.SwerveModuleState[] desiredStates,
|
||||
@@ -927,8 +1099,8 @@ 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,
|
||||
boolean updateModuleFeedforward,
|
||||
double optimalVoltage)</span></div>
|
||||
<div class="block">Set the maximum speed of the drive motors, modified <code>maxSpeedMPS</code> which is used for the
|
||||
<code>setRawModuleStates(SwerveModuleState[], boolean)</code> function and
|
||||
<div class="block">Set the maximum speed of the drive motors, modified <a href="#maxSpeedMPS"><code>maxSpeedMPS</code></a> which is used for the
|
||||
<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">
|
||||
@@ -945,8 +1117,8 @@ loadScripts(document, 'script');</script>
|
||||
<section class="detail" id="setMaximumSpeed(double)">
|
||||
<h3>setMaximumSpeed</h3>
|
||||
<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 <code>maxSpeedMPS</code> which is used for the
|
||||
<code>setRawModuleStates(SwerveModuleState[], boolean)</code> function and
|
||||
<div class="block">Set the maximum speed of the drive motors, modified <a href="#maxSpeedMPS"><code>maxSpeedMPS</code></a> which is used for the
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user