Skip to content

Commit

Permalink
read pos and vel at the same time, massively improving loop times
Browse files Browse the repository at this point in the history
  • Loading branch information
j5155 committed Jul 6, 2024
1 parent 4cf4292 commit e90979d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion TeamCode/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies {
implementation project(':FtcRobotController')
annotationProcessor files('lib/OpModeAnnotationProcessor.jar')

implementation "com.github.jdhs-ftc:road-runner-ftc-otos:7c00759558"
implementation "com.github.jdhs-ftc:road-runner-ftc-otos:22dd547404"
implementation "com.acmerobotics.roadrunner:core:1.0.0-beta8"
implementation "com.acmerobotics.roadrunner:actions:1.0.0-beta8"
implementation "com.acmerobotics.dashboard:dashboard:0.4.15"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ public PoseVelocity2d updatePoseEstimate() {
// the only alternative is to add getter and setters but that breaks compat
otos.setPosition(RRPoseToOTOSPose(pose));
}
SparkFunOTOS.Pose2D otosPose = otos.getPosition();
SparkFunOTOS.Pose2D otosVel = otos.getVelocity();
SparkFunOTOS.Pose2D[] posVelList = otos.getPosVelCorrected();
SparkFunOTOS.Pose2D otosPose = posVelList[0];
SparkFunOTOS.Pose2D otosVel = posVelList[1];
pose = OTOSPoseToRRPose(otosPose);
lastOtosPose = pose;

Expand Down

0 comments on commit e90979d

Please sign in to comment.