mani_skill.utils.structs.link#
Classes#
Wrapper around physx.PhysxArticulationLinkComponent objects |
Module Contents#
- class mani_skill.utils.structs.link.Link[source]#
Bases:
mani_skill.utils.structs.base.PhysxRigidBodyComponentStruct[sapien.physx.PhysxArticulationLinkComponent]Wrapper around physx.PhysxArticulationLinkComponent objects
- bbox(filter)[source]#
- Parameters:
filter (Callable[[sapien.physx.PhysxArticulationLinkComponent, sapien.render.RenderShape], bool]) –
- Return type:
list[trimesh.primitives.Box]
- classmethod create(physx_links, scene, scene_idxs)[source]#
- Parameters:
physx_links (list[sapien.physx.PhysxArticulationLinkComponent]) –
scene (mani_skill.envs.scene.ManiSkillScene) –
scene_idxs (torch.Tensor) –
- generate_mesh(filter, mesh_name)[source]#
Generates mesh objects (trimesh.Trimesh) for each managed physx link given a filter and saves them to self.meshes[mesh_name] in addition to returning them here.
- Parameters:
filter (Callable[[sapien.physx.PhysxArticulationLinkComponent, sapien.render.RenderShape], bool]) –
mesh_name (str) –
- get_visual_meshes(to_world_frame=True, first_only=False)[source]#
Returns the visual mesh of each managed link object. Note results of this are not cached or optimized at the moment so this function can be slow if called too often
- Parameters:
to_world_frame (bool) –
first_only (bool) –
- Return type:
list[trimesh.Trimesh]
- set_collision_group_bit(group, bit_idx, bit)[source]#
Set’s a specific collision group bit for all collision shapes in all parallel actors :param group: the collision group to set the bit for. Typically you only need to use group 2 to disable collision checks between links to enable faster simulation. :type group: int :param bit_idx: the bit index to set :type bit_idx: int :param bit: the bit value to set. Must be 1/0 or True/False. :type bit: int | bool
- Parameters:
group (int) –
bit_idx (int) –
bit (Union[int, bool]) –
- set_pose(arg1)[source]#
- Parameters:
arg1 (Union[mani_skill.utils.structs.pose.Pose, sapien.Pose]) –
- Return type:
None
- articulation: mani_skill.utils.structs.Articulation = None[source]#
the articulation that this link is a part of. If this is None, most likely this link object is a view/merged link object in which case there is no one articulation that can be referenced easily
- property index: torch.Tensor[source]#
The indexes of the managed link objects in their respective articulations. NOTE that these do not correspond with position in the qpos and qvel of articulations. For that index use index_q
- Return type:
torch.Tensor
- joint: mani_skill.utils.structs.articulation_joint.ArticulationJoint = None[source]#
the joint of which this link is a child of. If this is a view/merged link then this joint is also a view/merged joint
- meshes: dict[str, list[trimesh.Trimesh]][source]#
map from user-defined mesh groups (e.g. “handle” meshes for cabinets) to a list of trimesh.Trimesh objects corresponding to each physx link object managed here
- property per_scene_id: torch.Tensor[source]#
Returns a int32 torch tensor of the link level segmentation ID for each managed link object.
- Return type:
torch.Tensor
- property pose: mani_skill.utils.structs.pose.Pose[source]#
- Return type: