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

Method _get_site_pos

metaworld/sawyer_xyz_env.py:363–372  ·  view source on GitHub ↗

Gets the position of a given site. Args: site_name: The name of the site to get the position of. Returns: Flat, 3 element array indicating site's location.

(self, site_name: str)

Source from the content-addressed store, hash-verified

361 self.set_state(qpos, qvel)
362
363 def _get_site_pos(self, site_name: str) -> npt.NDArray[np.float64]:
364 """Gets the position of a given site.
365
366 Args:
367 site_name: The name of the site to get the position of.
368
369 Returns:
370 Flat, 3 element array indicating site's location.
371 """
372 return self.data.site(site_name).xpos.copy()
373
374 def _set_pos_site(self, name: str, pos: npt.NDArray[Any]) -> None:
375 """Sets the position of a given site.

Callers 15

reset_modelMethod · 0.80
compute_rewardMethod · 0.80
compute_rewardMethod · 0.80
_get_pos_objectsMethod · 0.80
reset_modelMethod · 0.80
compute_rewardMethod · 0.80
_get_pos_objectsMethod · 0.80
_get_obs_dictMethod · 0.80
reset_modelMethod · 0.80
compute_rewardMethod · 0.80
compute_rewardMethod · 0.80
_get_pos_objectsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected