RoBorregos / robocup-soccer-open-2024

RoboCup Soccer Open
2 stars 0 forks source link

Issue #34 score goal and #33 has ball #36

Closed JocelynVelarde closed 2 months ago

JocelynVelarde commented 2 months ago

Changes made

  1. Implemented has_ball assumption using the last time the ball was seen and a sampling time
  2. Separated chunks of conditionals for future refactoring
  3. Implemented logic as follows:

If ball was found, the ball distance is less than 20 cm, the last time the ball was seen is less than 20 ms and the ball angle from the frame of the robot is between -20 and 20 degrees → has_ball = true

  1. Implemented goal scoring as follows:

If has_ball = true, the goal was found and the distance towards the goal is less than 30 cm → shoot When false → move closer towards goal

Note that constants from logic implementation and PIDs can be improved

Issue ticket number and link

Refers to issue #34 and #33