Skip to content

Commit 534c3cc

Browse files
committed
Fix dummy behavior ball approach with side offset
1 parent 8acf67c commit 534c3cc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

bitbots_behavior/bitbots_blackboard/bitbots_blackboard/capsules/pathfinding_capsule.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ def get_ball_goal(self, target: BallGoalType, distance: float, side_offset: floa
182182

183183
elif BallGoalType.CLOSE == target:
184184
ball_u, ball_v = self._blackboard.world_model.get_ball_position_uv()
185-
angle = math.atan2(ball_v, ball_u)
185+
ball_v_from_kick_foot = ball_v + side_offset
186+
angle = math.atan2(ball_v_from_kick_foot, ball_u)
186187
goal_u = ball_u - math.cos(angle) * distance
187188
goal_v = ball_v - math.sin(angle) * distance + side_offset
188189
ball_point = (goal_u, goal_v, angle, self._blackboard.world_model.base_footprint_frame)

0 commit comments

Comments
 (0)