mani_skill.envs.tasks.rotate_cube ================================= .. py:module:: mani_skill.envs.tasks.rotate_cube Classes ------- .. autoapisummary:: mani_skill.envs.tasks.rotate_cube.RotateCubeEnv mani_skill.envs.tasks.rotate_cube.RotateCubeEnvLevel0 mani_skill.envs.tasks.rotate_cube.RotateCubeEnvLevel1 mani_skill.envs.tasks.rotate_cube.RotateCubeEnvLevel2 mani_skill.envs.tasks.rotate_cube.RotateCubeEnvLevel3 mani_skill.envs.tasks.rotate_cube.RotateCubeEnvLevel4 Module Contents --------------- .. py:class:: RotateCubeEnv(*args, robot_uids='trifingerpro', robot_init_qpos_noise=0.02, difficulty_level = 4, **kwargs) Bases: :py:obj:`mani_skill.envs.sapien_env.BaseEnv` Modified from https://github.com/NVIDIA-Omniverse/IsaacGymEnvs/blob/main/isaacgymenvs/tasks/trifinger.py https://github.com/NVIDIA-Omniverse/IsaacGymEnvs/blob/main/isaacgymenvs/cfg/task/Trifinger.yaml .. py:method:: _get_obs_extra(info) Get task-relevant extra observations. Usually defined on a task by task basis .. py:method:: _initialize_actors(env_idx) .. py:method:: _initialize_agent(env_idx) .. py:method:: _initialize_episode(env_idx, options) Initialize the episode, e.g., poses of actors and articulations, as well as task relevant data like randomizing goal positions .. py:method:: _load_scene(options) Loads all objects like actors and articulations into the scene. Called by `self._reconfigure`. Given options argument is the same options dictionary passed to the self.reset function .. py:method:: _sample_object_goal_poses(env_idx, difficulty) Sample goal poses for the cube and sets them into the desired goal pose buffer. :param instances: A tensor constraining indices of environment instances to reset. :param difficulty: Difficulty level. The higher, the more difficult is the goal. Possible levels are: - 0: Random goal position on the table, no orientation. - 1: Random goal position on the table, including yaw orientation. - 2: Fixed goal position in the air with x,y = 0. No orientation. - 3: Random goal position in the air, no orientation. - 4: Random goal pose in the air, including orientation. .. py:method:: compute_dense_reward(obs, action, info) Compute the dense reward. :param obs: The observation data. By default the observation data will be in its most raw form, a dictionary (no flattening, wrappers etc.) :type obs: Any :param action: The most recent action. :type action: torch.Tensor :param info: The info dictionary. :type info: dict .. py:method:: compute_normalized_dense_reward(obs, action, info) Compute the normalized dense reward. :param obs: The observation data. By default the observation data will be in its most raw form, a dictionary (no flattening, wrappers etc.) :type obs: Any :param action: The most recent action. :type action: torch.Tensor :param info: The info dictionary. :type info: dict .. py:method:: evaluate() Evaluate whether the environment is currently in a success state by returning a dictionary with a "success" key or a failure state via a "fail" key This function may also return additional data that has been computed (e.g. is the robot grasping some object) that may be reused when generating observations and rewards. By default if not overriden this function returns an empty dictionary .. py:attribute:: ARENA_RADIUS :value: 0.195 .. py:attribute:: SUPPORTED_ROBOTS :value: ['trifingerpro'] Override this to enforce which robots or tuples of robots together are supported in the task. During env creation, setting robot_uids auto loads all desired robots into the scene, but not all tasks are designed to support some robot setups .. py:property:: _default_human_render_camera_configs Add default cameras for rendering when using render_mode='rgb_array'. These can be overriden by the user at env creation time .. py:property:: _default_sensor_configs Add default (non-agent) sensors to the environment by returning sensor configurations. These can be overriden by the user at env creation time .. py:attribute:: agent :type: mani_skill.agents.robots.TriFingerPro .. py:attribute:: cube_half_size :value: 0.02 .. py:attribute:: difficulty_level :value: 4 .. py:attribute:: goal_radius :value: 0.02 .. py:attribute:: max_com_distance_to_center .. py:attribute:: max_height :value: 0.1 .. py:attribute:: max_len :value: 0.065 .. py:attribute:: min_height :value: 0.0325 .. py:attribute:: radius_3d .. py:attribute:: robot_init_qpos_noise :value: 0.02 .. py:attribute:: sim_config the final sim config after merging user overrides with the environment default .. py:attribute:: size :value: 0.065 .. py:class:: RotateCubeEnvLevel0(*args, **kwargs) Bases: :py:obj:`RotateCubeEnv` Modified from https://github.com/NVIDIA-Omniverse/IsaacGymEnvs/blob/main/isaacgymenvs/tasks/trifinger.py https://github.com/NVIDIA-Omniverse/IsaacGymEnvs/blob/main/isaacgymenvs/cfg/task/Trifinger.yaml .. py:class:: RotateCubeEnvLevel1(*args, **kwargs) Bases: :py:obj:`RotateCubeEnv` Modified from https://github.com/NVIDIA-Omniverse/IsaacGymEnvs/blob/main/isaacgymenvs/tasks/trifinger.py https://github.com/NVIDIA-Omniverse/IsaacGymEnvs/blob/main/isaacgymenvs/cfg/task/Trifinger.yaml .. py:class:: RotateCubeEnvLevel2(*args, **kwargs) Bases: :py:obj:`RotateCubeEnv` Modified from https://github.com/NVIDIA-Omniverse/IsaacGymEnvs/blob/main/isaacgymenvs/tasks/trifinger.py https://github.com/NVIDIA-Omniverse/IsaacGymEnvs/blob/main/isaacgymenvs/cfg/task/Trifinger.yaml .. py:class:: RotateCubeEnvLevel3(*args, **kwargs) Bases: :py:obj:`RotateCubeEnv` Modified from https://github.com/NVIDIA-Omniverse/IsaacGymEnvs/blob/main/isaacgymenvs/tasks/trifinger.py https://github.com/NVIDIA-Omniverse/IsaacGymEnvs/blob/main/isaacgymenvs/cfg/task/Trifinger.yaml .. py:class:: RotateCubeEnvLevel4(*args, **kwargs) Bases: :py:obj:`RotateCubeEnv` Modified from https://github.com/NVIDIA-Omniverse/IsaacGymEnvs/blob/main/isaacgymenvs/tasks/trifinger.py https://github.com/NVIDIA-Omniverse/IsaacGymEnvs/blob/main/isaacgymenvs/cfg/task/Trifinger.yaml