RoboCup-SSL / grSim

RoboCup Small Size Robot Soccer Simulator
https://ssl.robocup.org/league-software/
Other
127 stars 130 forks source link

Ball collision with robot chassis is not being handled #154

Open FelipeMartins96 opened 3 years ago

FelipeMartins96 commented 3 years ago

Describe the bug Ball collision with robot chassis is not being handled

To Reproduce Steps to reproduce the behavior:

  1. Start grSim
  2. Move ball in robot direction, between wheels
  3. Observe the ball getting inside the robot

Expected behavior Ball should not get inside the robot

Screenshots image

Additional context The code creating a surface between the ball and robot chassis is currently commented on the code. https://github.com/RoboCup-SSL/grSim/blob/8d3b8c7f3a72a96972a67d6f6baf927e4d462a17/src/sslworld.cpp#L284 I tested uncommenting this line, the ball stopped getting inside the robot, but it stopped contacting properly with the kicker.

FelipeMartins96 commented 3 years ago

I've got some ideas to test, but I was wondering what this callback does https://github.com/RoboCup-SSL/grSim/blob/8d3b8c7f3a72a96972a67d6f6baf927e4d462a17/src/sslworld.cpp#L116-L133 It seems that the ball->tag value is only set to -1 on the simulation step, and never changed to another value, so as far as I can see this callback is never running