mani_skill.envs.tasks.tabletop.plug_charger =========================================== .. py:module:: mani_skill.envs.tasks.tabletop.plug_charger Classes ------- .. autoapisummary:: mani_skill.envs.tasks.tabletop.plug_charger.PlugChargerEnv Module Contents --------------- .. py:class:: PlugChargerEnv(*args, robot_uids='panda_wristcam', robot_init_qpos_noise=0.02, **kwargs) Bases: :py:obj:`mani_skill.envs.sapien_env.BaseEnv` **Task Description:** The robot must pick up one of the misplaced shapes on the board/kit and insert it into the correct empty slot. **Randomizations:** - The charger position is randomized on the XY plane on top of the table. The rotation is also randomized - The receptacle position is randomized on the XY plane and the rotation is also randomized. Note that the human render camera has its pose fixed relative to the receptacle. **Success Conditions:** - The charger is inserted into the receptacle .. py:method:: _build_charger(peg_size, base_size, gap) .. py:method:: _build_receptacle(peg_size, receptacle_size, gap) .. py:method:: _compute_distance() .. py:method:: _get_obs_extra(info) Get task-relevant extra observations. Usually defined on a task by task basis .. 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_agent(options) loads the agent/controllable articulations into the environment. The default function provides a convenient way to setup the agent/robot by a robot_uid (stored in self.robot_uids) without requiring the user to have to write the robot building and controller code themselves. For more advanced use-cases you can override this function to have more control over the agent/robot building process. :param options: The options for the environment. :type options: dict :param initial_agent_poses: The initial poses of the agent/robot. Providing these poses and ensuring they are picked such that they do not collide with objects if spawned there is highly recommended to ensure more stable simulation (the agent pose can be changed later during episode initialization). :type initial_agent_poses: Optional[Union[sapien.Pose, Pose]] :param build_separate: Whether to build the agent/robot separately. If True, the agent/robot will be built separately for each parallel environment and then merged together to be accessible under one view/object. This is useful for randomizing physical and visual properties of the agent/robot which is only permitted for articulations built separately in each environment. :type build_separate: bool .. 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:: 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:: SUPPORTED_REWARD_MODES :value: ['none', 'sparse'] .. py:attribute:: SUPPORTED_ROBOTS :value: ['panda_wristcam'] 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:attribute:: _base_size :value: [0.02, 0.015, 0.012] .. py:attribute:: _clearance :value: 0.0005 .. 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:property:: _default_sim_config .. py:attribute:: _peg_gap :value: 0.007 .. py:attribute:: _peg_size :value: [0.008, 0.00075, 0.0032] .. py:attribute:: _receptacle_size :value: [0.01, 0.05, 0.05] .. py:attribute:: _sample_video_link :value: 'https://github.com/haosulab/ManiSkill/raw/main/figures/environment_demos/PlugCharger-v1_rt.mp4' a link to a sample video of the task. This is mostly used for automatic documentation generation .. py:attribute:: agent :type: Union[mani_skill.agents.robots.PandaWristCam] .. py:property:: charger_base_pose .. py:attribute:: robot_init_qpos_noise :value: 0.02