mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-20 06:31:39 +00:00
Update YAGSL to handle controls better
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (17) on Wed Apr 05 08:59:10 CDT 2023 -->
|
||||
<!-- Generated by javadoc (17) on Sat Apr 08 12:30:47 CDT 2023 -->
|
||||
<title>SwerveModuleState2</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="dc.created" content="2023-04-05">
|
||||
<meta name="dc.created" content="2023-04-08">
|
||||
<meta name="description" content="declaration: package: swervelib.math, class: SwerveModuleState2">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
@@ -16,7 +16,11 @@
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var pathtoroot = "../../";
|
||||
<script type="text/javascript">var evenRowColor = "even-row-color";
|
||||
var oddRowColor = "odd-row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
@@ -49,7 +53,7 @@ loadScripts(document, 'script');</script>
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field-detail">Field</a> | </li>
|
||||
<li><a href="#constructor-detail">Constr</a> | </li>
|
||||
<li>Method</li>
|
||||
<li><a href="#method-detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
|
||||
@@ -93,22 +97,15 @@ 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>edu.wpi.first.math.geometry.Rotation2d</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#angle" class="member-name-link">angle</a></code></div>
|
||||
<div class="col-first even-row-color"><code>double</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#omegaRadPerSecond" class="member-name-link">omegaRadPerSecond</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">Swerve module angle as a <code>Rotation2d</code>.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color"><code>double</code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#omegaRadPerSecond" class="member-name-link">omegaRadPerSecond</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">Rad per sec</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color"><code>double</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#speedMetersPerSecond" class="member-name-link">speedMetersPerSecond</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">Swerve module speed in meters per second.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="fields-inherited-from-class-edu.wpi.first.math.kinematics.SwerveModuleState">Fields inherited from class edu.wpi.first.math.kinematics.SwerveModuleState</h3>
|
||||
<code>angle, speedMetersPerSecond</code></div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
@@ -129,6 +126,11 @@ loadScripts(document, 'script');</script>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">Constructs a SwerveModuleState.</div>
|
||||
</div>
|
||||
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(edu.wpi.first.math.kinematics.SwerveModuleState,double)" class="member-name-link">SwerveModuleState2</a><wbr>(edu.wpi.first.math.kinematics.SwerveModuleState state,
|
||||
double omegaRadPerSecond)</code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">Create a <a href="SwerveModuleState2.html" title="class in swervelib.math"><code>SwerveModuleState2</code></a> based on the <code>SwerveModuleState</code> with the radians per second defined.</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
@@ -136,6 +138,30 @@ loadScripts(document, 'script');</script>
|
||||
<li>
|
||||
<section class="method-summary" id="method-summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
|
||||
<div class="table-header col-first">Modifier and Type</div>
|
||||
<div class="table-header col-second">Method</div>
|
||||
<div class="table-header col-last">Description</div>
|
||||
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a></code></div>
|
||||
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#optimize(swervelib.math.SwerveModuleState2,edu.wpi.first.math.geometry.Rotation2d,swervelib.math.SwerveModuleState2,double)" class="member-name-link">optimize</a><wbr>(<a href="SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a> desiredState,
|
||||
edu.wpi.first.math.geometry.Rotation2d currentAngle,
|
||||
<a href="SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a> lastState,
|
||||
double moduleSteerFeedForwardClosedLoop)</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
|
||||
<div class="block">Minimize the change in heading the desired swerve module state would require by potentially reversing the direction
|
||||
the wheel spins.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.kinematics.SwerveModuleState</code></div>
|
||||
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toSwerveModuleState()" class="member-name-link">toSwerveModuleState</a>()</code></div>
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="block">Convert to a <code>SwerveModuleState</code>.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods-inherited-from-class-edu.wpi.first.math.kinematics.SwerveModuleState">Methods inherited from class edu.wpi.first.math.kinematics.SwerveModuleState</h3>
|
||||
<code>compareTo, equals, hashCode, optimize, toString</code></div>
|
||||
@@ -154,26 +180,12 @@ loadScripts(document, 'script');</script>
|
||||
<h2>Field Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="speedMetersPerSecond">
|
||||
<h3>speedMetersPerSecond</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">double</span> <span class="element-name">speedMetersPerSecond</span></div>
|
||||
<div class="block">Swerve module speed in meters per second.</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="omegaRadPerSecond">
|
||||
<h3>omegaRadPerSecond</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">double</span> <span class="element-name">omegaRadPerSecond</span></div>
|
||||
<div class="block">Rad per sec</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="angle">
|
||||
<h3>angle</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">edu.wpi.first.math.geometry.Rotation2d</span> <span class="element-name">angle</span></div>
|
||||
<div class="block">Swerve module angle as a <code>Rotation2d</code>.</div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
@@ -204,6 +216,59 @@ loadScripts(document, 'script');</script>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="<init>(edu.wpi.first.math.kinematics.SwerveModuleState,double)">
|
||||
<h3>SwerveModuleState2</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="element-name">SwerveModuleState2</span><wbr><span class="parameters">(edu.wpi.first.math.kinematics.SwerveModuleState state,
|
||||
double omegaRadPerSecond)</span></div>
|
||||
<div class="block">Create a <a href="SwerveModuleState2.html" title="class in swervelib.math"><code>SwerveModuleState2</code></a> based on the <code>SwerveModuleState</code> with the radians per second defined.</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>state</code> - First order kinematic module state.</dd>
|
||||
<dd><code>omegaRadPerSecond</code> - Module wheel angular rotation in radians per second.</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
<li>
|
||||
<section class="method-details" id="method-detail">
|
||||
<h2>Method Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="optimize(swervelib.math.SwerveModuleState2,edu.wpi.first.math.geometry.Rotation2d,swervelib.math.SwerveModuleState2,double)">
|
||||
<h3>optimize</h3>
|
||||
<div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a></span> <span class="element-name">optimize</span><wbr><span class="parameters">(<a href="SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a> desiredState,
|
||||
edu.wpi.first.math.geometry.Rotation2d currentAngle,
|
||||
<a href="SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a> lastState,
|
||||
double moduleSteerFeedForwardClosedLoop)</span></div>
|
||||
<div class="block">Minimize the change in heading the desired swerve module state would require by potentially reversing the direction
|
||||
the wheel spins. If this is used with the PIDController class's continuous input functionality, the furthest a
|
||||
wheel will ever rotate is 90 degrees.</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>desiredState</code> - The desired state.</dd>
|
||||
<dd><code>currentAngle</code> - The current module angle.</dd>
|
||||
<dd><code>lastState</code> - The last state of the module.</dd>
|
||||
<dd><code>moduleSteerFeedForwardClosedLoop</code> - The module feed forward closed loop for the angle motor.</dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>Optimized swerve module state.</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="toSwerveModuleState()">
|
||||
<h3>toSwerveModuleState</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">edu.wpi.first.math.kinematics.SwerveModuleState</span> <span class="element-name">toSwerveModuleState</span>()</div>
|
||||
<div class="block">Convert to a <code>SwerveModuleState</code>.</div>
|
||||
<dl class="notes">
|
||||
<dt>Returns:</dt>
|
||||
<dd><code>SwerveModuleState</code> with the same angle and speed.</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user