Skip to content

Commit df0f008

Browse files
committed
add getSample
1 parent 80621ba commit df0f008

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
id "maven-publish"
77
id "org.jetbrains.kotlin.jvm" version "1.9.0" //1.7.21
88
id "com.google.devtools.ksp" version "1.9.0-1.0.13" //1.7.21-1.0.8
9-
id "edu.wpi.first.GradleRIO" version "2025.1.1"
9+
id "edu.wpi.first.GradleRIO" version "2025.2.1"
1010
id "com.diffplug.spotless" version "6.12.1"
1111
}
1212

src/main/java/org/strykeforce/swerve/PoseEstimatorOdometryStrategy.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ public Pose2d update(Rotation2d gyroAngle, SwerveModulePosition... modulePositio
165165
return odometry.update(gyroAngle, modulePositions);
166166
}
167167

168+
public Pose2d getSample(double timestampSeconds) {
169+
return odometry.sampleAt(timestampSeconds).get();
170+
}
171+
168172
// @Override
169173
// public Pose2d updateWithTime(
170174
// double currentTimeSeconds, Rotation2d gyroAngle, SwerveModuleState... moduleStates) {

0 commit comments

Comments
 (0)