@@ -14,8 +14,8 @@ use serde::{Deserialize, Serialize};
1414use serde_with:: { serde_as, DurationMicroSeconds } ;
1515
1616use crate :: core:: debug:: DebugContext ;
17- use crate :: localization:: RobotPose ;
1817
18+ use crate :: localization:: odometry:: Odometry ;
1919use crate :: nao:: Cycle ;
2020use crate :: vision:: camera:: init_camera;
2121use crate :: vision:: referee:: detect:: VisualRefereeDetectionStatus ;
@@ -146,8 +146,8 @@ impl<T: CameraLocation> Clone for Ball<T> {
146146}
147147
148148/// System that runs the prediction step for the UKF backing the ball tracker.
149- fn update_ball_tracker ( mut ball_tracker : ResMut < BallTracker > ) {
150- ball_tracker. predict ( ) ;
149+ fn update_ball_tracker ( mut ball_tracker : ResMut < BallTracker > , odometry : Res < Odometry > ) {
150+ ball_tracker. predict ( & odometry ) ;
151151}
152152
153153#[ allow( clippy:: too_many_arguments) ]
@@ -160,7 +160,6 @@ fn classify_balls<T: CameraLocation>(
160160 mut ball_tracker : ResMut < BallTracker > ,
161161 camera_matrix : Res < CameraMatrix < T > > ,
162162 config : Res < BallDetectionConfig > ,
163- robot_pose : Res < RobotPose > ,
164163) {
165164 let classifier = & config. classifier ;
166165 let start = Instant :: now ( ) ;
@@ -207,7 +206,7 @@ fn classify_balls<T: CameraLocation>(
207206 continue ;
208207 } ;
209208
210- let position = BallPosition ( robot_pose . robot_to_world ( & Point2 :: from ( robot_to_ball. xy ( ) ) ) ) ;
209+ let position = BallPosition ( robot_to_ball. xy ( ) ) ;
211210
212211 confident_balls. push ( ( position, confidence, proposal. clone ( ) ) ) ;
213212
0 commit comments