Fixed issue with angle optimization

This commit is contained in:
thenetworkgrinch
2023-08-29 19:59:07 -05:00
parent 38c7bdba7d
commit 12f6e0ed38
138 changed files with 8913 additions and 1020 deletions

View File

@@ -1,17 +1,18 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>SwerveModulePhysicalCharacteristics (YAGSL-Lib API)</title>
<!-- Generated by javadoc (17) on Tue Aug 29 19:54:45 CDT 2023 -->
<title>SwerveModulePhysicalCharacteristics</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-08-29">
<meta name="description" content="declaration: package: swervelib.parser, class: SwerveModulePhysicalCharacteristics">
<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.1.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">
@@ -31,7 +32,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>
@@ -129,9 +130,8 @@ loadScripts(document, 'script');</script>
<div class="col-first even-row-color"><code>final double</code></div>
<div class="col-second even-row-color"><code><a href="#moduleSteerFFCL" class="member-name-link">moduleSteerFFCL</a></code></div>
<div class="col-last even-row-color">
<div class="block">Angle motor kV used for second order kinematics to tune the feedforward, this variable should
be adjusted so that your drive train does not drift towards the direction you are rotating
while you translate.</div>
<div class="block">Angle motor kV used for second order kinematics to tune the feedforward, this variable should be adjusted so that
your drive train does not drift towards the direction you are rotating while you translate.</div>
</div>
<div class="col-first odd-row-color"><code>final double</code></div>
<div class="col-second odd-row-color"><code><a href="#optimalVoltage" class="member-name-link">optimalVoltage</a></code></div>
@@ -216,8 +216,7 @@ loadScripts(document, 'script');</script>
<section class="detail" id="driveGearRatio">
<h3>driveGearRatio</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">driveGearRatio</span></div>
<div class="block">Drive gear ratio. How many times the motor has to spin before the wheel makes a complete
rotation.</div>
<div class="block">Drive gear ratio. How many times the motor has to spin before the wheel makes a complete rotation.</div>
</section>
</li>
<li>
@@ -287,9 +286,9 @@ loadScripts(document, 'script');</script>
<section class="detail" id="moduleSteerFFCL">
<h3>moduleSteerFFCL</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">moduleSteerFFCL</span></div>
<div class="block">Angle motor kV used for second order kinematics to tune the feedforward, this variable should
be adjusted so that your drive train does not drift towards the direction you are rotating
while you translate. When set to 0 the calculated kV will be used.</div>
<div class="block">Angle motor kV used for second order kinematics to tune the feedforward, this variable should be adjusted so that
your drive train does not drift towards the direction you are rotating while you translate. When set to 0 the
calculated kV will be used.</div>
</section>
</li>
</ul>
@@ -319,25 +318,21 @@ loadScripts(document, 'script');</script>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>driveGearRatio</code> - Gear ratio of the drive motor. Number of motor rotations to rotate the
wheel.</dd>
<dd><code>angleGearRatio</code> - Gear ratio of the angle motor. Number of motor rotations to spin the
wheel.</dd>
wheel.</dd>
<dd><code>angleGearRatio</code> - Gear ratio of the angle motor. Number of motor rotations to spin the wheel.</dd>
<dd><code>wheelDiameter</code> - Wheel diameter in meters.</dd>
<dd><code>wheelGripCoefficientOfFriction</code> - Wheel grip coefficient of friction on carpet given by
manufacturer.</dd>
<dd><code>wheelGripCoefficientOfFriction</code> - Wheel grip coefficient of friction on carpet given by manufacturer.</dd>
<dd><code>optimalVoltage</code> - Optimal robot voltage.</dd>
<dd><code>driveMotorCurrentLimit</code> - Current limit for the drive motor.</dd>
<dd><code>angleMotorCurrentLimit</code> - Current limit for the angle motor.</dd>
<dd><code>driveMotorRampRate</code> - The time in seconds to go from 0 to full throttle on the motor.
(Prevents over drawing power from battery)</dd>
<dd><code>angleMotorRampRate</code> - The time in seconds to go from 0 to full throttle on the motor.
(Prevents overdrawing power and power loss).</dd>
<dd><code>driveEncoderPulsePerRotation</code> - The number of encoder pulses per motor rotation, 1 for
integrated encoders.</dd>
<dd><code>angleEncoderPulsePerRotation</code> - The number of encoder pulses per motor rotation, 1 for
integrated encoders.</dd>
<dd><code>moduleSteerFFCL</code> - The kV applied to the steering motor to ensure your drivetrain does not
drift towards a direction when rotating while translating.</dd>
<dd><code>driveMotorRampRate</code> - The time in seconds to go from 0 to full throttle on the motor. (Prevents
over drawing power from battery)</dd>
<dd><code>angleMotorRampRate</code> - The time in seconds to go from 0 to full throttle on the motor. (Prevents
overdrawing power and power loss).</dd>
<dd><code>driveEncoderPulsePerRotation</code> - The number of encoder pulses per motor rotation, 1 for integrated encoders.</dd>
<dd><code>angleEncoderPulsePerRotation</code> - The number of encoder pulses per motor rotation, 1 for integrated encoders.</dd>
<dd><code>moduleSteerFFCL</code> - The kV applied to the steering motor to ensure your drivetrain does not drift
towards a direction when rotating while translating.</dd>
</dl>
</section>
</li>
@@ -351,24 +346,20 @@ loadScripts(document, 'script');</script>
double&nbsp;angleMotorRampRate,
int&nbsp;driveEncoderPulsePerRotation,
int&nbsp;angleEncoderPulsePerRotation)</span></div>
<div class="block">Construct the swerve module physical characteristics. Assume coefficient of friction is 1.19
(taken from blue nitrile on carpet from Studica) and optimal voltage is 12v. Assumes the drive
motor current limit is 40A, and the angle motor current limit is 20A.</div>
<div class="block">Construct the swerve module physical characteristics. Assume coefficient of friction is 1.19 (taken from blue
nitrile on carpet from Studica) and optimal voltage is 12v. Assumes the drive motor current limit is 40A, and the
angle motor current limit is 20A.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>driveGearRatio</code> - Gear ratio of the drive motor. Number of motor rotations to rotate the
wheel.</dd>
<dd><code>angleGearRatio</code> - Gear ratio of the angle motor. Number of motor rotations to spin the
wheel.</dd>
<dd><code>driveGearRatio</code> - Gear ratio of the drive motor. Number of motor rotations to rotate the wheel.</dd>
<dd><code>angleGearRatio</code> - Gear ratio of the angle motor. Number of motor rotations to spin the wheel.</dd>
<dd><code>wheelDiameter</code> - Wheel diameter in meters.</dd>
<dd><code>driveMotorRampRate</code> - The time in seconds to go from 0 to full throttle on the motor.
(Prevents over drawing power from battery)</dd>
<dd><code>angleMotorRampRate</code> - The time in seconds to go from 0 to full throttle on the motor.
(Prevents overdrawing power and power loss).</dd>
<dd><code>driveEncoderPulsePerRotation</code> - The number of encoder pulses per motor rotation, 1 for
integrated encoders.</dd>
<dd><code>angleEncoderPulsePerRotation</code> - The number of encoder pulses per motor rotation, 1 for
integrated encoders.</dd>
<dd><code>driveMotorRampRate</code> - The time in seconds to go from 0 to full throttle on the motor. (Prevents over
drawing power from battery)</dd>
<dd><code>angleMotorRampRate</code> - The time in seconds to go from 0 to full throttle on the motor. (Prevents
overdrawing power and power loss).</dd>
<dd><code>driveEncoderPulsePerRotation</code> - The number of encoder pulses per motor rotation, 1 for integrated encoders.</dd>
<dd><code>angleEncoderPulsePerRotation</code> - The number of encoder pulses per motor rotation, 1 for integrated encoders.</dd>
</dl>
</section>
</li>