diff --git a/predicators/envs/spot_env.py b/predicators/envs/spot_env.py index 5c3f35309..915865142 100644 --- a/predicators/envs/spot_env.py +++ b/predicators/envs/spot_env.py @@ -1571,7 +1571,7 @@ def _get_sweeping_surface_for_container(container: Object, _Inside = VLMPredicate( "Inside", [_movable_object_type, _container_type], prompt= - "This typically describes an object (obj1, first arg) inside a container (obj2, second arg) (so it's overlapping), and it's in conflict with the object being on a surface. This is obj1 inside obj2, so obj1 should be smaller than obj2." + "This typically describes when an object (obj1:type, first arg) is inside another object/container (obj2:type, second arg) (so it's overlapping), and it's in conflict with the object being on a surface. Inside(obj1:type, obj2:type) means obj1 is inside obj2, so obj1 should be smaller than obj2." ) _FakeInside = VLMPredicate( _Inside.name, @@ -3399,7 +3399,7 @@ def _detection_id_to_obj(self) -> Dict[ObjectDetectionID, Object]: # "green bowl/greenish bowl") # TODO test green_bowl_detection = LanguageObjectDetectionID( - "cardboard box/brown box") + "plastic bin/white box") detection_id_to_obj[green_bowl_detection] = green_bowl # # TODO temp test new object sets @@ -3435,7 +3435,7 @@ def _get_dry_task(self, train_or_test: str, class LISSpotBlockInBoxEnv(SpotRearrangementEnv): - """An environment where a red block needs to be moved into a cardboard box.""" + """An environment where a red block needs to be moved into a plastic bin.""" def __init__(self, use_gui: bool = True) -> None: super().__init__(use_gui) @@ -3480,9 +3480,9 @@ def _detection_id_to_obj(self) -> Dict[ObjectDetectionID, Object]: # cup_detection = LanguageObjectDetectionID("green apple/greenish apple") detection_id_to_obj[cup_detection] = cup - cardboard_box = Object("cardboard_box", _container_type) - cardboard_box_detection = LanguageObjectDetectionID("cardboard box/brown box") - detection_id_to_obj[cardboard_box_detection] = cardboard_box + plastic_bin = Object("plastic_bin", _container_type) + plastic_bin_detection = LanguageObjectDetectionID("plastic bin/white box") + detection_id_to_obj[plastic_bin_detection] = plastic_bin for obj, pose in get_known_immovable_objects().items(): detection_id = KnownStaticObjectDetectionID(obj.name, pose) @@ -3491,10 +3491,10 @@ def _detection_id_to_obj(self) -> Dict[ObjectDetectionID, Object]: return detection_id_to_obj def _generate_goal_description(self) -> GoalDescription: - # return "put the red block into the cardboard box on floor" + # return "put the red block into the plastic bin on floor" # return "view the object from top" # return "know container not as empty" - # return "put the cup into the cardboard box on floor" + # return "put the cup into the plastic bin on floor" return "place empty cup into the box" def _get_dry_task(self, train_or_test: str, @@ -3503,7 +3503,7 @@ def _get_dry_task(self, train_or_test: str, class LISSpotTableCupInBoxEnv(SpotRearrangementEnv): - """An environment where a cup on a table needs to be moved into a cardboard box.""" + """An environment where a cup on a table needs to be moved into a plastic bin.""" def __init__(self, use_gui: bool = True) -> None: super().__init__(use_gui) @@ -3540,9 +3540,9 @@ def _detection_id_to_obj(self) -> Dict[ObjectDetectionID, Object]: cup_detection = LanguageObjectDetectionID("orange cup/orange cylinder/orange-ish mug") detection_id_to_obj[cup_detection] = cup - cardboard_box = Object("cardboard_box", _container_type) - cardboard_box_detection = LanguageObjectDetectionID("cardboard box/brown box") - detection_id_to_obj[cardboard_box_detection] = cardboard_box + plastic_bin = Object("plastic_bin", _container_type) + plastic_bin_detection = LanguageObjectDetectionID("plastic bin/white box") + detection_id_to_obj[plastic_bin_detection] = plastic_bin for obj, pose in get_known_immovable_objects().items(): detection_id = KnownStaticObjectDetectionID(obj.name, pose) @@ -3551,7 +3551,7 @@ def _detection_id_to_obj(self) -> Dict[ObjectDetectionID, Object]: return detection_id_to_obj def _generate_goal_description(self) -> GoalDescription: - return "put the cup into the cardboard box on floor" + return "put the cup into the plastic bin on floor" def _get_dry_task(self, train_or_test: str, task_idx: int) -> EnvironmentTask: @@ -3612,7 +3612,7 @@ def _get_dry_task(self, train_or_test: str, class LISSpotEmptyCupBoxEnv(SpotRearrangementEnv): """An environment designated for testing belief space predicates. - The goal is to move a single empty cup on the floor to a cardboard box + The goal is to move a single empty cup on the floor to a plastic bin """ def __init__(self, use_gui: bool = True) -> None: @@ -3638,10 +3638,10 @@ def _detection_id_to_obj(self) -> Dict[ObjectDetectionID, Object]: detection_id_to_obj: Dict[ObjectDetectionID, Object] = {} - cardboard_box = Object("cardboard_box", _container_type) - cardboard_box_detection = LanguageObjectDetectionID( - "cardboard box/box") - detection_id_to_obj[cardboard_box_detection] = cardboard_box + plastic_bin = Object("plastic_bin", _container_type) + plastic_bin_detection = LanguageObjectDetectionID( + "plastic bin/box") + detection_id_to_obj[plastic_bin_detection] = plastic_bin # Case 1: Cup facing up with no lid # To try more cases below diff --git a/predicators/perception/spot_perceiver.py b/predicators/perception/spot_perceiver.py index 4bd8280b6..a9e5ffc70 100644 --- a/predicators/perception/spot_perceiver.py +++ b/predicators/perception/spot_perceiver.py @@ -507,9 +507,9 @@ def _create_goal(self, state: State, return { GroundAtom(Inside, [block, bin]), } - if goal_description == "put the red block into the cardboard box on floor": + if goal_description == "put the red block into the plastic bin on floor": block = Object("red_block", _movable_object_type) - box = Object("cardboard_box", _container_type) + box = Object("plastic_bin", _container_type) Inside = pred_name_to_pred["Inside"] return { GroundAtom(Inside, [block, box]), @@ -558,14 +558,14 @@ def _create_goal(self, state: State, } if goal_description == "place empty cup into the box": cup = Object("cup", _container_type) - cardboard_box = Object("cardboard_box", _container_type) + plastic_bin = Object("plastic_bin", _container_type) ContainingWaterKnown = pred_name_to_pred["ContainingWaterKnown"] NotContainingWater = pred_name_to_pred["NotContainingWater"] Inside = pred_name_to_pred["Inside"] return { - GroundAtom(ContainingWaterKnown, [cup]), - GroundAtom(NotContainingWater, [cup]), - GroundAtom(Inside, [cup, cardboard_box]), + #GroundAtom(ContainingWaterKnown, [cup]), + #GroundAtom(NotContainingWater, [cup]), + GroundAtom(Inside, [cup, plastic_bin]), } if goal_description == "know container as empty": cup = Object("cup", _container_type) @@ -575,12 +575,12 @@ def _create_goal(self, state: State, GroundAtom(ContainingWaterKnown, [cup]), GroundAtom(NotContainingWater, [cup]), } - if goal_description == "put the cup into the cardboard box on floor": + if goal_description == "put the cup into the plastic bin on floor": cup = Object("cup", _container_type) - cardboard_box = Object("cardboard_box", _container_type) + plastic_bin = Object("plastic_bin", _container_type) Inside = pred_name_to_pred["Inside"] return { - GroundAtom(Inside, [cup, cardboard_box]), + GroundAtom(Inside, [cup, plastic_bin]), } if goal_description == "setup sweeping": robot = Object("robot", _robot_type) diff --git a/predicators/spot_utils/graph_nav_maps/b45-621/metadata.yaml b/predicators/spot_utils/graph_nav_maps/b45-621/metadata.yaml index 90daf7f7f..b8e879bd1 100644 --- a/predicators/spot_utils/graph_nav_maps/b45-621/metadata.yaml +++ b/predicators/spot_utils/graph_nav_maps/b45-621/metadata.yaml @@ -60,7 +60,7 @@ static-object-features: length: 1.2 width: 0.8 flat_top_surface: 1 - cardboard_box: # adopted from floor8-v2 + plastic_bin: # adopted from floor8-v2 shape: 1 height: 0.5 # TODO check width: 0.4