mani_skill.utils.building.actor_builder#

Classes#

ActorBuilder

ActorBuilder class to flexibly build actors in both CPU and GPU simulations.

Module Contents#

class mani_skill.utils.building.actor_builder.ActorBuilder[source]#

Bases: sapien.ActorBuilder

ActorBuilder class to flexibly build actors in both CPU and GPU simulations. This directly inherits the original flexible ActorBuilder from sapien and changes the build functions to support a batch of scenes and return a batch of Actors

add_plane_repeated_visual(pose=sapien.Pose(), half_size=[5, 5], mat=None, texture_repeat=[1, 1])[source]#

Procedurally generateds a repeated 2D texture. Works similarly to https://mujoco.readthedocs.io/en/stable/XMLreference.html#asset-material-texrepeat

currently this always adds a back face

Parameters:
  • texture_repeat (list[float]) – the number of times to repeat the texture in each direction.

  • pose (sapien.Pose)

  • half_size (list[float])

  • mat (sapien.render.RenderMaterial)

build(name)[source]#

Build the actor with the given name.

Different to the original SAPIEN API, a unique name is required here.

build_dynamic(name)[source]#
build_entity()[source]#

build the raw sapien entity. Modifies original SAPIEN function to accept new procedurally generated render components

build_kinematic(name)[source]#
build_physx_component(link_parent=None)[source]#
build_static(name)[source]#
set_allow_overlapping_plane_collisions(v)[source]#

Set whether or not to permit allowing overlapping plane collisions. In general if you are creating an Actor with a plane collision that is parallelized across multiple sub-scenes, you only need one of those collision shapes. If you add multiple, it will cause the simulation to slow down significantly. By default this is set to False

Parameters:

v (bool)

set_scene(scene)[source]#
Parameters:

scene (mani_skill.envs.scene.ManiSkillScene)

set_scene_idxs(scene_idxs=None)[source]#

Set a list of scene indices to build this object in. Cannot be used in conjunction with scene mask

Parameters:

scene_idxs (Optional[Union[list[int], Sequence[int], torch.Tensor, numpy.ndarray]])

_allow_overlapping_plane_collisions = False[source]#
_plane_collision_poses[source]#
_procedural_shapes = [][source]#

procedurally generated shapes to attach

initial_pose = None[source]#
scene: mani_skill.envs.scene.ManiSkillScene[source]#
scene_idxs = None[source]#