@@ -3180,6 +3180,76 @@ def _detection_id_to_obj(self) -> Dict[ObjectDetectionID, Object]:
31803180 def _generate_goal_description (self ) -> GoalDescription :
31813181 return "open the drawer"
31823182
3183+ def _get_dry_task (self , train_or_test : str ,
3184+ task_idx : int ) -> EnvironmentTask :
3185+ raise NotImplementedError ("Dry task generation not implemented." )
3186+
3187+ class LISSpotCollectEnv (SpotRearrangementEnv ):
3188+ """An extremely basic environment where a block needs to be picked up and
3189+ is specifically used for testing in the LIS Spot room.
3190+
3191+ Very simple and mostly just for testing.
3192+ """
3193+
3194+ def __init__ (self , use_gui : bool = True ) -> None :
3195+ super ().__init__ (use_gui )
3196+
3197+ op_to_name = {o .name : o for o in _create_operators ()}
3198+ op_names_to_keep = {
3199+ "MoveToReachObject" ,
3200+ "MoveToHandViewObject" ,
3201+ "PickObjectToDrag" ,
3202+ "DragToOpenObject" ,
3203+ "DragToCloseObject" ,
3204+ "PickObjectFromTop" ,
3205+ "PlaceObjectOnTop" ,
3206+ "DropObjectInside"
3207+ }
3208+ self ._strips_operators = {op_to_name [o ] for o in op_names_to_keep }
3209+
3210+ @classmethod
3211+ def get_name (cls ) -> str :
3212+ return "lis_spot_collect_misplaced_items_env"
3213+
3214+ @property
3215+ def _detection_id_to_obj (self ) -> Dict [ObjectDetectionID , Object ]:
3216+
3217+ detection_id_to_obj : Dict [ObjectDetectionID , Object ] = {}
3218+
3219+ blue_block = Object ("blue_block" , _movable_object_type )
3220+ blue_block_detection = LanguageObjectDetectionID (
3221+ "blue block/blue-ish block/blue-green block" )
3222+ detection_id_to_obj [blue_block_detection ] = blue_block
3223+
3224+ green_cup = Object ("yellow_cup" , _movable_object_type )
3225+ green_cup_detection = LanguageObjectDetectionID (
3226+ "yellow cup/yellow cylinder" )
3227+ detection_id_to_obj [green_cup_detection ] = green_cup
3228+
3229+ toy_plane = Object ("toy_plane" , _movable_object_type )
3230+ toy_plane_detection = LanguageObjectDetectionID (
3231+ "toy plane" )
3232+ detection_id_to_obj [toy_plane_detection ] = toy_plane
3233+
3234+ cardboard_box = Object ("cardboard_box" , _container_type )
3235+ cardboard_box_detection = LanguageObjectDetectionID (
3236+ "cardboard box/brown box" )
3237+ detection_id_to_obj [cardboard_box_detection ] = cardboard_box
3238+
3239+ green_handle = Object ("green_handle" , _movable_object_type )
3240+ green_handle_detection = LanguageObjectDetectionID (
3241+ "green duct tape/green handle/green object" )
3242+ detection_id_to_obj [green_handle_detection ] = green_handle
3243+
3244+ for obj , pose in get_known_immovable_objects ().items ():
3245+ detection_id = KnownStaticObjectDetectionID (obj .name , pose )
3246+ detection_id_to_obj [detection_id ] = obj
3247+
3248+ return detection_id_to_obj
3249+
3250+ def _generate_goal_description (self ) -> GoalDescription :
3251+ return "collect misplaced items"
3252+
31833253 def _get_dry_task (self , train_or_test : str ,
31843254 task_idx : int ) -> EnvironmentTask :
31853255 raise NotImplementedError ("Dry task generation not implemented." )
0 commit comments