robocup-software icon indicating copy to clipboard operation
robocup-software copied to clipboard

Remove has_ball role requirement

Open JNeiger opened this issue 6 years ago • 1 comments

The current has_ball role requirement requires one robot to have a ball in it's mouth otherwise it fails.

Reasons for the removal:

  • has_ball is not being used currently and, as far as I can tell, hasn't been used since we switched to python.
  • Due to the noise of the sensor and bounces when dribbling, it's entirely possible that we have control of the ball, but the sensor doesn't trip for a single frame causing a failure in the role assignment

JNeiger avatar May 06 '19 19:05 JNeiger

If we want a role requirement where we want to prefer the robot controlling the ball, it can easily be done through a more robust version of this. I'll post it here since I already wrote it out. At the current moment, I can only see this being used in capture and most of it can be done through the existing framework.

  • It's a lot of "work" to change which robot has control over the ball, it's not as simple as moving to another position. In my mind, the robot with the ball should never change roles to allow another robot come capture the ball
  • It's very likely in the current state that if two coordinated_pass's are chained together, the role assignment will try to take the robot that received the first pass to also receive the second pass.
  • I don't think increasing the robot change cost is reasonable because this produces unwanted side effects for all the other robots in the formation. Those are perfectly ok to leave at a low change cost

I have a couple ideas for this weight. You can do an inverted cylinder such that the immediate area around the ball (2*robot_radius or something) has a 0 cost while the rest of the area has a large non-zero cost. If that trigger when the ball has a large velocity away from a robot during a pass, you can throw a similarity cost where you compare the velocities of the ball and robot through a dot product or something.

JNeiger avatar May 06 '19 19:05 JNeiger