mani_skill.utils.building.actors.common#
Common utilities for adding primitive prebuilt shapes to a scene
Attributes#
Functions#
|
|
|
|
|
|
|
|
|
|
|
A peg with four sections and four different colors. Useful for visualizing every possible rotation without any symmetries |
|
|
|
|
|
|
|
Returns an |
Module Contents#
- mani_skill.utils.building.actors.common._build_by_type(builder, name, body_type, scene_idxs=None, initial_pose=None)[source]#
- Parameters:
builder (mani_skill.utils.building.actor_builder.ActorBuilder) –
scene_idxs (Optional[mani_skill.utils.structs.types.Array]) –
initial_pose (Optional[Union[mani_skill.utils.structs.pose.Pose, sapien.Pose]]) –
- mani_skill.utils.building.actors.common.build_box(scene, half_sizes, color, name, body_type='dynamic', add_collision=True, scene_idxs=None, initial_pose=None)[source]#
- Parameters:
scene (mani_skill.envs.scene.ManiSkillScene) –
name (str) –
body_type (str) –
add_collision (bool) –
scene_idxs (Optional[mani_skill.utils.structs.types.Array]) –
initial_pose (Optional[Union[mani_skill.utils.structs.pose.Pose, sapien.Pose]]) –
- mani_skill.utils.building.actors.common.build_colorful_cube(scene, half_size, color, name, body_type='dynamic', add_collision=True, scene_idxs=None, initial_pose=None)[source]#
- Parameters:
scene (mani_skill.envs.scene.ManiSkillScene) –
half_size (float) –
name (str) –
body_type (str) –
add_collision (bool) –
scene_idxs (Optional[mani_skill.utils.structs.types.Array]) –
initial_pose (Optional[Union[mani_skill.utils.structs.pose.Pose, sapien.Pose]]) –
- mani_skill.utils.building.actors.common.build_cube(scene, half_size, color, name, body_type='dynamic', add_collision=True, scene_idxs=None, initial_pose=None)[source]#
- Parameters:
scene (mani_skill.envs.scene.ManiSkillScene) –
half_size (float) –
name (str) –
body_type (str) –
add_collision (bool) –
scene_idxs (Optional[mani_skill.utils.structs.types.Array]) –
initial_pose (Optional[Union[mani_skill.utils.structs.pose.Pose, sapien.Pose]]) –
- mani_skill.utils.building.actors.common.build_cylinder(scene, radius, half_length, color, name, body_type='dynamic', add_collision=True, scene_idxs=None, initial_pose=None)[source]#
- Parameters:
scene (mani_skill.envs.scene.ManiSkillScene) –
radius (float) –
half_length (float) –
name (str) –
body_type (str) –
add_collision (bool) –
scene_idxs (Optional[mani_skill.utils.structs.types.Array]) –
initial_pose (Optional[Union[mani_skill.utils.structs.pose.Pose, sapien.Pose]]) –
- mani_skill.utils.building.actors.common.build_fourcolor_peg(scene, length, width, name, color_1=RED_COLOR, color_2=BLUE_COLOR, color_3=GREEN_COLOR, color_4=[1, 1, 1, 1], body_type='dynamic', add_collision=True, scene_idxs=None, initial_pose=None)[source]#
A peg with four sections and four different colors. Useful for visualizing every possible rotation without any symmetries
- Parameters:
scene (mani_skill.envs.scene.ManiSkillScene) –
name (str) –
add_collision (bool) –
scene_idxs (Optional[mani_skill.utils.structs.types.Array]) –
initial_pose (Optional[Union[mani_skill.utils.structs.pose.Pose, sapien.Pose]]) –
- mani_skill.utils.building.actors.common.build_red_white_target(scene, radius, thickness, name, body_type='dynamic', add_collision=True, scene_idxs=None, initial_pose=None)[source]#
- Parameters:
scene (mani_skill.envs.scene.ManiSkillScene) –
radius (float) –
thickness (float) –
name (str) –
body_type (str) –
add_collision (bool) –
scene_idxs (Optional[mani_skill.utils.structs.types.Array]) –
initial_pose (Optional[Union[mani_skill.utils.structs.pose.Pose, sapien.Pose]]) –
- mani_skill.utils.building.actors.common.build_sphere(scene, radius, color, name, body_type='dynamic', add_collision=True, scene_idxs=None, initial_pose=None)[source]#
- Parameters:
scene (mani_skill.envs.scene.ManiSkillScene) –
radius (float) –
name (str) –
body_type (str) –
add_collision (bool) –
scene_idxs (Optional[mani_skill.utils.structs.types.Array]) –
initial_pose (Optional[Union[mani_skill.utils.structs.pose.Pose, sapien.Pose]]) –
- mani_skill.utils.building.actors.common.build_twocolor_peg(scene, length, width, color_1, color_2, name, body_type='dynamic', add_collision=True, scene_idxs=None, initial_pose=None)[source]#
- Parameters:
scene (mani_skill.envs.scene.ManiSkillScene) –
name (str) –
add_collision (bool) –
scene_idxs (Optional[mani_skill.utils.structs.types.Array]) –
initial_pose (Optional[Union[mani_skill.utils.structs.pose.Pose, sapien.Pose]]) –
- mani_skill.utils.building.actors.common.get_actor_builder(scene, id, add_collision=True, add_visual=True)[source]#
Returns an
ActorBuildergiven an ID specifying which dataset/source and then the ID of the asset.Currently these IDs are hardcoded for a few datasets. We may add more actor datasets in the future for easy loading by users
- Parameters:
scene (mani_skill.envs.scene.ManiSkillScene) – The ManiSkillScene. If building a custom task this is generally just self.scene
id (str) – The unique ID identifying the dataset and the ID of the actor in that dataset to build. The format should be “<dataset_id>:<actor_id_in_dataset>”
add_collision (bool) – Whether to include the collision shapes/meshes
add_visual (bool) – Whether to include visual shapes/meshes
- Return type: