mani_skill.envs.tasks.tabletop.push_t#

Classes#

PushTEnv

Task Description:

WhiteTableSceneBuilder

A simple scene builder that adds a table to the scene such that the height of the table is at 0, and

Module Contents#

class mani_skill.envs.tasks.tabletop.push_t.PushTEnv(*args, robot_uids='panda_stick', robot_init_qpos_noise=0.02, **kwargs)[source]#

Bases: mani_skill.envs.sapien_env.BaseEnv

Task Description: A simulated version of the real-world push-T task from Diffusion Policy: https://diffusion-policy.cs.columbia.edu/

In this task, the robot needs to: 1. Precisely push the T-shaped block into the target region, and 2. Move the end-effector to the end-zone which terminates the episode. [2 Not required for PushT-easy-v1]

Randomizations: - 3D T block initial position on table [-1,1] x [-1,2] + T Goal initial position - 3D T block initial z rotation [0,2pi]

Success Conditions: - The T block covers 90% of the 2D goal T’s area

_get_obs_extra(info)[source]#

Get task-relevant extra observations. Usually defined on a task by task basis

Parameters:

info (dict) –

_initialize_episode(env_idx, options)[source]#

Initialize the episode, e.g., poses of actors and articulations, as well as task relevant data like randomizing goal positions

Parameters:
  • env_idx (torch.Tensor) –

  • options (dict) –

_load_agent(options)[source]#

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.

Parameters:
  • options (dict) – The options for the environment.

  • initial_agent_poses (Optional[Union[sapien.Pose, Pose]]) – 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).

  • build_separate (bool) – 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.

_load_scene(options)[source]#

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

Parameters:

options (dict) –

compute_dense_reward(obs, action, info)[source]#

Compute the dense reward.

Parameters:
  • obs (Any) – The observation data. By default the observation data will be in its most raw form, a dictionary (no flattening, wrappers etc.)

  • action (torch.Tensor) – The most recent action.

  • info (dict) – The info dictionary.

compute_normalized_dense_reward(obs, action, info)[source]#

Compute the normalized dense reward.

Parameters:
  • obs (Any) – The observation data. By default the observation data will be in its most raw form, a dictionary (no flattening, wrappers etc.)

  • action (torch.Tensor) – The most recent action.

  • info (dict) – The info dictionary.

evaluate()[source]#

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

pseudo_render_intersection()[source]#

‘pseudo render’ algo for calculating the intersection made custom ‘psuedo renderer’ to compute intersection area all computation in parallel on cuda, zero explicit loops views blocks in 2d in the goal tee frame to see overlap

quat_to_z_euler(quats)[source]#
quat_to_zrot(quats)[source]#
SUPPORTED_ROBOTS = ['panda_stick'][source]#

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

T_dynamic_friction = 3[source]#
T_mass = 0.8[source]#
T_static_friction = 3[source]#
property _default_human_render_camera_configs[source]#

Add default cameras for rendering when using render_mode=’rgb_array’. These can be overriden by the user at env creation time

property _default_sensor_configs[source]#

Add default (non-agent) sensors to the environment by returning sensor configurations. These can be overriden by the user at env creation time

property _default_sim_config[source]#

a link to a sample video of the task. This is mostly used for automatic documentation generation

agent: mani_skill.agents.robots.PandaStick[source]#
ee_starting_pos2D[source]#
ee_starting_pos3D[source]#
goal_offset[source]#
goal_z_rot[source]#
intersection_thresh = 0.9[source]#
robot_init_qpos_noise = 0.02[source]#
tee_spawnbox_xlength = 0.2[source]#
tee_spawnbox_xoffset = -0.1[source]#
tee_spawnbox_ylength = 0.3[source]#
tee_spawnbox_yoffset = -0.1[source]#
class mani_skill.envs.tasks.tabletop.push_t.WhiteTableSceneBuilder(env, robot_init_qpos_noise=0.02)[source]#

Bases: mani_skill.utils.scene_builder.table.TableSceneBuilder

A simple scene builder that adds a table to the scene such that the height of the table is at 0, and gives reasonable initial poses for robots.

build()[source]#

Should create actor/articulation builders and only build objects into the scene without initializing pose, qpos, velocities etc.

initialize(env_idx)[source]#

Should initialize the scene, which can include e.g. setting the pose of all objects, changing the qpos/pose of articulations/robots etc.

Parameters:

env_idx (torch.Tensor) –