robopal.envs.base module¶
- class robopal.envs.base.MujocoEnv(robot: BaseRobot | str, *, control_freq: int = 200, render_mode: str = 'human', is_show_camera_in_cv: bool = False, is_render_camera_offscreen=False, camera_in_render: str = 'frontview', camera_in_window='free')[源代码]¶
基类:
objectThis environment is the base class.
- 参数:
robot(str) -- Load xml file from xml_path to build the mujoco model
render_mode(str) -- Choose if you use the renderer to render the scene or not
camera_in_render(str) -- Choose the camera
control_freq(int) -- Upper-layer control frequency
Note that high frequency will cause high time-lag :param is_show_camera_in_cv(bool): Use camera or not
- get_body_jacp(name)[源代码]¶
Query the position jacobian of a mujoco body using a name string.
- 参数:
name -- The name of a mujoco body
- 返回:
The jacp value of the mujoco body
- get_body_jacr(name)[源代码]¶
Query the rotation jacobian of a mujoco body using a name string.
- 参数:
name -- The name of a mujoco body
- 返回:
The jacr value of the mujoco body
- get_body_pos(name: str)[源代码]¶
Get body position from body name.
- 参数:
name -- body name
- 返回:
body position
- get_body_quat(name: str)[源代码]¶
Get body quaternion from body name.
- 参数:
name -- body name
- 返回:
body quaternion
- get_body_rotm(name: str)[源代码]¶
Get body rotation matrix from body name.
- 参数:
name -- body name
- 返回:
body rotation matrix
- get_body_xvelp(name: str) ndarray[源代码]¶
Get body velocity from body name.
- 参数:
name -- body name
- 返回:
translational velocity of the body
- get_body_xvelr(name: str) ndarray[源代码]¶
Get body rotational velocity from body name.
- 参数:
name -- body name
- 返回:
rotational velocity of the body
- get_camera_pos(name: str)[源代码]¶
Get camera position from camera name.
- 参数:
name -- camera name
- 返回:
camera position
- get_geom_id(name: str | List[str])[源代码]¶
Get geometry id from its name.
- 参数:
name -- geometry name
- 返回:
geometry id
- get_site_jacp(name)[源代码]¶
Query the position jacobian of a mujoco site using a name string.
- 参数:
name -- The name of a mujoco site
- 返回:
The jacp value of the mujoco site
- get_site_jacr(name)[源代码]¶
Query the rotation jacobian of a mujoco site using a name string.
- 参数:
name -- The name of a mujoco site
- 返回:
The jacr value of the mujoco site
- get_site_pos(name: str)[源代码]¶
Get body position from site name.
- 参数:
name -- site name
- 返回:
site position
- get_site_quat(name: str)[源代码]¶
Get site quaternion from site name.
- 参数:
name -- site name
- 返回:
site quaternion
- get_site_rotm(name: str)[源代码]¶
Get site rotation matrix from site name.
- 参数:
name -- site name
- 返回:
site rotation matrix
- get_site_xvelp(name: str) ndarray[源代码]¶
Get site velocity from site name.
- 参数:
name -- site name
- 返回:
translational velocity of the site
- get_site_xvelr(name: str) ndarray[源代码]¶
Get site rotational velocity from site name.
- 参数:
name -- site name
- 返回:
rotational velocity of the site
- is_contact(geom1: str | List[str], geom2: str | List[str], verbose=False) bool[源代码]¶
Check if two geom or geom list is in contact.
- 参数:
geom1 -- geom name/list
geom2 -- geom name/list
- 返回:
True/False
- metadata = {'render_modes': [None, 'human', 'rgb_array', 'depth', 'unity']}¶
- property name¶