mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-23 06:41:41 +00:00
Added fscalar to JSON configuration
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (17) on Thu Feb 16 22:12:26 CST 2023 -->
|
||||
<!-- Generated by javadoc (17) on Mon Feb 20 22:01:54 CST 2023 -->
|
||||
<title>SwerveMath</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-02-16">
|
||||
<meta name="dc.created" content="2023-02-20">
|
||||
<meta name="description" content="declaration: package: swervelib.math, class: SwerveMath">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
@@ -163,8 +163,15 @@ loadScripts(document, 'script');</script>
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
|
||||
<div class="block">Calculate the meters per rotation for the integrated encoder.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static edu.wpi.first.math.geometry.Translation2d</code></div>
|
||||
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#limitVelocity(edu.wpi.first.math.geometry.Translation2d,edu.wpi.first.math.kinematics.ChassisSpeeds,edu.wpi.first.math.geometry.Pose2d,double,double,double,edu.wpi.first.math.geometry.Translation3d,swervelib.parser.SwerveDriveConfiguration)" class="member-name-link">limitVelocity</a><wbr>(edu.wpi.first.math.geometry.Translation2d commandedVelocity,
|
||||
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="../parser/SwerveModuleConfiguration.html" title="class in swervelib.parser">SwerveModuleConfiguration</a></code></div>
|
||||
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getSwerveModule(swervelib.SwerveModule%5B%5D,boolean,boolean)" class="member-name-link">getSwerveModule</a><wbr>(<a href="../SwerveModule.html" title="class in swervelib">SwerveModule</a>[] modules,
|
||||
boolean front,
|
||||
boolean left)</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
|
||||
<div class="block">Get the fruthest module from center based on the module locations.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static edu.wpi.first.math.geometry.Translation2d</code></div>
|
||||
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#limitVelocity(edu.wpi.first.math.geometry.Translation2d,edu.wpi.first.math.kinematics.ChassisSpeeds,edu.wpi.first.math.geometry.Pose2d,double,double,double,edu.wpi.first.math.geometry.Translation3d,swervelib.parser.SwerveDriveConfiguration)" class="member-name-link">limitVelocity</a><wbr>(edu.wpi.first.math.geometry.Translation2d commandedVelocity,
|
||||
edu.wpi.first.math.kinematics.ChassisSpeeds fieldVelocity,
|
||||
edu.wpi.first.math.geometry.Pose2d robotPose,
|
||||
double loopTime,
|
||||
@@ -172,13 +179,13 @@ loadScripts(document, 'script');</script>
|
||||
double robotMass,
|
||||
edu.wpi.first.math.geometry.Translation3d chassisCenterOfGravity,
|
||||
<a href="../parser/SwerveDriveConfiguration.html" title="class in swervelib.parser">SwerveDriveConfiguration</a> config)</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
|
||||
<div class="block">Limits a commanded velocity to prevent exceeding the maximum acceleration given by
|
||||
<a href="#calcMaxAccel(edu.wpi.first.math.geometry.Rotation2d,double,double,edu.wpi.first.math.geometry.Translation3d,swervelib.parser.SwerveDriveConfiguration)"><code>calcMaxAccel(Rotation2d, double, double, Translation3d, SwerveDriveConfiguration)</code></a>.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static double</code></div>
|
||||
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#normalizeAngle(double)" class="member-name-link">normalizeAngle</a><wbr>(double angle)</code></div>
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
|
||||
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static double</code></div>
|
||||
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#normalizeAngle(double)" class="member-name-link">normalizeAngle</a><wbr>(double angle)</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
|
||||
<div class="block">Normalize an angle to be within 0 to 360.</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -219,7 +226,7 @@ loadScripts(document, 'script');</script>
|
||||
double motorFreeSpeedRPM,
|
||||
double angleGearRatio)</span></div>
|
||||
<div class="block">Calculate the angle kV which will be multiplied by the radians per second for the feedforward. Volt * seconds /
|
||||
degree <=> (maxVolts) / (maxSpeed)</div>
|
||||
degree == (maxVolts) / (maxSpeed)</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>optimalVoltage</code> - Optimal voltage to use when calculating the angle kV.</dd>
|
||||
@@ -283,7 +290,7 @@ loadScripts(document, 'script');</script>
|
||||
<h3>calculateDegreesPerSteeringRotation</h3>
|
||||
<div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">double</span> <span class="element-name">calculateDegreesPerSteeringRotation</span><wbr><span class="parameters">(double angleGearRatio,
|
||||
double pulsePerRotation)</span></div>
|
||||
<div class="block">Calculate the degrees per steering rotation for the integrated encoder. Encoder conversion values. Drive converts
|
||||
<div class="block">Calculate the degrees per steering rotation for the integrated encoder. Encoder conversion values. Drive converts
|
||||
motor rotations to linear wheel distance and steering converts motor rotations to module azimuth.</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
@@ -354,7 +361,7 @@ loadScripts(document, 'script');</script>
|
||||
edu.wpi.first.math.geometry.Translation3d chassisCenterOfGravity,
|
||||
<a href="../parser/SwerveDriveConfiguration.html" title="class in swervelib.parser">SwerveDriveConfiguration</a> config)</span></div>
|
||||
<div class="block">Calculates the maximum acceleration allowed in a direction without tipping the robot. Reads arm position from
|
||||
NetworkTables and is passed the direction in question.<br/><b>Requires modules to be named: <br/>"frontright.json", "frontleft.json", "backright.json", "backleft.json"</b></div>
|
||||
NetworkTables and is passed the direction in question.</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>angle</code> - The direction in which to calculate max acceleration, as a Rotation2d. Note that this
|
||||
@@ -380,9 +387,8 @@ loadScripts(document, 'script');</script>
|
||||
edu.wpi.first.math.geometry.Translation3d chassisCenterOfGravity,
|
||||
<a href="../parser/SwerveDriveConfiguration.html" title="class in swervelib.parser">SwerveDriveConfiguration</a> config)</span></div>
|
||||
<div class="block">Limits a commanded velocity to prevent exceeding the maximum acceleration given by
|
||||
<a href="#calcMaxAccel(edu.wpi.first.math.geometry.Rotation2d,double,double,edu.wpi.first.math.geometry.Translation3d,swervelib.parser.SwerveDriveConfiguration)"><code>calcMaxAccel(Rotation2d, double, double, Translation3d, SwerveDriveConfiguration)</code></a>. Note that
|
||||
this takes and returns field-relative velocities. <br/><b>Requires modules to be named:<br/> "frontright.json",
|
||||
"frontleft.json", "backright.json", "backleft.json"</b></div>
|
||||
<a href="#calcMaxAccel(edu.wpi.first.math.geometry.Rotation2d,double,double,edu.wpi.first.math.geometry.Translation3d,swervelib.parser.SwerveDriveConfiguration)"><code>calcMaxAccel(Rotation2d, double, double, Translation3d, SwerveDriveConfiguration)</code></a>. Note that
|
||||
this takes and returns field-relative velocities.</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>commandedVelocity</code> - The desired velocity</dd>
|
||||
@@ -395,11 +401,28 @@ loadScripts(document, 'script');</script>
|
||||
<dd><code>chassisCenterOfGravity</code> - Chassis center of gravity.</dd>
|
||||
<dd><code>config</code> - The swerve drive configuration.</dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>The limited velocity. This is either the commanded velocity, if attainable, or the closest attainable
|
||||
<dd>The limited velocity. This is either the commanded velocity, if attainable, or the closest attainable
|
||||
velocity.</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getSwerveModule(swervelib.SwerveModule[],boolean,boolean)">
|
||||
<h3>getSwerveModule</h3>
|
||||
<div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="../parser/SwerveModuleConfiguration.html" title="class in swervelib.parser">SwerveModuleConfiguration</a></span> <span class="element-name">getSwerveModule</span><wbr><span class="parameters">(<a href="../SwerveModule.html" title="class in swervelib">SwerveModule</a>[] modules,
|
||||
boolean front,
|
||||
boolean left)</span></div>
|
||||
<div class="block">Get the fruthest module from center based on the module locations.</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>modules</code> - Swerve module list.</dd>
|
||||
<dd><code>front</code> - True = furthest front, False = furthest back.</dd>
|
||||
<dd><code>left</code> - True = furthest left, False = furthest right.</dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>Module location which is the furthest from center and abides by parameters.</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user