The ball velocity is a useful data that we need to have for some strategies like the goal keeper.
For now the velocity filter is not in use because the current implementation is this one : https://github.com/NAMeC-team/rbc24-CRAbE/blob/main/crates/crabe_filter/src/filter/velocity_acceleration.rs (update_ball_vel_accel function)
which is not working as the time difference between the 2 frames is always 0 (strange), so the division in the operation is dividing by 0 so we would have a velocity of (inf, inf, inf,) or (NaN, NaN, NaN) everytime.
The ball velocity is a useful data that we need to have for some strategies like the goal keeper.
For now the velocity filter is not in use because the current implementation is this one : https://github.com/NAMeC-team/rbc24-CRAbE/blob/main/crates/crabe_filter/src/filter/velocity_acceleration.rs (update_ball_vel_accel function) which is not working as the time difference between the 2 frames is always 0 (strange), so the division in the operation is dividing by 0 so we would have a velocity of (inf, inf, inf,) or (NaN, NaN, NaN) everytime.
Here was the implementation I came up with in rbc23 : https://github.com/NAMeC-team/CRAbE/blob/rbc-final-version/crates/crabe_filter/src/filter/velocity_acceleration.rs but this method is not reliable, 1 time out of 3 we get (0, 0, 0) instead of the real ball velocity (maybe cause we did not received any new packet from the vision so the ball position is the same as before).
@Wanchai290 suggested that there might be a way to retrieve it from the gc packets.