Skip to content

Commit

Permalink
Upgrading to 2025.2.0-beta2
Browse files Browse the repository at this point in the history
  • Loading branch information
thenetworkgrinch committed Jan 12, 2025
1 parent cf5fd34 commit 63d3b72
Show file tree
Hide file tree
Showing 52 changed files with 165 additions and 87 deletions.
4 changes: 4 additions & 0 deletions docs/index-all.html
Original file line number Diff line number Diff line change
Expand Up @@ -1362,6 +1362,10 @@ <h2 class="title" id="I:G">G</h2>
<div class="block">Get the maximum module angular velocity as a <a href="https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/units/measure/AngularVelocity.html" title="class or interface in edu.wpi.first.units.measure" class="external-link"><code>AngularVelocity</code></a> based on the RPM and gear
ratio.</div>
</dd>
<dt><a href="swervelib/SwerveModule.html#getMaxDriveVelocityMetersPerSecond()" class="member-name-link">getMaxDriveVelocityMetersPerSecond()</a> - Method in class swervelib.<a href="swervelib/SwerveModule.html" title="class in swervelib">SwerveModule</a></dt>
<dd>
<div class="block">Get the maximum drive velocity of the module in Meters Per Second.</div>
</dd>
<dt><a href="swervelib/SwerveDrive.html#getMaximumChassisAngularVelocity()" class="member-name-link">getMaximumChassisAngularVelocity()</a> - Method in class swervelib.<a href="swervelib/SwerveDrive.html" title="class in swervelib">SwerveDrive</a></dt>
<dd>
<div class="block">Get the maximum angular velocity, either <code>SwerveDrive.attainableMaxRotationalVelocityRadiansPerSecond</code> or <a href="swervelib/parser/SwerveControllerConfiguration.html#maxAngularVelocity"><code>SwerveControllerConfiguration.maxAngularVelocity</code></a>, whichever is the lower limit on the robot's
Expand Down
2 changes: 1 addition & 1 deletion docs/member-search-index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/swervelib/SwerveDrive.html
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ <h2>Method Summary</h2>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Get the maximum angular velocity of an azimuth/angle motor in the swerve module.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/units/measure/LinearVelocity.html" title="class or interface in edu.wpi.first.units.measure" class="external-link">LinearVelocity</a></code></div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMaximumModuleDriveVelocity()" class="member-name-link">getMaximumModuleDriveVelocity</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Get the maximum drive velocity of a module as a <a href="https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/units/measure/LinearVelocity.html" title="class or interface in edu.wpi.first.units.measure" class="external-link"><code>LinearVelocity</code></a>.</div>
Expand Down Expand Up @@ -979,7 +979,7 @@ <h3>getMaximumChassisVelocity</h3>
<li>
<section class="detail" id="getMaximumModuleDriveVelocity()">
<h3>getMaximumModuleDriveVelocity</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/units/measure/LinearVelocity.html" title="class or interface in edu.wpi.first.units.measure" class="external-link">LinearVelocity</a></span>&nbsp;<span class="element-name">getMaximumModuleDriveVelocity</span>()</div>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getMaximumModuleDriveVelocity</span>()</div>
<div class="block">Get the maximum drive velocity of a module as a <a href="https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/units/measure/LinearVelocity.html" title="class or interface in edu.wpi.first.units.measure" class="external-link"><code>LinearVelocity</code></a>.</div>
<dl class="notes">
<dt>Returns:</dt>
Expand Down
132 changes: 74 additions & 58 deletions docs/swervelib/SwerveModule.html

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions src/main/java/swervelib/SwerveDrive.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import static edu.wpi.first.units.Units.KilogramSquareMeters;
import static edu.wpi.first.units.Units.Kilograms;
import static edu.wpi.first.units.Units.Meters;
import static edu.wpi.first.units.Units.MetersPerSecond;
import static edu.wpi.first.units.Units.Newtons;
import static edu.wpi.first.units.Units.RadiansPerSecond;
import static edu.wpi.first.units.Units.Seconds;
Expand Down Expand Up @@ -597,8 +596,8 @@ public double getMaximumChassisVelocity() {
*
* @return {@link LinearVelocity} representing the maximum drive speed of a module.
*/
public LinearVelocity getMaximumModuleDriveVelocity() {
return swerveModules[0].getMaxVelocity();
public double getMaximumModuleDriveVelocity() {
return swerveModules[0].getMaxDriveVelocityMetersPerSecond();
}

/**
Expand Down Expand Up @@ -636,7 +635,7 @@ public double getMaximumChassisAngularVelocity() {
private void setRawModuleStates(
SwerveModuleState[] desiredStates, ChassisSpeeds desiredChassisSpeed, boolean isOpenLoop) {
// Desaturates wheel speeds
double maxModuleSpeedMPS = getMaximumModuleDriveVelocity().in(MetersPerSecond);
double maxModuleSpeedMPS = getMaximumModuleDriveVelocity();
if (attainableMaxTranslationalSpeedMetersPerSecond != 0
|| attainableMaxRotationalVelocityRadiansPerSecond != 0) {
SwerveDriveKinematics.desaturateWheelSpeeds(
Expand Down Expand Up @@ -668,7 +667,7 @@ private void setRawModuleStates(
*/
public void setModuleStates(SwerveModuleState[] desiredStates, boolean isOpenLoop) {
SwerveDriveTelemetry.startCtrlCycle();
double maxModuleSpeedMPS = getMaximumModuleDriveVelocity().in(MetersPerSecond);
double maxModuleSpeedMPS = getMaximumModuleDriveVelocity();
desiredStates = kinematics.toSwerveModuleStates(kinematics.toChassisSpeeds(desiredStates));
SwerveDriveKinematics.desaturateWheelSpeeds(desiredStates, maxModuleSpeedMPS);

Expand Down
20 changes: 16 additions & 4 deletions src/main/java/swervelib/SwerveModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ public class SwerveModule {
private final DoublePublisher angleSetpointPublisher;
/** Maximum {@link LinearVelocity} for the drive motor of the swerve module. */
private LinearVelocity maxDriveVelocity;
/** Maximum velocity for the drive motor of the swerve module. */
private double maxDriveVelocityMetersPerSecond;
/** Maximum {@link AngularVelocity} for the azimuth/angle motor of the swerve module. */
private AngularVelocity maxAngularVelocity;
/** Feedforward for the drive motor during closed loop control. */
Expand Down Expand Up @@ -361,13 +363,12 @@ public void setAnglePIDF(PIDFConfig config) {
*/
public void setDesiredState(SwerveModuleState desiredState, boolean isOpenLoop, boolean force) {

desiredState.optimize(Rotation2d.fromDegrees(getAbsolutePosition()));
desiredState.optimize(Rotation2d.fromDegrees(getRelativePosition()));

// If we are forcing the angle
if (!force && antiJitterEnabled) {
// Prevents module rotation if speed is less than 1%
SwerveMath.antiJitter(
desiredState, lastState, Math.min(maxDriveVelocity.in(MetersPerSecond), 4));
SwerveMath.antiJitter(desiredState, lastState, Math.min(maxDriveVelocityMetersPerSecond, 4));
}

// Cosine compensation.
Expand Down Expand Up @@ -678,15 +679,26 @@ public boolean getAbsoluteEncoderReadIssue() {
* @return {@link LinearVelocity} max velocity of the drive wheel.
*/
public LinearVelocity getMaxVelocity() {
getMaxDriveVelocityMetersPerSecond();
return maxDriveVelocity;
}

/**
* Get the maximum drive velocity of the module in Meters Per Second.
*
* @return Maximum drive motor velocity in Meters Per Second.
*/
public double getMaxDriveVelocityMetersPerSecond() {
if (maxDriveVelocity == null) {
maxDriveVelocity =
InchesPerSecond.of(
(driveMotor.getSimMotor().freeSpeedRadPerSec
/ configuration.conversionFactors.drive.gearRatio)
* configuration.conversionFactors.drive.diameter
/ 2.0);
maxDriveVelocityMetersPerSecond = maxDriveVelocity.in(MetersPerSecond);
}
return maxDriveVelocity;
return maxDriveVelocityMetersPerSecond;
}

/**
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8759510cce615121f66af5d0d120b392
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bd8ee705ae8dd36d3233f87cd9d93e6ed1d0b6fe
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b326c35a74e53a8c83576bdd49a9dc7a6a14e5c73e583f3a95cb06ecce86550f
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9015d0121887993ecec4ef8bc6a44948e30e3bcb6270d4127464bd43ddac365f36c5156493862a30882edfeb478caf4e897b2db246cdd8ff0f287487bde62203
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8759510cce615121f66af5d0d120b392
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bd8ee705ae8dd36d3233f87cd9d93e6ed1d0b6fe
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b326c35a74e53a8c83576bdd49a9dc7a6a14e5c73e583f3a95cb06ecce86550f
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9015d0121887993ecec4ef8bc6a44948e30e3bcb6270d4127464bd43ddac365f36c5156493862a30882edfeb478caf4e897b2db246cdd8ff0f287487bde62203
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>swervelib</groupId>
<artifactId>YAGSL-cpp</artifactId>
<version>2025.2.0-beta2</version>
<packaging>pom</packaging>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
227b444a972edad242addf3d2b2fe1aa
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
541a3f2bbbe25ee86bec01c5e6aa33bbf5f6e862
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cc7cae7d6a68ec7c1fb05fdce61c2e56bf281905ce87184b2240753fd2efd859
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
94b081ae9b8373bb97b25354929c3942adf46beade5fc3bc194fe9f9e6b52afa23ef65b3fc5a2b56fe34c9dea336a4f579777849e5165622c14e6a9075b98796
7 changes: 4 additions & 3 deletions yagsl/repos/swervelib/YAGSL-cpp/maven-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<groupId>swervelib</groupId>
<artifactId>YAGSL-cpp</artifactId>
<versioning>
<latest>2025.2.0-beta</latest>
<release>2025.2.0-beta</release>
<latest>2025.2.0-beta2</latest>
<release>2025.2.0-beta2</release>
<versions>
<version>2024.6.1.0</version>
<version>2024.7.0</version>
Expand All @@ -31,7 +31,8 @@
<version>2025.1.3-1</version>
<version>2025.1.3.jwt151</version>
<version>2025.2.0-beta</version>
<version>2025.2.0-beta2</version>
</versions>
<lastUpdated>20250111192301</lastUpdated>
<lastUpdated>20250112020113</lastUpdated>
</versioning>
</metadata>
2 changes: 1 addition & 1 deletion yagsl/repos/swervelib/YAGSL-cpp/maven-metadata.xml.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4bab8a5b1aa917ed03ae63bff03c1a57
8b29e0a99bf7dc18f56875aba659e849
2 changes: 1 addition & 1 deletion yagsl/repos/swervelib/YAGSL-cpp/maven-metadata.xml.sha1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6dea3552f26e88947e40894aa0cc6f39882efbfd
e589daf3b3c797a81c9559b073f5cbb236a214f0
2 changes: 1 addition & 1 deletion yagsl/repos/swervelib/YAGSL-cpp/maven-metadata.xml.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f57dcbc1ea05f0e0141720a7ba1b0ea1e509f2e307ee081eb5c30c1561bcb34f
cfcb70ce5086aaf1c9a638273070f40f094357174a9d343583cec45ba6120b0f
2 changes: 1 addition & 1 deletion yagsl/repos/swervelib/YAGSL-cpp/maven-metadata.xml.sha512
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ab1a7b3c0266442d44f083fa3e90d15f7a503dc020d1a5e2779380b94ba4d329a759d8ef125838657da16d3eb1b514e17b34d5bb37fe12e0bd0b2ae194fe4024
7a89d6572b365bdde99de5b9e8de6130f4d48175b81343f7ef239f93bf03751c027f0d34549e940eb6d34f2625328ade2adfd22fff7c4d4baa0a87637d3d3cfb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
000af97cbd975fc24fa63da7fa3f7340
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a912c87d91f7d181b25dca09129ce3eedfbb6338
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f7510a5bd36a2a9929cc7ab6a28ce3ff13c1a773db71ee0244a9b97b09fa624a
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0ebd1e9cb252100bbb6fd2edd101e863efc7ac4f6443ebee3ac79d503c73d3e2285421cfe41d34edfc1ce0cb9a63ad345d9cd8151ae4b4cdbb52383c5709557e
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
48e1de491b7544b348a40d513db0ddeb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
30980bf80f1a6ad40029914c182ae9853bdc55ac
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
51ae07888c096d38f6fcb16fe5d7a9a32feb806076062eea97cd88a67a730da2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e60293a66377aecdb071b6a80d19460a1e4b1d61f7caedaeb7dd4cddf9c60870913dfee285f6169867c97634b44033d8ac8560905b56bd4863580963094cf581
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
64fbf32cf432909d11c8a6b38d14fdf0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c52ae2fb4fca755b6b1e9f78020265182760c2bf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
022021d6af43f96e806afd3b72b8a1b387c5f00df3ac72a763a8b1089e2b1158
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4151deecf97e30933c40be3b67d3e522b6a28d046eca514ee759d4522d561ee9d32e31f2eaa5984e9dc01f9ddc67c4f17373dda82959b0dc05cd022fba98711a
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>swervelib</groupId>
<artifactId>YAGSL-java</artifactId>
<version>2025.2.0-beta2</version>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6c48a7349740c1b1a0c119264bbed761
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c9d9ef423d91669ebe7d116fc04a5f44e380d6e5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6be36c421dbf12154b30565259be6b6135e361cebdce9afbc4f8a423a3d6a1f1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4fb6fb35eef68598a771774462b949fd97978fcf0638bd391b029bb753dcd9c0b3ebbbd744fbf622c0e9c4796c811760af247f4c1f5782057fe9855ba273a690
7 changes: 4 additions & 3 deletions yagsl/repos/swervelib/YAGSL-java/maven-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<groupId>swervelib</groupId>
<artifactId>YAGSL-java</artifactId>
<versioning>
<latest>2025.2.0-beta</latest>
<release>2025.2.0-beta</release>
<latest>2025.2.0-beta2</latest>
<release>2025.2.0-beta2</release>
<versions>
<version>2024.7.0</version>
<version>2025.0.0</version>
Expand All @@ -21,7 +21,8 @@
<version>2025.1.3-1</version>
<version>2025.1.3.jwt151</version>
<version>2025.2.0-beta</version>
<version>2025.2.0-beta2</version>
</versions>
<lastUpdated>20250111192305</lastUpdated>
<lastUpdated>20250112020118</lastUpdated>
</versioning>
</metadata>
2 changes: 1 addition & 1 deletion yagsl/repos/swervelib/YAGSL-java/maven-metadata.xml.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
29c112cff5b043b7cabfe5558371b35e
21dd00a4787be37c178c925067e4736c
2 changes: 1 addition & 1 deletion yagsl/repos/swervelib/YAGSL-java/maven-metadata.xml.sha1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b040e54ce20729ab88e6888c0e28d0b673b1b979
d2b9e15ad0ce1e9e8aac5eace1594f0ca577133f
2 changes: 1 addition & 1 deletion yagsl/repos/swervelib/YAGSL-java/maven-metadata.xml.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ec82ab8245838525e122b327b4647e2c0a43dcd49efa61789e3e02a326487172
144ce64b5a51ae1a43a01d34c9e2be3e1769091a9cdbcf81a72653698a3c0a47
2 changes: 1 addition & 1 deletion yagsl/repos/swervelib/YAGSL-java/maven-metadata.xml.sha512
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1207aee63d099fcb9cde2539c6f762b02444a30b9fd6c3f37e58c2bfec6eb2977560ceb02023bfdfa4efb8bb1bebc12f4e9fcce98f0107e31e8c594bb579bb34
2152786d9fddda4261cc646d56d66b84f277bd542e15dbd01f48551786687b8d11c41237bcb0f6ef50ce10d07135ceaafe09bcbabee6544f748c368e8e6c167a
6 changes: 3 additions & 3 deletions yagsl/yagsl.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"fileName": "yagsl-2025.2.0-beta.json",
"fileName": "yagsl-2025.2.0-beta2.json",
"name": "YAGSL",
"version": "2025.2.0-beta",
"version": "2025.2.0-beta2",
"frcYear": "2025",
"uuid": "1ccce5a4-acd2-4d18-bca3-4b8047188400",
"mavenUrls": [
Expand All @@ -12,7 +12,7 @@
{
"groupId": "swervelib",
"artifactId": "YAGSL-java",
"version": "2025.2.0-beta"
"version": "2025.2.0-beta2"
}
],
"requires": [
Expand Down

0 comments on commit 63d3b72

Please sign in to comment.