-
Notifications
You must be signed in to change notification settings - Fork 122
Description
Description of the task
While working on #3512, I found that the world.ball.current_state.global_velocity (from the protobuf message) given to the Validation class' get_validation_geometry function is not accurate at times. I could only find one instance of this happening in this simulated test. And for SOME REASON (I HAVE NO IDEA WHY), if the ball's y position is initialized not at the center line it works, but this doesn't cause problems for the other tests ??
The video below shows the following:
- shows the two simulated tests, one is the original, one is slightly offset of the center
- shows first simulated test which shows ball with stopped visualization even while moving
- shows second simulated test which shows ball with arrow while moving like expected (NOTE: the behavior for the robot is much different for some reason as well, even with the very small offset)
- shows the logs (velocity given to the validation) showing inaccurate velocity
2025-11-14_12-32-12.mp4
Original Test with Inaccurate Velocity
(0, 0)
(1.93829, 1.88294e-16) <-- expected initial velocity, basically (2,0)
(0, -3.55737e-10) <-- basically (0,0) for some reason, while still moving
(0, -2.96448e-10)
(0, 0)
(0, -2.34786e-10)
(0, 1.02753e-09)
(0, 9.97498e-10)
(0, 8.91239e-10)
(0, 1.26169e-09)
(0, 1.1725e-09)
Test offset by 0.0001 with Accurate Velocity
(0, 0)
(1.93829, 3.10263e-10) <-- expected initial velocity, basically (2,0)
(1.86099, 1.84828e-08) <-- expected velocity, slows down a bit, y still basically 0
(1.85923, 4.2071e-09)
(1.83947, 2.00759e-10)
(1.80034, 3.94286e-09)
(1.7464, -6.86165e-10)
(1.72434, -1.89448e-09)
(1.6903, 9.10091e-10)
(1.63897, -1.94379e-09)
(1.61428, -2.13767e-09)
I'm worried this might affect other parts of the code like if the protobuf messages being sent are inaccurate in other instances it could affect how our robots make decisions. I'll try to look into the causes for this issue more but I would appreciate some help as well
NOTE: again this was on a feature branch, but the behavior of inaccurate velocity in the message being sent is still there if you just add a print statement to check the velocity given to the validation class
Acceptance criteria
- Cause of this bug is identified
- Bug is fixed (the specific test case works, the validation is given the expected velocity)