From 6e25b726e2ebf83de78cec0a6b14cb05f45b0dba Mon Sep 17 00:00:00 2001 From: Ashay Athalye Date: Mon, 16 Sep 2024 14:57:46 -0400 Subject: [PATCH] Add last skill execution to _TruncatedSpotObservation. --- predicators/envs/spot_env.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/predicators/envs/spot_env.py b/predicators/envs/spot_env.py index b702638bf..05e6eaf16 100644 --- a/predicators/envs/spot_env.py +++ b/predicators/envs/spot_env.py @@ -109,6 +109,8 @@ class _TruncatedSpotObservation: executed_skill: Optional[_Option] = None # Object detections per camera in self.rgbd_images. object_detections_per_camera: Dict[str, List[Tuple[ObjectDetectionID, SegmentedBoundingBox]]] + # Last skill + executed_skill: Optional[_Option] = None class _PartialPerceptionState(State): @@ -2630,7 +2632,8 @@ def _actively_construct_env_task(self) -> EnvironmentTask: set(), self._spot_object, gripper_open_percentage, - object_detections_per_camera + object_detections_per_camera, + None ) goal_description = self._generate_goal_description() task = EnvironmentTask(obs, goal_description) @@ -2701,7 +2704,8 @@ def step(self, action: Action) -> Observation: set(), self._spot_object, gripper_open_percentage, - object_detections_per_camera + object_detections_per_camera, + action.get_option() ) return obs