Frame stacks `_get_curr_obs_combined_no_goal()` and concatenates the goal position to form a single flat observation. Returns: The flat observation array (39 elements)
(self)
| 511 | return np.hstack((pos_hand, gripper_distance_apart, obs_obj_padded)) |
| 512 | |
| 513 | def _get_obs(self) -> npt.NDArray[np.float64]: |
| 514 | """Frame stacks `_get_curr_obs_combined_no_goal()` and concatenates the goal position to form a single flat observation. |
| 515 | |
| 516 | Returns: |
| 517 | The flat observation array (39 elements) |
| 518 | """ |
| 519 | # do frame stacking |
| 520 | pos_goal = self._get_pos_goal() |
| 521 | if self._partially_observable: |
| 522 | pos_goal = np.zeros_like(pos_goal) |
| 523 | curr_obs = self._get_curr_obs_combined_no_goal() |
| 524 | # do frame stacking |
| 525 | obs = np.hstack((curr_obs, self._prev_obs, pos_goal)) |
| 526 | self._prev_obs = curr_obs |
| 527 | return obs |
| 528 | |
| 529 | def _get_obs_dict(self) -> ObservationDict: |
| 530 | obs = self._get_obs() |
no test coverage detected