Skip to content

Commit 21ba4cb

Browse files
IasonTheodorouMatthijsBurgh
authored andcommitted
update knowledge to correctly be able to plan after the NavToCabinet state
1 parent d7af624 commit 21ba4cb

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

challenge_storing_groceries/src/challenge_storing_groceries/storing_groceries.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ def setup_statemachine(robot):
2525
skip_door = rospy.get_param("~skip_door", False)
2626
skip_inspect = rospy.get_param("~skip inspect", False)
2727
shelf_des = ds.EntityByIdDesignator(robot, uuid=challenge_knowledge.shelf)
28+
shelf_room_des = ds.EntityByIdDesignator(robot, challenge_knowledge.shelf_room, name="shelf_room_designator")
2829
table_des = ds.EntityByIdDesignator(robot, uuid=challenge_knowledge.table)
2930
objects_des = ds.VariableDesignator(resolve_type=[ClassificationResult])
30-
room_des = ds.EntityByIdDesignator(robot, challenge_knowledge.room, name="room_designator")
31+
table_room_des = ds.EntityByIdDesignator(robot, challenge_knowledge.table_room, name="table_room_designator")
3132

3233
with state_machine:
3334

@@ -62,7 +63,7 @@ def setup_statemachine(robot):
6263
smach.StateMachine.add("NAV_TO_START",
6364
states.navigation.NavigateToSymbolic(robot,
6465
{shelf_des: "in_front_of"},
65-
shelf_des, room=room_des),
66+
shelf_des, room=shelf_room_des),
6667
transitions={'arrived': 'SKIP_INSPECT',
6768
'unreachable': 'SKIP_INSPECT',
6869
'goal_not_defined': 'SKIP_INSPECT'})
@@ -73,7 +74,7 @@ def setup_statemachine(robot):
7374
'false': 'INSPECT_SHELVES'})
7475

7576
smach.StateMachine.add("INSPECT_SHELVES",
76-
InspectAreas(robot, shelf_des, objects_des, room_des, knowledge=challenge_knowledge,
77+
InspectAreas(robot, shelf_des, objects_des, shelf_room_des, knowledge=challenge_knowledge,
7778
navigation_area='in_front_of'),
7879
transitions={'done': 'RESET_ARM',
7980
'failed': 'Failed'})
@@ -90,7 +91,7 @@ def reset_arm(userdata=None):
9091

9192
# store items
9293
smach.StateMachine.add("STORE_GROCERIES",
93-
StoreItems(robot, table_des, shelf_des, objects_des, challenge_knowledge, room=room_des),
94+
StoreItems(robot, table_des, shelf_des, objects_des, challenge_knowledge, room=table_room_des),
9495
transitions={'succeeded': 'AT_END',
9596
'preempted': 'Aborted',
9697
'failed': 'Failed'}

robocup_knowledge/src/robocup_knowledge/environments/impuls/challenge_storing_groceries.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@
99

1010
# Detection
1111
shelf = "closet"
12+
shelf_room = common.get_room(shelf)
1213
default_area = "shelf4"
1314
cabinet_inspect_area = "shelf2"
1415
inspect_area = "in_front_of"
1516
object_shelves = ["shelf3", "shelf4", "shelf5"] # TODO unused variable?
1617
object_types = [obj["name"] for obj in common.objects] # TODO unused variable?
18+
place_areas = ["shelf2", "shelf3"]
1719

1820
# Grasping
1921
table = "dinner_table"
20-
room = common.get_room(table)
22+
table_room = common.get_room(table)
23+

0 commit comments

Comments
 (0)