Skip to content

Commit 01a9945

Browse files
author
cl03
committed
Fix float message variables and increase turn duration
1 parent 089be79 commit 01a9945

File tree

2 files changed

+5
-5
lines changed
  • bitbots_behavior/bitbots_body_behavior/bitbots_body_behavior/behavior_dsd

2 files changed

+5
-5
lines changed

bitbots_behavior/bitbots_body_behavior/bitbots_body_behavior/behavior_dsd/actions/go_to.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def perform(self, reevaluate=False):
6565

6666
pose_msg.pose.position.x = self.point[0]
6767
pose_msg.pose.position.y = self.point[1]
68-
pose_msg.pose.position.z = 0
68+
pose_msg.pose.position.z = 0.0
6969
pose_msg.pose.orientation = quat_from_yaw(math.radians(self.point[2]))
7070

7171
self.blackboard.pathfinding.publish(pose_msg)
@@ -80,8 +80,8 @@ def __init__(self, blackboard, dsd, parameters):
8080
super().__init__(blackboard, dsd, parameters)
8181
point = float(parameters.get("x", 0)), float(parameters.get("y", 0)), float(parameters.get("t", 0))
8282
self.point = (
83-
point[0] * self.blackboard.world_model.field_length,
84-
point[1] * self.blackboard.world_model.field_width,
83+
point[0] * self.blackboard.world_model.field_length / 2,
84+
point[1] * self.blackboard.world_model.field_width / 2,
8585
self.point[2],
8686
)
8787

@@ -112,4 +112,4 @@ class GoToCenterpoint(GoToAbsolutePosition):
112112
def __init__(self, blackboard, dsd, parameters):
113113
"""Go to the center of the field and look towards the enemy goal"""
114114
super().__init__(blackboard, dsd, parameters)
115-
self.point = 0, 0, 0
115+
self.point = 0.0, 0.0, 0.0

bitbots_behavior/bitbots_body_behavior/bitbots_body_behavior/behavior_dsd/main.dsd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ $DoOnce
44
DONE --> $ReachedAndAlignedToPathPlanningGoalPosition + threshold:0.5 + latch:true
55
NO --> @LookAtFieldFeatures, @GoToAbsolutePositionFieldFraction + x:0.5
66
YES --> $DoOnce
7-
NOT_DONE --> @Turn + duration:5
7+
NOT_DONE --> @Turn + duration:15
88
DONE --> $DoOnce
99
NOT_DONE --> @GoToAbsolutePositionFieldFraction + y:1.0 + t:-90 + blocking:false
1010
DONE --> $ReachedAndAlignedToPathPlanningGoalPosition + threshold:0.2 + latch:true

0 commit comments

Comments
 (0)