Skip to content

Commit d23b465

Browse files
authored
Decision moved to init
1 parent 5e9653a commit d23b465

File tree

1 file changed

+2
-4
lines changed
  • bitbots_behavior/bitbots_body_behavior/bitbots_body_behavior/behavior_dsd/actions

1 file changed

+2
-4
lines changed

bitbots_behavior/bitbots_body_behavior/bitbots_body_behavior/behavior_dsd/actions/go_to_ball.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@ def __init__(self, blackboard, dsd, parameters):
2525
self.distance = parameters.get("distance", self.blackboard.config["ball_approach_dist"])
2626
# Offset so we kick the ball with one foot instead of the center between the feet
2727
self.side_offset = parameters.get("side_offset", 0.00)
28-
29-
30-
31-
def perform(self, reevaluate=False):
3228
ball_position_y_relative = self.blackboard.world_model.get_ball_position_uv()[1]
3329
self.side_offset = math.copysign(self.side_offset, ball_position_y_relative)
30+
31+
def perform(self, reevaluate=False):
3432
pose_msg = self.blackboard.pathfinding.get_ball_goal(self.target, self.distance, self.side_offset)
3533
self.blackboard.pathfinding.publish(pose_msg)
3634

0 commit comments

Comments
 (0)