Skip to content

Commit

Permalink
feat: make tasks & skills use masked cropped image (LASR-at-Home#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-barker authored Jun 21, 2024
1 parent e458425 commit 5026ebf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions skills/src/lasr_skills/describe_people.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ def __init__(self):
)
smach.StateMachine.add(
"GET_IMAGE",
GetCroppedImage(object_name="person", crop_method="closest"),
GetCroppedImage(
object_name="person", crop_method="closest", use_mask=True
),
transitions={
"succeeded": "CONVERT_IMAGE",
"failed": "SAY_GET_IMAGE_AGAIN",
Expand All @@ -57,7 +59,9 @@ def __init__(self):
)
smach.StateMachine.add(
"GET_IMAGE_AGAIN",
GetCroppedImage(object_name="person", crop_method="closest"),
GetCroppedImage(
object_name="person", crop_method="closest", use_mask=True
),
transitions={"succeeded": "CONVERT_IMAGE", "failed": "SAY_CONTINUE"},
)

Expand Down
4 changes: 3 additions & 1 deletion skills/src/lasr_skills/detect_gesture.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ def __init__(self, gesture_to_detect: Optional[str] = None):
with self:
smach.StateMachine.add(
"GET_IMAGE",
GetCroppedImage("person", "centered", rgb_topic="/usb_cam/image_raw"),
GetCroppedImage(
"person", "centered", use_mask=True, rgb_topic="/usb_cam/image_raw"
),
transitions={"succeeded": "BODY_PIX_DETECTION", "failed": "failed"},
)

Expand Down
4 changes: 3 additions & 1 deletion tasks/carry_my_luggage/src/carry_my_luggage/state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def __init__(self):

smach.StateMachine.add(
"GET_IMAGE",
GetCroppedImage(object_name="person", crop_method="closest"),
GetCroppedImage(
object_name="person", crop_method="closest", use_mask=True
),
transitions={
"succeeded": "DETECT_POINTING_DIRECTION",
"failed": "failed",
Expand Down

0 comments on commit 5026ebf

Please sign in to comment.