wrapper#
Subpackages#
Submodules#
sapien.wrapper.actor_builder module#
- class sapien.wrapper.actor_builder.ActorBuilder[source]#
Bases:
object
- add_box_collision(pose: Pose = Pose([0, 0, 0], [1, 0, 0, 0]), half_size: Tuple = (1, 1, 1), material: PhysxMaterial | None = None, density: float = 1000, patch_radius: float = 0, min_patch_radius: float = 0, is_trigger: bool = False)[source]#
- add_box_visual(pose: Pose = Pose([0, 0, 0], [1, 0, 0, 0]), half_size: Tuple = (1, 1, 1), material: RenderMaterial | None | Tuple = None, name: str = '')[source]#
- add_capsule_collision(pose: Pose = Pose([0, 0, 0], [1, 0, 0, 0]), radius: float = 1, half_length: float = 1, material: PhysxMaterial | None = None, density: float = 1000, patch_radius: float = 0, min_patch_radius: float = 0, is_trigger: bool = False)[source]#
- add_capsule_visual(pose: Pose = Pose([0, 0, 0], [1, 0, 0, 0]), radius: float = 1, half_length: float = 1, material: RenderMaterial | None | Tuple = None, name: str = '')[source]#
- add_convex_collision_from_file(filename, pose: Pose = Pose([0, 0, 0], [1, 0, 0, 0]), scale: Tuple = (1, 1, 1), material: PhysxMaterial | None = None, density: float = 1000, patch_radius: float = 0, min_patch_radius: float = 0, is_trigger: bool = False)[source]#
- add_cylinder_collision(pose: Pose = Pose([0, 0, 0], [1, 0, 0, 0]), radius: float = 1, half_length: float = 1, material: PhysxMaterial | None = None, density: float = 1000, patch_radius: float = 0, min_patch_radius: float = 0, is_trigger: bool = False)[source]#
- add_cylinder_visual(pose: Pose = Pose([0, 0, 0], [1, 0, 0, 0]), radius: float = 1, half_length: float = 1, material: RenderMaterial | None | Tuple = None, name: str = '')[source]#
- add_multiple_convex_collisions_from_file(filename, pose: Pose = Pose([0, 0, 0], [1, 0, 0, 0]), scale: Tuple = (1, 1, 1), material: PhysxMaterial | None = None, density: float = 1000, patch_radius: float = 0, min_patch_radius: float = 0, is_trigger: bool = False, decomposition: Literal['none', 'coacd'] = 'none', decomposition_params={})[source]#
- add_nonconvex_collision_from_file(filename: str, pose: Pose = Pose([0, 0, 0], [1, 0, 0, 0]), scale: Tuple = (1, 1, 1), material: PhysxMaterial | None = None, patch_radius: float = 0, min_patch_radius: float = 0, is_trigger: bool = False)[source]#
- add_plane_collision(pose: Pose = Pose([0, 0, 0], [1, 0, 0, 0]), material: PhysxMaterial | None = None, patch_radius: float = 0, min_patch_radius: float = 0, is_trigger: bool = False)[source]#
- add_plane_visual(pose: Pose = Pose([0, 0, 0], [1, 0, 0, 0]), scale: Tuple = (1, 1, 1), material: RenderMaterial | None | Tuple = None, name: str = '')[source]#
- add_sphere_collision(pose: Pose = Pose([0, 0, 0], [1, 0, 0, 0]), radius: float = 1, material: PhysxMaterial | None = None, density: float = 1000, patch_radius: float = 0, min_patch_radius: float = 0, is_trigger: bool = False)[source]#
- add_sphere_visual(pose: Pose = Pose([0, 0, 0], [1, 0, 0, 0]), radius: float = 1, material: RenderMaterial | None | Tuple = None, name: str = '')[source]#
- class sapien.wrapper.actor_builder.CollisionShapeRecord(type: Literal['convex_mesh', 'multiple_convex_meshes', 'nonconvex_mesh', 'plane', 'box', 'capsule', 'sphere', 'cylinder'], filename: str = '', scale: Tuple = (1, 1, 1), radius: float = 1, length: float = 1, material: sapien.pysapien.physx.PhysxMaterial | None = None, pose: sapien.pysapien.Pose = Pose([0, 0, 0], [1, 0, 0, 0]), density: float = 1000, patch_radius: float = 0, min_patch_radius: float = 0, is_trigger: bool = False, decomposition: str = 'none', decomposition_params: Dict[str, Any] | None = None)[source]#
Bases:
object
- decomposition: str = 'none'#
- decomposition_params: Dict[str, Any] | None = None#
- density: float = 1000#
- filename: str = ''#
- is_trigger: bool = False#
- length: float = 1#
- material: PhysxMaterial | None = None#
- min_patch_radius: float = 0#
- patch_radius: float = 0#
- radius: float = 1#
- scale: Tuple = (1, 1, 1)#
- type: Literal['convex_mesh', 'multiple_convex_meshes', 'nonconvex_mesh', 'plane', 'box', 'capsule', 'sphere', 'cylinder']#
- class sapien.wrapper.actor_builder.VisualShapeRecord(type: Literal['file', 'plane', 'box', 'capsule', 'sphere', 'cylinder'], filename: str = '', scale: tuple = (1, 1, 1), radius: float = 1, length: float = 1, material: sapien.pysapien.render.RenderMaterial | None = None, pose: sapien.pysapien.Pose = Pose([0, 0, 0], [1, 0, 0, 0]), name: str = '')[source]#
Bases:
object
- filename: str = ''#
- length: float = 1#
- material: RenderMaterial | None = None#
- name: str = ''#
- radius: float = 1#
- scale: tuple = (1, 1, 1)#
- type: Literal['file', 'plane', 'box', 'capsule', 'sphere', 'cylinder']#
sapien.wrapper.articulation_builder module#
- class sapien.wrapper.articulation_builder.ArticulationBuilder[source]#
Bases:
object
- build(fix_root_link=None, build_mimic_joints=True) PhysxArticulation [source]#
- create_link_builder(parent: LinkBuilder | None = None)[source]#
- class sapien.wrapper.articulation_builder.JointRecord(joint_type: str = 'undefined', limits: Tuple[float] = (-inf, inf), pose_in_parent: sapien.pysapien.Pose = Pose([0, 0, 0], [1, 0, 0, 0]), pose_in_child: sapien.pysapien.Pose = Pose([0, 0, 0], [1, 0, 0, 0]), friction: float = 0, damping: float = 0, name: str = '')[source]#
Bases:
object
- damping: float = 0#
- friction: float = 0#
- joint_type: str = 'undefined'#
- limits: Tuple[float] = (-inf, inf)#
- name: str = ''#
- class sapien.wrapper.articulation_builder.LinkBuilder(index: int, parent)[source]#
Bases:
ActorBuilder
sapien.wrapper.coacd module#
sapien.wrapper.engine module#
sapien.wrapper.pinocchio_model module#
sapien.wrapper.renderer module#
sapien.wrapper.scene module#
- class sapien.wrapper.scene.Scene(systems=None)[source]#
Bases:
Scene
- add_camera(name, width: int, height: int, fovy: float, near: float, far: float) RenderCameraComponent [source]#
- add_directional_light(direction, color, shadow=False, position=[0, 0, 0], shadow_scale=10.0, shadow_near=-10.0, shadow_far=10.0, shadow_map_size=2048)[source]#
- add_ground(altitude, render=True, material=None, render_material=None, render_half_size=[10, 10])[source]#
- add_mounted_camera(name, mount, pose, width, height, fovy, near, far) RenderCameraComponent [source]#
- add_point_light(position, color, shadow=False, shadow_near=0.1, shadow_far=10.0, shadow_map_size=2048)[source]#
- add_spot_light(position, direction, inner_fov: float, outer_fov: float, color, shadow=False, shadow_near=0.1, shadow_far=10.0, shadow_map_size=2048)[source]#
- property ambient_light#
- create_connection(body0: Entity | PhysxRigidBaseComponent | None, pose0: Pose, body1: Entity | PhysxRigidBaseComponent, pose1: Pose)[source]#
- create_drive(body0: Entity | PhysxRigidBaseComponent | None, pose0: Pose, body1: Entity | PhysxRigidBaseComponent, pose1: Pose)[source]#
- create_gear(body0: Entity | PhysxRigidBaseComponent | None, pose0: Pose, body1: Entity | PhysxRigidBaseComponent, pose1: Pose)[source]#
- create_physical_material(static_friction: float, dynamic_friction: float, restitution: float)[source]#
- property render_id_to_visual_name#
- property timestep#
sapien.wrapper.urdf_exporter module#
- sapien.wrapper.urdf_exporter.export_joint(joint: PhysxArticulationJoint)[source]#
- sapien.wrapper.urdf_exporter.export_kinematic_chain_urdf(articulation, force_fix_root=False)[source]#
- sapien.wrapper.urdf_exporter.export_link(link: PhysxArticulationLinkComponent)[source]#