Skip to content

Commit

Permalink
Upgrading to 2025.1.3.jwt151
Browse files Browse the repository at this point in the history
  • Loading branch information
thenetworkgrinch committed Jan 10, 2025
1 parent 9c830a0 commit dc9856b
Show file tree
Hide file tree
Showing 56 changed files with 126 additions and 36 deletions.
4 changes: 4 additions & 0 deletions docs/index-all.html
Original file line number Diff line number Diff line change
Expand Up @@ -2004,6 +2004,10 @@ <h2 class="title" id="I:M">M</h2>
<dd>
<div class="block">Only send the machine readable data related to swerve drive.</div>
</dd>
<dt><a href="swervelib/simulation/SwerveModuleSimulation.html#mapleSimModule" class="member-name-link">mapleSimModule</a> - Variable in class swervelib.simulation.<a href="swervelib/simulation/SwerveModuleSimulation.html" title="class in swervelib.simulation">SwerveModuleSimulation</a></dt>
<dd>
<div class="block">MapleSim module.</div>
</dd>
<dt><a href="swervelib/math/Matter.html#mass" class="member-name-link">mass</a> - Variable in class swervelib.math.<a href="swervelib/math/Matter.html" title="class in swervelib.math">Matter</a></dt>
<dd>
<div class="block">Mass in kg of object.</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/member-search-index.js

Large diffs are not rendered by default.

36 changes: 34 additions & 2 deletions docs/swervelib/simulation/SwerveModuleSimulation.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#field-detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
Expand Down Expand Up @@ -82,6 +82,23 @@ <h1 title="Class SwerveModuleSimulation" class="title">Class SwerveModuleSimulat
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<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><a href="https://shenzhen-robotics-alliance.github.io/maple-sim/javadocs/org/ironmaple/simulation/drivesims/SelfControlledSwerveDriveSimulation.SelfControlledModuleSimulation.html" title="class or interface in org.ironmaple.simulation.drivesims" class="external-link">SelfControlledSwerveDriveSimulation.SelfControlledModuleSimulation</a></code></div>
<div class="col-second even-row-color"><code><a href="#mapleSimModule" class="member-name-link">mapleSimModule</a></code></div>
<div class="col-last even-row-color">
<div class="block">MapleSim module.</div>
</div>
</div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
Expand Down Expand Up @@ -150,6 +167,21 @@ <h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from cl
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="mapleSimModule">
<h3>mapleSimModule</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://shenzhen-robotics-alliance.github.io/maple-sim/javadocs/org/ironmaple/simulation/drivesims/SelfControlledSwerveDriveSimulation.SelfControlledModuleSimulation.html" title="class or interface in org.ironmaple.simulation.drivesims" class="external-link">SelfControlledSwerveDriveSimulation.SelfControlledModuleSimulation</a></span>&nbsp;<span class="element-name">mapleSimModule</span></div>
<div class="block">MapleSim module.</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/swervelib/SwerveModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -371,18 +371,18 @@ public void setDesiredState(SwerveModuleState desiredState, boolean isOpenLoop,
}

// Cosine compensation.
LinearVelocity nextVelocity =
double nextVelocityMetersPerSecond =
configuration.useCosineCompensator
? getCosineCompensatedVelocity(desiredState)
: MetersPerSecond.of(desiredState.speedMetersPerSecond);
LinearVelocity curVelocity = MetersPerSecond.of(lastState.speedMetersPerSecond);
desiredState.speedMetersPerSecond = nextVelocity.magnitude();
: desiredState.speedMetersPerSecond;
double curVelocityMetersPerSecond = lastState.speedMetersPerSecond;
desiredState.speedMetersPerSecond = nextVelocityMetersPerSecond;

setDesiredState(
desiredState,
isOpenLoop,
driveMotorFeedforward.calculateWithVelocities(
curVelocity.in(MetersPerSecond), nextVelocity.in(MetersPerSecond)));
curVelocityMetersPerSecond, nextVelocityMetersPerSecond));
}

/**
Expand Down Expand Up @@ -447,7 +447,7 @@ public void setDesiredState(
* @param desiredState Desired {@link SwerveModuleState} to use.
* @return Cosine compensated velocity in meters/second.
*/
private LinearVelocity getCosineCompensatedVelocity(SwerveModuleState desiredState) {
private double getCosineCompensatedVelocity(SwerveModuleState desiredState) {
double cosineScalar = 1.0;
// Taken from the CTRE SwerveModule class.
// https://api.ctr-electronics.com/phoenix6/release/java/src-html/com/ctre/phoenix6/mechanisms/swerve/SwerveModule.html#line.46
Expand All @@ -464,7 +464,7 @@ private LinearVelocity getCosineCompensatedVelocity(SwerveModuleState desiredSta
cosineScalar = 1;
}

return MetersPerSecond.of(desiredState.speedMetersPerSecond).times(cosineScalar);
return desiredState.speedMetersPerSecond * cosineScalar;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ public void clearStickyFaults() {
public void configure(boolean inverted) {
if (sparkMax instanceof SparkMaxSwerve) {
SparkMaxConfig cfg = ((SparkMaxSwerve) sparkMax).getConfig();
cfg.analogSensor.inverted(true);
cfg.analogSensor.inverted(inverted);
((SparkMaxSwerve) sparkMax).updateConfig(cfg);
} else if (sparkMax instanceof SparkMaxBrushedMotorSwerve) {
SparkMaxConfig cfg = ((SparkMaxBrushedMotorSwerve) sparkMax).getConfig();
cfg.analogSensor.inverted(true);
cfg.analogSensor.inverted(inverted);
((SparkMaxBrushedMotorSwerve) sparkMax).updateConfig(cfg);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/swervelib/encoders/SparkMaxEncoderSwerve.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class SparkMaxEncoderSwerve extends SwerveAbsoluteEncoder {
*/
public SparkMaxEncoderSwerve(SwerveMotor motor, int conversionFactor) {
failureConfiguring =
new Alert("Encoders", "Failure configuring SparkMax Analog Encoder", AlertType.kWarning);
new Alert("Encoders", "Failure configuring SparkMax Absolute Encoder", AlertType.kWarning);
offsetFailure =
new Alert("Encoders", "Failure to set Absolute Encoder Offset", AlertType.kWarning);
if (motor.getMotor() instanceof SparkMax) {
Expand Down Expand Up @@ -81,11 +81,11 @@ public void clearStickyFaults() {
public void configure(boolean inverted) {
if (sparkMax instanceof SparkMaxSwerve) {
SparkMaxConfig cfg = ((SparkMaxSwerve) sparkMax).getConfig();
cfg.analogSensor.inverted(true);
cfg.absoluteEncoder.inverted(inverted);
((SparkMaxSwerve) sparkMax).updateConfig(cfg);
} else if (sparkMax instanceof SparkMaxBrushedMotorSwerve) {
SparkMaxConfig cfg = ((SparkMaxBrushedMotorSwerve) sparkMax).getConfig();
cfg.analogSensor.inverted(true);
cfg.absoluteEncoder.inverted(inverted);
((SparkMaxBrushedMotorSwerve) sparkMax).updateConfig(cfg);
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/swervelib/motors/SparkFlexSwerve.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
/** An implementation of {@link SparkFlex} as a {@link SwerveMotor}. */
public class SparkFlexSwerve extends SwerveMotor {

/** Config retry delay. */
private final double configDelay = Milliseconds.of(5).in(Seconds);
/** {@link SparkFlex} Instance. */
private final SparkFlex motor;
/** Integrated encoder. */
Expand Down Expand Up @@ -96,7 +98,7 @@ private void configureSparkFlex(Supplier<REVLibError> config) {
if (config.get() == REVLibError.kOk) {
return;
}
Timer.delay(Milliseconds.of(5).in(Seconds));
Timer.delay(configDelay);
}
failureConfiguring.set(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
/** Brushed motor control with {@link SparkMax}. */
public class SparkMaxBrushedMotorSwerve extends SwerveMotor {

/** Config retry delay. */
private final double configDelay = Milliseconds.of(5).in(Seconds);
/** SparkMAX Instance. */
private final SparkMax motor;
/** Absolute encoder attached to the SparkMax (if exists) */
Expand Down Expand Up @@ -171,7 +173,7 @@ private void configureSparkMax(Supplier<REVLibError> config) {
if (config.get() == REVLibError.kOk) {
return;
}
Timer.delay(Milliseconds.of(5).in(Seconds));
Timer.delay(configDelay);
}
failureConfiguringAlert.set(true);
}
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/swervelib/motors/SparkMaxSwerve.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
/** An implementation of {@link com.revrobotics.spark.SparkMax} as a {@link SwerveMotor}. */
public class SparkMaxSwerve extends SwerveMotor {

/** Config retry delay. */
private final double configDelay = Milliseconds.of(5).in(Seconds);
/** {@link SparkMax} Instance. */
private final SparkMax motor;
/** Integrated encoder. */
Expand Down Expand Up @@ -97,7 +99,7 @@ private void configureSparkMax(Supplier<REVLibError> config) {
if (config.get() == REVLibError.kOk) {
return;
}
Timer.delay(Milliseconds.of(5).in(Seconds));
Timer.delay(configDelay);
}
DriverStation.reportWarning("Failure configuring motor " + motor.getDeviceId(), true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
/** Class that wraps around {@link org.ironmaple.simulation.drivesims.SwerveModuleSimulation} */
public class SwerveModuleSimulation {

private SelfControlledSwerveDriveSimulation.SelfControlledModuleSimulation mapleSimModule = null;
/** MapleSim module. */
public SelfControlledSwerveDriveSimulation.SelfControlledModuleSimulation mapleSimModule = null;

/**
* Configure the maple sim module
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fe8316ad370951f45fb7b92e75093a0c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dfa30a245b001fa44748ae65cd2d8f629f03dc56
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6c4f48bbd1d64082595c1120d6bf9c60267728848dac4e3493f373c6c6f7691d
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
21923cd5ddd175405a612fab30e8ea81518a3ddfd349b3eb2201a566342a79701d3a61dc661d382154134889815e3174f2382f0283aeddd2485d80254cf5fe8e
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fe8316ad370951f45fb7b92e75093a0c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dfa30a245b001fa44748ae65cd2d8f629f03dc56
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6c4f48bbd1d64082595c1120d6bf9c60267728848dac4e3493f373c6c6f7691d
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
21923cd5ddd175405a612fab30e8ea81518a3ddfd349b3eb2201a566342a79701d3a61dc661d382154134889815e3174f2382f0283aeddd2485d80254cf5fe8e
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.1.3.jwt151</version>
<packaging>pom</packaging>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a2eed87ac41780eef404ea7382319831
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
722f43d676385a32c90a5d108107e10c1e7c45e5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c0b338593514586bba137f770461710302c304cc82af643047859f2278a07867
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e836a3197524f48c7509d443079af1f1a2b657f48786f5b54c95281c7992564e7ac851a80b4696aeb819806ac4a6f847cfbf2ba6d661929218c544e538d25982
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.1.3-1</latest>
<release>2025.1.3-1</release>
<latest>2025.1.3.jwt151</latest>
<release>2025.1.3.jwt151</release>
<versions>
<version>2024.6.1.0</version>
<version>2024.7.0</version>
Expand All @@ -29,7 +29,8 @@
<version>2025.1.2.1</version>
<version>2025.1.3</version>
<version>2025.1.3-1</version>
<version>2025.1.3.jwt151</version>
</versions>
<lastUpdated>20250109213234</lastUpdated>
<lastUpdated>20250110224739</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 @@
c2d91bd16ab6ba49649a6f3941fe256f
7d6414d48e31a3a224b725de121a21d0
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 @@
5488928dcc0cf2efc5d35e9072551fcdac3b1876
17ed6c607fb314d4ec0ea852c16c0a92fddad7c8
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 @@
3c7f57525d3ecbaf0835191e093789d812b734a1b54ae6a969889e807ab07621
009364ef85ce50f943e297f6d6c7983b0264d094326297e7f759b23a026fb152
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 @@
7b9f170cc90c7bf5faffde5acd28d1bc51aa513fbf9746182e1d8163b94d45d83fafc8505c357b371ee632a55cf37424dbebabfb964731245a6a57ee69bde1b2
38f4661324b3dde5f7bae01af4b2ccb27939a7d283c551c52977850e923b8cbd09157b573f557a97f8faab7d7c495bae7039db9643d759e55fa925d3b412bb6f
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
67ef61c63c0fa35df368b1e4d94d3885
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6c814911f6ac41c4ad6d0d919ebc54de31a3f73f
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c04a15f99e9775eaf8c1c3da7b34f759ff90cbf5c64b84155e03f1ecaeb4e30c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
06d98dd102d1545e3329f38f62ac2950a0aaf2cf34ff97d3c39a5d720628e3721eb0120dae28d058f00f645f5f1586f26925899c6c823dfecb1be448746a10f5
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9f261e0d29d6c49ccce8a1bac0161a8a
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
52ee71adea381bdf166230f20a6fab7352914434
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ecea5a7cb3fa9c10147b5c69704983c433bb43e2b7f00d7532edd12ff4db6847
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bd952ce2f1c970468a2c108f3c44604be953cbb81c47969b488c427c14011b45e87ec8f28de0489fd33184f4286ec7158fdd83aa917eb89c85d939dc6bcee485
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b56f6eb44329b65956a68e3d3b603580
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d5bf2b8d8dad25c12d7ea07a28902079428e8745
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f500bdec5c69dc393febd439ec38775201309770624eb6af868a904acd180ac7
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ccd9e956bc5d87dc75725b3505dd1d493e8c8cd4866f6ae710e0d95e9259445a93c3dd1869c0b66aecdd36e0ce2376c68468b86f16a4b2c71c25c6eb2162978e
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.1.3.jwt151</version>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
38cfc38187881ceb3c51520ceb026479
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8b31f9520e3579ee58b001705631e37d95ee6d28
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a5a885fc63ef28d4636cacca3d20101f1f0d0a09d66da384c83f40d5d4450642
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ccc40ac6f497d508b07f2218e8e1507d725c29bb77e3b29ba4935be7fa946cc81324cc8b37efb2602daea477ffb66c24c735b476030556e981bff39e131c7f27
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.1.3-1</latest>
<release>2025.1.3-1</release>
<latest>2025.1.3.jwt151</latest>
<release>2025.1.3.jwt151</release>
<versions>
<version>2024.7.0</version>
<version>2025.0.0</version>
Expand All @@ -19,7 +19,8 @@
<version>2025.1.2.1</version>
<version>2025.1.3</version>
<version>2025.1.3-1</version>
<version>2025.1.3.jwt151</version>
</versions>
<lastUpdated>20250109213239</lastUpdated>
<lastUpdated>20250110224743</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 @@
80603008b7bcda97cde93e6547830e23
83b7b6430b483eb97553dde2f7675cc2
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 @@
7c069c3d8a878c9eb7582dfc39d01e0e88d71743
01814bd89ae0d26d2382bb995e5894af6ae5dc2f
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 @@
8d60ba5fe2962bed89d12fe35084a0015db2b0e8ad5b4549154a2d367c5e346a
497eedc4c1709b74cac6773fdcaf3b0e53056c1b12fc304ccf0148236b09f975
Loading

0 comments on commit dc9856b

Please sign in to comment.