Skip to content
This repository was archived by the owner on Jan 23, 2024. It is now read-only.

Commit 730a959

Browse files
authored
Merge pull request #310 from bit-bots/feature/no_kick_usage
Change kick to dribble
2 parents 708c0a8 + ccc930b commit 730a959

File tree

3 files changed

+27
-25
lines changed

3 files changed

+27
-25
lines changed

bitbots_blackboard/bitbots_blackboard/capsules/costmap_capsule.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,10 @@ def robot_callback(self, msg: RobotArray):
8080
# Smooth obstacle map
8181
obstacle_map = gaussian_filter(obstacle_map, self.obstacle_costmap_smoothing_sigma)
8282
# Get pass offsets
83-
self.pass_map = self.get_pass_regions()
83+
# NOTE: as we currently do not use the kick, passing is not possible
84+
# self.pass_map = self.get_pass_regions()
8485
# Merge costmaps
85-
self.costmap = self.base_costmap + obstacle_map - self.pass_map
86+
self.costmap = self.base_costmap + obstacle_map # - self.pass_map # NOTE: see above
8687
# Publish debug costmap
8788
self.publish_costmap()
8889

bitbots_body_behavior/bitbots_body_behavior/main.dsd

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#SearchBall
2-
@ChangeAction + action:searching, @LookAtFieldFeatures, @WalkInPlace + duration:4, @TurnAround
2+
@ChangeAction + action:searching, @LookAtFieldFeatures, @WalkInPlace + duration:3, @TurnAround
33

44
#DoNothing
55
@ChangeAction + action:waiting, @LookForward, @Stand
@@ -13,51 +13,52 @@
1313
#PerformKick
1414
@ChangeAction + action:kicking, @LookAtFront, @Stand + duration:1.0, @LookForward + r:false, @KickBallDynamic, @LookAtFieldFeatures + r:false, @WalkInPlace + duration:1 + r:false
1515

16-
#KickBallWithAvoidance
16+
#Dribble
17+
@ChangeAction + action:going_to_ball, @CancelPathplanning, @LookAtFront, @DribbleForward
18+
19+
#DribbleWithAvoidance
1720
$AvoidBall
1821
NO --> $BallClose + distance:%body.ball_reapproach_dist + angle:%body.ball_reapproach_angle
1922
YES --> $BallKickArea
20-
NEAR --> #PerformKick
23+
NEAR --> #Dribble
2124
FAR --> @ChangeAction + action:going_to_ball, @LookAtFront, @GoToBall + target:map_goal
2225
NO --> @ChangeAction + action:going_to_ball + r:false, @LookAtFieldFeatures + r:false, @AvoidBallActive + r:false, @GoToBall + target:map_goal + blocking:false + distance:%body.ball_far_approach_dist
2326
YES --> $ReachedPathPlanningGoalPosition + thres:%body.ball_far_approach_position_thresh
2427
YES --> @AvoidBallInactive
2528
NO --> @ChangeAction + action:going_to_ball, @LookAtFieldFeatures, @GoToBall + target:map_goal + distance:%body.ball_far_approach_dist
2629

27-
#GoAndKickBallMapGoal
28-
$DribbleOrKick
29-
DRIBBLE --> @ChangeAction + action:going_to_ball, @CancelPathplanning, @LookAtFront, @DribbleForward
30-
KICK --> $BallKickArea
31-
NEAR --> $AlignedToGoal
32-
YES --> #PerformKick
33-
NO --> #KickBallWithAvoidance
34-
ELSE --> #KickBallWithAvoidance
30+
#GoAndDribbleMapGoal
31+
$BallKickArea
32+
NEAR --> $AlignedToGoal
33+
YES --> #Dribble
34+
NO --> #DribbleWithAvoidance
35+
ELSE --> #DribbleWithAvoidance
3536

36-
#GoAndKickBallDetectionGoal
37+
#GoAndDribbleDetectionGoal
3738
$AlignedToPathPlanningGoal
3839
YES --> $BallKickArea
39-
NEAR --> @ChangeAction + action:kicking + r:false, @Stand + duration:0.1 + r:false, @LookForward + r:false, @KickBallDynamic + r:false
40+
NEAR --> #Dribble
4041
FAR --> @ChangeAction + action:going_to_ball, @GoToBall + target:detection_goal
4142
NO --> @ChangeAction + action:going_to_ball, @GoToBall + target:detection_goal
4243

43-
#GoAndKickBallAway
44+
#GoAndDribbleAway
4445
$BallKickArea
45-
NEAR --> @ChangeAction + action:kicking + r:false, @Stand + duration:0.1 + r:false, @LookForward + r:false, @KickBallDynamic + r:false
46+
NEAR --> #Dribble
4647
FAR --> @ChangeAction + action:going_to_ball, @GoToBall + target:close
4748

4849
#NoLocalizationPlayerBehavior
4950
$BallSeen
5051
YES --> $BallClose
5152
YES --> $GoalSeen
52-
YES --> #GoAndKickBallDetectionGoal
53-
NO --> #GoAndKickBallAway
53+
YES --> #GoAndDribbleDetectionGoal
54+
NO --> #GoAndDribbleAway
5455
NO --> @ChangeAction + action:going_to_ball, @GoToBall + target:close
5556
NO --> #SearchBall
5657

5758
#NoLocalizationGoalieBehavior
5859
$BallSeen
5960
YES --> $BallClose
60-
YES --> #GoAndKickBallAway
61+
YES --> #GoAndDribbleAway
6162
NO --> @ChangeAction + action:waiting, @LookAtBall, @Stand
6263
NO --> #SearchBall
6364

@@ -81,21 +82,21 @@ $ClosestToBall + use_time_to_ball:true
8182
YES --> $BallKickArea // TODO: refactor dribble or kick subtree
8283
NEAR --> $AlignedToGoal
8384
YES --> #PerformKick
84-
NO --> #KickBallWithAvoidance
85-
ELSE --> #KickBallWithAvoidance
85+
NO --> #DribbleWithAvoidance
86+
ELSE --> #DribbleWithAvoidance
8687

8788
#StrikerRole
8889
$GoalieHandlingBall
8990
YES --> @ChangeAction + action:positioning, @AvoidBallActive, @LookAtFieldFeatures, @GoToPassAcceptPosition //don't go too far back
90-
NO --> #GoAndKickBallMapGoal
91+
NO --> #GoAndDribbleMapGoal
9192

9293
#DefensePositioning
9394
@LookAtFieldFeatures, @ChangeAction + action:positioning, @GoToDefensePosition
9495

9596
#DefenderRole
9697
$BallInOwnPercent + p:40
9798
YES --> $ClosestToBall
98-
YES --> #GoAndKickBallMapGoal
99+
YES --> #GoAndDribbleMapGoal
99100
NO --> #DefensePositioning
100101
NO --> #DefensePositioning
101102

bitbots_body_behavior/config/body_behavior.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
# When the ball has not been seen for `ball_lost_time` seconds,
5959
# it is considered lost and will be searched
60-
ball_lost_time: 8.0
60+
ball_lost_time: 3.0
6161

6262
# The orientation threshold defining which range (in Degrees) is acceptable as aligned to the goal (in each direction)
6363
goal_alignment_orientation_threshold: 20.0

0 commit comments

Comments
 (0)