Files
YAGSL/docs/frc/robot/subsystems/swervedrive/swerve/kinematics/class-use/SwerveModuleState2.html

332 lines
18 KiB
HTML
Raw Normal View History

2023-01-31 10:52:13 -06:00
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.13) on Tue Jan 31 10:51:37 CST 2023 -->
<title>Uses of Class frc.robot.subsystems.swervedrive.swerve.kinematics.SwerveModuleState2</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2023-01-31">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class frc.robot.subsystems.swervedrive.swerve.kinematics.SwerveModuleState2";
}
}
catch(err) {
}
//-->
var pathtoroot = "../../../../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../index.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<main role="main">
<div class="header">
<h2 title="Uses of Class frc.robot.subsystems.swervedrive.swerve.kinematics.SwerveModuleState2" class="title">Uses of Class<br>frc.robot.subsystems.swervedrive.swerve.kinematics.SwerveModuleState2</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table class="useSummary">
<caption><span>Packages that use <a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a></span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="#frc.robot.subsystems.swervedrive.swerve">frc.robot.subsystems.swervedrive.swerve</a></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><a href="#frc.robot.subsystems.swervedrive.swerve.kinematics">frc.robot.subsystems.swervedrive.swerve.kinematics</a></th>
<td class="colLast">&nbsp;</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList">
<section role="region"><a id="frc.robot.subsystems.swervedrive.swerve">
<!-- -->
</a>
<h3>Uses of <a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a> in <a href="../../package-summary.html">frc.robot.subsystems.swervedrive.swerve</a></h3>
<table class="useSummary">
<caption><span>Methods in <a href="../../package-summary.html">frc.robot.subsystems.swervedrive.swerve</a> that return <a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a></span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a></code></td>
<th class="colSecond" scope="row"><span class="typeNameLabel">SwerveModule.</span><code><span class="memberNameLink"><a href="../../SwerveModule.html#getState()">getState</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the module state.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a>[]</code></td>
<th class="colSecond" scope="row"><span class="typeNameLabel">SwerveDrive.</span><code><span class="memberNameLink"><a href="../../SwerveDrive.html#getStates()">getStates</a></span>()</code></th>
<td class="colLast">
<div class="block">Get current swerve module states in order.</div>
</td>
</tr>
</tbody>
</table>
<table class="useSummary">
<caption><span>Methods in <a href="../../package-summary.html">frc.robot.subsystems.swervedrive.swerve</a> with parameters of type <a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a></span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><span class="typeNameLabel">SwerveDrive.</span><code><span class="memberNameLink"><a href="../../SwerveDrive.html#setModuleStates(frc.robot.subsystems.swervedrive.swerve.kinematics.SwerveModuleState2%5B%5D)">setModuleStates</a></span>&#8203;(<a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a>[]&nbsp;states)</code></th>
<td class="colLast">
<div class="block">Set the swerve module states given an array of states.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><span class="typeNameLabel">SwerveModule.</span><code><span class="memberNameLink"><a href="../../SwerveModule.html#setState(frc.robot.subsystems.swervedrive.swerve.kinematics.SwerveModuleState2)">setState</a></span>&#8203;(<a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a>&nbsp;state)</code></th>
<td class="colLast">
<div class="block">Set the module speed and angle based off the module state.</div>
</td>
</tr>
</tbody>
</table>
</section>
</li>
<li class="blockList">
<section role="region"><a id="frc.robot.subsystems.swervedrive.swerve.kinematics">
<!-- -->
</a>
<h3>Uses of <a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a> in <a href="../package-summary.html">frc.robot.subsystems.swervedrive.swerve.kinematics</a></h3>
<table class="useSummary">
<caption><span>Fields in <a href="../package-summary.html">frc.robot.subsystems.swervedrive.swerve.kinematics</a> declared as <a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a></span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>private <a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a>[]</code></td>
<th class="colSecond" scope="row"><span class="typeNameLabel">SwerveDriveKinematics2.</span><code><span class="memberNameLink"><a href="../SwerveDriveKinematics2.html#m_moduleStates">m_moduleStates</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
</tbody>
</table>
<table class="useSummary">
<caption><span>Methods in <a href="../package-summary.html">frc.robot.subsystems.swervedrive.swerve.kinematics</a> that return <a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a></span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a></code></td>
<th class="colSecond" scope="row"><span class="typeNameLabel">SwerveModuleState2.</span><code><span class="memberNameLink"><a href="../SwerveModuleState2.html#optimize(frc.robot.subsystems.swervedrive.swerve.kinematics.SwerveModuleState2,edu.wpi.first.math.geometry.Rotation2d)">optimize</a></span>&#8203;(<a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a>&nbsp;desiredState,
edu.wpi.first.math.geometry.Rotation2d&nbsp;currentAngle)</code></th>
<td class="colLast">
<div class="block">Minimize the change in heading the desired swerve module state would require by potentially reversing the direction
the wheel spins.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a>[]</code></td>
<th class="colSecond" scope="row"><span class="typeNameLabel">SwerveDriveKinematics2.</span><code><span class="memberNameLink"><a href="../SwerveDriveKinematics2.html#toSwerveModuleStates(edu.wpi.first.math.kinematics.ChassisSpeeds)">toSwerveModuleStates</a></span>&#8203;(edu.wpi.first.math.kinematics.ChassisSpeeds&nbsp;chassisSpeeds)</code></th>
<td class="colLast">
<div class="block">Performs inverse kinematics.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a>[]</code></td>
<th class="colSecond" scope="row"><span class="typeNameLabel">SwerveDriveKinematics2.</span><code><span class="memberNameLink"><a href="../SwerveDriveKinematics2.html#toSwerveModuleStates(edu.wpi.first.math.kinematics.ChassisSpeeds,edu.wpi.first.math.geometry.Translation2d)">toSwerveModuleStates</a></span>&#8203;(edu.wpi.first.math.kinematics.ChassisSpeeds&nbsp;chassisSpeeds,
edu.wpi.first.math.geometry.Translation2d&nbsp;centerOfRotationMeters)</code></th>
<td class="colLast">
<div class="block">Performs inverse kinematics to return the module states from a desired chassis velocity.</div>
</td>
</tr>
</tbody>
</table>
<table class="useSummary">
<caption><span>Methods in <a href="../package-summary.html">frc.robot.subsystems.swervedrive.swerve.kinematics</a> with parameters of type <a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a></span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><span class="typeNameLabel">SwerveDriveKinematics2.</span><code><span class="memberNameLink"><a href="../SwerveDriveKinematics2.html#desaturateWheelSpeeds(frc.robot.subsystems.swervedrive.swerve.kinematics.SwerveModuleState2%5B%5D,double)">desaturateWheelSpeeds</a></span>&#8203;(<a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a>[]&nbsp;moduleStates,
double&nbsp;attainableMaxSpeedMetersPerSecond)</code></th>
<td class="colLast">
<div class="block">Renormalizes the wheel speeds if any individual speed is above the specified maximum.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><span class="typeNameLabel">SwerveDriveKinematics2.</span><code><span class="memberNameLink"><a href="../SwerveDriveKinematics2.html#desaturateWheelSpeeds(frc.robot.subsystems.swervedrive.swerve.kinematics.SwerveModuleState2%5B%5D,edu.wpi.first.math.kinematics.ChassisSpeeds,double,double,double)">desaturateWheelSpeeds</a></span>&#8203;(<a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a>[]&nbsp;moduleStates,
edu.wpi.first.math.kinematics.ChassisSpeeds&nbsp;currentChassisSpeed,
double&nbsp;attainableMaxModuleSpeedMetersPerSecond,
double&nbsp;attainableMaxTranslationalSpeedMetersPerSecond,
double&nbsp;attainableMaxRotationalVelocityRadiansPerSecond)</code></th>
<td class="colLast">
<div class="block">Renormalizes the wheel speeds if any individual speed is above the specified maximum, as well as getting rid of
joystick saturation at edges of joystick.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a></code></td>
<th class="colSecond" scope="row"><span class="typeNameLabel">SwerveModuleState2.</span><code><span class="memberNameLink"><a href="../SwerveModuleState2.html#optimize(frc.robot.subsystems.swervedrive.swerve.kinematics.SwerveModuleState2,edu.wpi.first.math.geometry.Rotation2d)">optimize</a></span>&#8203;(<a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a>&nbsp;desiredState,
edu.wpi.first.math.geometry.Rotation2d&nbsp;currentAngle)</code></th>
<td class="colLast">
<div class="block">Minimize the change in heading the desired swerve module state would require by potentially reversing the direction
the wheel spins.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>edu.wpi.first.math.kinematics.ChassisSpeeds</code></td>
<th class="colSecond" scope="row"><span class="typeNameLabel">SwerveDriveKinematics2.</span><code><span class="memberNameLink"><a href="../SwerveDriveKinematics2.html#toChassisSpeeds(frc.robot.subsystems.swervedrive.swerve.kinematics.SwerveModuleState2...)">toChassisSpeeds</a></span>&#8203;(<a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">SwerveModuleState2</a>...&nbsp;wheelStates)</code></th>
<td class="colLast">
<div class="block">Performs forward kinematics to return the resulting chassis state from the given module states.</div>
</td>
</tr>
</tbody>
</table>
</section>
</li>
</ul>
</li>
</ul>
</div>
</main>
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../index.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../SwerveModuleState2.html" title="class in frc.robot.subsystems.swervedrive.swerve.kinematics">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>