Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simulate_dribbling=false results in the ball being entirely inside the robot when at the edge of the field #11

Open
MathewMacDougall opened this issue Jan 31, 2025 · 1 comment
Assignees

Comments

@MathewMacDougall
Copy link

Tested on commit: a6c523ddb2bc3867aca56387d6054ebf74bb54dc
Simulator command: simulator-cli --realism RC2021 -g 2020B

When simulate_dribbling=false and a robot is dribbling near the edge of the field, the ball is placed significantly further inside the robot body than when the robot is near the center of the field. This results in the reported SslDetectionBall positions being inaccurate while dribbling. This behavior was not observed when simulate_dribbling=true

See the attached video for an example:

  • All visualizations are the raw ssl detection frames. No filtering / heuristics are applied.
  • The robot initially starts with the dribbler off, and turns it on after a few seconds
  • As the robot moves towards the center of the field, the reported ball position becomes more correct.
ball_inside_dribbler_example.mp4

Since the RC2021 config does not apply object_position_offset or camera_position_error, I suspect the issue is with the transforms and constraints applied to the ball during perfect dribbling

@owlkward
Copy link

owlkward commented Feb 6, 2025

Yeah, the constraints were actually wrong, which apparently happened when we tried to fix the issue that if two robots had the constraint one of them tended to tip over, but the "fix" is just plain wrong. Probably because the author misunderstood the arguments of the bullet hinge constraint, which I completely understand, as the bullet documentation is garbage.
It caused the ball to basically float in front of the robot, i.e. its z-coordinate was higher than it should be and with the projection we apply this caused it to look like the ball was further away from the camera.
I already have a fix, but I first need to look at a test case that now fails and maybe depended on the broken behavior and I need to look into this before I can push the change.
Shouldn't take more than a week hopefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants