Skip to content

Commit

Permalink
[Robot] Remove unneeded vision update sort
Browse files Browse the repository at this point in the history
  • Loading branch information
rmheuer committed Nov 20, 2023
1 parent 4e43fcd commit 6c0e225
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,11 @@ public void update(Twist2d driveTwist) {

List<TagTrackerInput.VisionUpdate> newVisionUpdates = new ArrayList<>();
newVisionUpdates.add(visionUpdate);
newVisionUpdates.sort(this::compareStdDevs);

// Insert new update entry for this vision update
updates.put(timestamp, new PoseUpdate(prevToVisionTwist, newVisionUpdates));

// Overwrite nextUpdate with twist after this vision update
updates.put(nextUpdate.getKey(), new PoseUpdate(visionToNextTwist, nextUpdate.getValue().visionUpdates));
}
}
Expand Down

0 comments on commit 6c0e225

Please sign in to comment.