mani_skill.utils.building.actors.common#

Common utilities for adding primitive prebuilt shapes to a scene

Attributes#

Functions#

_build_by_type(builder, name, body_type[, scene_idxs, ...])

build_box(scene, half_sizes, color, name[, body_type, ...])

build_colorful_cube(scene, half_size, color, name[, ...])

build_cube(scene, half_size, color, name[, body_type, ...])

build_cylinder(scene, radius, half_length, color, name)

build_fourcolor_peg(scene, length, width, name[, ...])

A peg with four sections and four different colors. Useful for visualizing every possible rotation without any symmetries

build_red_white_target(scene, radius, thickness, name)

build_sphere(scene, radius, color, name[, body_type, ...])

build_twocolor_peg(scene, length, width, color_1, ...)

get_actor_builder(scene, id[, add_collision, add_visual])

Returns an ActorBuilder given an ID specifying which dataset/source and then the ID of the asset.

Module Contents#

mani_skill.utils.building.actors.common._build_by_type(builder, name, body_type, scene_idxs=None, initial_pose=None)[source]#
Parameters:
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:
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:
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:
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:
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:
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:
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:
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:
mani_skill.utils.building.actors.common.get_actor_builder(scene, id, add_collision=True, add_visual=True)[source]#

Returns an ActorBuilder given 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:

mani_skill.utils.building.actor_builder.ActorBuilder

mani_skill.utils.building.actors.common.BLUE_COLOR[source]#
mani_skill.utils.building.actors.common.GREEN_COLOR[source]#
mani_skill.utils.building.actors.common.RED_COLOR[source]#