Skip to main content
Ctrl+K
ManiSkill 3.0.0b22 documentation - Home ManiSkill 3.0.0b22 documentation - Home
  • User Guide
  • Tasks
  • Robots
  • Contributing
  • Roadmap
    • API Reference
    • Changelog
  • GitHub
  • Website
  • User Guide
  • Tasks
  • Robots
  • Contributing
  • Roadmap
  • API Reference
  • Changelog
  • GitHub
  • Website

Section Navigation

  • mani_skill
    • mani_skill.agents
      • mani_skill.agents.base_agent
      • mani_skill.agents.base_real_agent
      • mani_skill.agents.controllers
        • mani_skill.agents.controllers.base_controller
        • mani_skill.agents.controllers.passive_controller
        • mani_skill.agents.controllers.pd_base_vel
        • mani_skill.agents.controllers.pd_ee_pose
        • mani_skill.agents.controllers.pd_joint_pos
        • mani_skill.agents.controllers.pd_joint_pos_vel
        • mani_skill.agents.controllers.pd_joint_vel
        • mani_skill.agents.controllers.utils
      • mani_skill.agents.multi_agent
      • mani_skill.agents.registration
      • mani_skill.agents.utils
    • mani_skill.envs
      • mani_skill.envs.minimal_template
      • mani_skill.envs.sapien_env
      • mani_skill.envs.scene
      • mani_skill.envs.scenes
        • mani_skill.envs.scenes.base_env
      • mani_skill.envs.sim2real_env
      • mani_skill.envs.tasks
        • mani_skill.envs.tasks.control
        • mani_skill.envs.tasks.dexterity
        • mani_skill.envs.tasks.digital_twins
        • mani_skill.envs.tasks.drawing
        • mani_skill.envs.tasks.empty_env
        • mani_skill.envs.tasks.fmb
        • mani_skill.envs.tasks.humanoid
        • mani_skill.envs.tasks.mobile_manipulation
        • mani_skill.envs.tasks.quadruped
        • mani_skill.envs.tasks.rotate_cube
        • mani_skill.envs.tasks.tabletop
      • mani_skill.envs.template
      • mani_skill.envs.utils
        • mani_skill.envs.utils.observations
        • mani_skill.envs.utils.randomization
        • mani_skill.envs.utils.rewards
        • mani_skill.envs.utils.system
    • mani_skill.sensors
      • mani_skill.sensors.base_sensor
      • mani_skill.sensors.camera
    • mani_skill.trajectory
      • mani_skill.trajectory.convert_to_lerobot
      • mani_skill.trajectory.dataset
      • mani_skill.trajectory.merge_trajectory
      • mani_skill.trajectory.replay_trajectory
      • mani_skill.trajectory.utils
        • mani_skill.trajectory.utils.actions
    • mani_skill.utils
      • mani_skill.utils.assets
        • mani_skill.utils.assets.data
      • mani_skill.utils.building
        • mani_skill.utils.building._mjcf_loader
        • mani_skill.utils.building.actor_builder
        • mani_skill.utils.building.actors
        • mani_skill.utils.building.articulation_builder
        • mani_skill.utils.building.articulations
        • mani_skill.utils.building.ground
        • mani_skill.utils.building.mjcf_loader
        • mani_skill.utils.building.urdf_loader
      • mani_skill.utils.common
      • mani_skill.utils.download_asset
      • mani_skill.utils.download_demo
      • mani_skill.utils.geometry
        • mani_skill.utils.geometry.bounding_cylinder
        • mani_skill.utils.geometry.geometry
        • mani_skill.utils.geometry.rotation_conversions
        • mani_skill.utils.geometry.trimesh_utils
      • mani_skill.utils.gym_utils
      • mani_skill.utils.io_utils
      • mani_skill.utils.logging_utils
      • mani_skill.utils.registration
      • mani_skill.utils.sapien_utils
      • mani_skill.utils.structs
        • mani_skill.utils.structs.actor
        • mani_skill.utils.structs.articulation
        • mani_skill.utils.structs.articulation_joint
        • mani_skill.utils.structs.base
        • mani_skill.utils.structs.decorators
        • mani_skill.utils.structs.drive
        • mani_skill.utils.structs.link
        • mani_skill.utils.structs.pose
        • mani_skill.utils.structs.render_camera
        • mani_skill.utils.structs.types
      • mani_skill.utils.tree
      • mani_skill.utils.visualization
        • mani_skill.utils.visualization.jupyter_utils
        • mani_skill.utils.visualization.misc
        • mani_skill.utils.visualization.renderer
      • mani_skill.utils.wrappers
        • mani_skill.utils.wrappers.action_repeat
        • mani_skill.utils.wrappers.cached_reset
        • mani_skill.utils.wrappers.flatten
        • mani_skill.utils.wrappers.frame_stack
        • mani_skill.utils.wrappers.gymnasium
        • mani_skill.utils.wrappers.record
        • mani_skill.utils.wrappers.visual_encoders
    • mani_skill.vector
      • mani_skill.vector.wrappers
        • mani_skill.vector.wrappers.gymnasium
        • mani_skill.vector.wrappers.sb3
  • API Reference
  • mani_skill
  • mani_skill.utils
  • mani_skill.utils.structs
  • mani_skill.utils.structs.link

mani_skill.utils.structs.link#

Classes#

Link

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

__hash__()[source]#
__repr__()[source]#
__str__()[source]#
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_articulation()[source]#
get_index()[source]#
get_joint()[source]#
Return type:

mani_skill.utils.structs.articulation_joint.ArticulationJoint

get_name()[source]#
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]

classmethod merge(links, name=None)[source]#
Parameters:
  • links (list[Link]) –

  • name (str) –

set_collision_group(group, value)[source]#
Parameters:

group (int) –

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

property is_root: torch.Tensor[source]#
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

merged: bool = False[source]#

whether this link is result of Link.merge or not

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

name: str = None[source]#
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:

mani_skill.utils.structs.pose.Pose

property render_shapes[source]#

Returns each managed link objects render shape list (a list of lists)

previous

mani_skill.utils.structs.drive

next

mani_skill.utils.structs.pose

On this page
  • Classes
  • Module Contents
    • Link
      • Link.__hash__()
      • Link.__repr__()
      • Link.__str__()
      • Link.bbox()
      • Link.create()
      • Link.generate_mesh()
      • Link.get_articulation()
      • Link.get_index()
      • Link.get_joint()
      • Link.get_name()
      • Link.get_visual_meshes()
      • Link.merge()
      • Link.set_collision_group()
      • Link.set_collision_group_bit()
      • Link.set_pose()
      • Link.articulation
      • Link.index
      • Link.is_root
      • Link.joint
      • Link.merged
      • Link.meshes
      • Link.name
      • Link.per_scene_id
      • Link.pose
      • Link.render_shapes
Edit on GitHub

This Page

  • Show Source

© Copyright 2024, ManiSkill Contributors.

Created using Sphinx 6.2.1.

Built with the PyData Sphinx Theme 0.16.1.