MCPcopy
hub / github.com/Farama-Foundation/Metaworld / _get_pos_goal

Method _get_pos_goal

metaworld/sawyer_xyz_env.py:465–473  ·  view source on GitHub ↗

Retrieves goal position from mujoco properties or instance vars. Returns: Flat array (3 elements) representing the goal position

(self)

Source from the content-addressed store, hash-verified

463 raise NotImplementedError
464
465 def _get_pos_goal(self) -> npt.NDArray[Any]:
466 """Retrieves goal position from mujoco properties or instance vars.
467
468 Returns:
469 Flat array (3 elements) representing the goal position
470 """
471 assert isinstance(self._target_pos, np.ndarray)
472 assert self._target_pos.ndim == 1
473 return self._target_pos
474
475 def _get_curr_obs_combined_no_goal(self) -> npt.NDArray[np.float64]:
476 """Combines the end effector's {pos, closed amount} and the object(s)' {pos, quat} into a single flat observation.

Callers 5

_get_obsMethod · 0.95
_get_obs_dictMethod · 0.95
step_envFunction · 0.80
step_envFunction · 0.80
step_envFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected