forked from FIRST-Tech-Challenge/FtcRobotController
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop reading localizer inputs on construction
This ensures that any motion between construction and first update will be ignored (this is usually the period between init and start of an op mode). If teams want to track pose during that period, they can call `updatePoseEstimate()` explicitly. This matches the behavior of the 0.5.x localizers (without the annoying reset on every pose estimate set). The localizers also now log much more data to help troubleshoot localization issues in the future.
- Loading branch information
Showing
11 changed files
with
161 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/messages/MecanumEncodersMessage.java
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
.../src/main/java/org/firstinspires/ftc/teamcode/messages/MecanumLocalizerInputsMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.firstinspires.ftc.teamcode.messages; | ||
|
||
import com.acmerobotics.roadrunner.ftc.PositionVelocityPair; | ||
|
||
import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit; | ||
import org.firstinspires.ftc.robotcore.external.navigation.YawPitchRollAngles; | ||
|
||
public final class MecanumLocalizerInputsMessage { | ||
public long timestamp; | ||
public PositionVelocityPair leftFront; | ||
public PositionVelocityPair leftBack; | ||
public PositionVelocityPair rightBack; | ||
public PositionVelocityPair rightFront; | ||
public double yaw; | ||
public double pitch; | ||
public double roll; | ||
|
||
public MecanumLocalizerInputsMessage(PositionVelocityPair leftFront, PositionVelocityPair leftBack, PositionVelocityPair rightBack, PositionVelocityPair rightFront, YawPitchRollAngles angles) { | ||
this.timestamp = System.nanoTime(); | ||
this.leftFront = leftFront; | ||
this.leftBack = leftBack; | ||
this.rightBack = rightBack; | ||
this.rightFront = rightFront; | ||
{ | ||
this.yaw = angles.getYaw(AngleUnit.RADIANS); | ||
this.pitch = angles.getPitch(AngleUnit.RADIANS); | ||
this.roll = angles.getRoll(AngleUnit.RADIANS); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
...de/src/main/java/org/firstinspires/ftc/teamcode/messages/TwoDeadWheelEncodersMessage.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.