Skip to content

Commit 3bca940

Browse files
committed
tested sequence punch
1 parent 76e42c7 commit 3bca940

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

src/sauvc_missions/configs/missions/flares.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ states:
1515
bbox_topic: /stingray/topics/front_camera/bbox_array
1616
first_clockwise: true
1717
found_threshold: 1
18-
distance_threshold: 0.0
18+
distance_threshold: 0.5
1919
lost_threshold: 30
20-
avoid_distance_threshold: 2.5
21-
avoid_horizontal_threshold: 0.7
22-
max_yaw: 180
23-
yaw_step: 15.0
20+
avoid_distance_threshold: 1.5
21+
avoid_horizontal_threshold: 1.0
22+
max_yaw: 360
23+
yaw_step: 30.0
2424
surge: 30.0
2525
avoid_sway: 0.0
2626
depth: 1.5

src/sauvc_missions/sauvc_missions/action.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def stop(self):
2929

3030
def get_bbox_name(self, flare_id: str):
3131
if flare_id == "R":
32-
return "small_red_flare"
32+
return "red_flare"
3333
elif flare_id == "B":
3434
return "blue_flare"
3535
elif flare_id == "Y":
@@ -41,14 +41,14 @@ def get_avoid_bbox_array(self, flare_id: str):
4141
if flare_id == "R":
4242
return ["blue_flare", "yellow_flare"]
4343
elif flare_id == "B":
44-
return ["small_red_flare", "yellow_flare"]
44+
return ["red_flare", "yellow_flare"]
4545
elif flare_id == "Y":
46-
return ["small_red_flare", "blue_flare"]
46+
return ["red_flare", "blue_flare"]
4747
else:
4848
return []
4949

5050
async def execute(self,
51-
sequence: list[str] = [],
51+
sequence: list[str] = ["R", "B", "Y"],
5252
bbox_topic: str = "",
5353
distance_threshold: float = 0.0,
5454
avoid_distance_threshold: float = 0.0,
@@ -106,9 +106,14 @@ async def execute(self,
106106
f"Timeout while waiting for {self.twist_action_client._action_name} action server")
107107
return False
108108

109+
get_logger('action').info(
110+
f"sequence: {self.sequence}")
111+
109112
for flare in self.sequence:
110113
search_goal = BboxSearchTwistAction.Goal()
111114
search_goal.bbox_name = self.get_bbox_name(flare_id=flare)
115+
get_logger('action').info(
116+
f"Target bbox flare: {search_goal.bbox_name}")
112117
search_goal.bbox_topic = self.bbox_topic
113118
search_goal.first_clockwise = self.first_clockwise
114119
search_goal.found_threshold = int(self.found_threshold)

0 commit comments

Comments
 (0)