mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-26 07:01:39 +00:00
Updated to 2024
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (17) on Tue Dec 12 10:48:21 CST 2023 -->
|
||||
<title>SwerveDrive</title>
|
||||
<!-- Generated by javadoc (17) -->
|
||||
<title>SwerveDrive (YAGSL-Example API)</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="2023-12-12">
|
||||
<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.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../script-dir/jquery-3.6.0.min.js"></script>
|
||||
<script type="text/javascript" src="../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
@@ -36,7 +35,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-files/index-1.html">Index</a></li>
|
||||
<li><a href="../index-all.html">Index</a></li>
|
||||
<li><a href="../help-doc.html#class">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -91,16 +90,6 @@ 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">
|
||||
@@ -117,75 +106,35 @@ loadScripts(document, 'script');</script>
|
||||
<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>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-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-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 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="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.</div>
|
||||
</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-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">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 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 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-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 modules.</div>
|
||||
<div class="block">Swerve odometry.</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>
|
||||
@@ -374,7 +323,7 @@ loadScripts(document, 'script');</script>
|
||||
<div class="block">Setup the swerve module feedforward.</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="#resetEncoders()" class="member-name-link">resetEncoders</a>()</code></div>
|
||||
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#resetDriveEncoders()" class="member-name-link">resetDriveEncoders</a>()</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="block">Reset the drive encoders on the robot, useful when manually resetting the robot without a reboot, like in
|
||||
autonomous.</div>
|
||||
@@ -422,8 +371,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 <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
|
||||
<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
|
||||
<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>
|
||||
@@ -431,8 +380,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 <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
|
||||
<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
|
||||
<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>
|
||||
@@ -443,31 +392,20 @@ loadScripts(document, 'script');</script>
|
||||
<div class="block">Set the maximum speeds for desaturation.</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="#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 <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(edu.wpi.first.math.kinematics.SwerveModuleState%5B%5D,boolean)" class="member-name-link">setModuleStates</a><wbr>(edu.wpi.first.math.kinematics.SwerveModuleState[] desiredStates,
|
||||
<div class="col-second even-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="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 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="#setMotorIdleMode(boolean)" class="member-name-link">setMotorIdleMode</a><wbr>(boolean brake)</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="#setMotorIdleMode(boolean)" class="member-name-link">setMotorIdleMode</a><wbr>(boolean brake)</code></div>
|
||||
<div class="col-last odd-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>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-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="#setOdometryPeriod(double)" class="member-name-link">setOdometryPeriod</a><wbr>(double period)</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 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>
|
||||
@@ -528,27 +466,6 @@ 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>
|
||||
@@ -602,55 +519,6 @@ loadScripts(document, 'script');</script>
|
||||
<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="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>
|
||||
@@ -666,9 +534,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
|
||||
<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
|
||||
<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
|
||||
takes a translation and rotation, as well as parameters for field-centric and closed-loop velocity control.
|
||||
<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.
|
||||
<code>setRawModuleStates(edu.wpi.first.math.kinematics.SwerveModuleState[], boolean)</code> takes a list of SwerveModuleStates and directly passes them to the modules.
|
||||
This subsystem also handles odometry.</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
@@ -877,19 +745,6 @@ 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,
|
||||
@@ -1072,8 +927,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 <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
|
||||
<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
|
||||
<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">
|
||||
@@ -1090,8 +945,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 <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
|
||||
<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
|
||||
<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>
|
||||
@@ -1240,25 +1095,14 @@ loadScripts(document, 'script');</script>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="resetEncoders()">
|
||||
<h3>resetEncoders</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">resetEncoders</span>()</div>
|
||||
<section class="detail" id="resetDriveEncoders()">
|
||||
<h3>resetDriveEncoders</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">resetDriveEncoders</span>()</div>
|
||||
<div class="block">Reset the drive encoders on the robot, useful when manually resetting the robot without a reboot, like in
|
||||
autonomous.</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<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 <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>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="pushOffsetsToControllers()">
|
||||
<h3>pushOffsetsToControllers</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">pushOffsetsToControllers</span>()</div>
|
||||
|
||||
Reference in New Issue
Block a user