mani_skill.utils.building ========================= .. py:module:: mani_skill.utils.building Submodules ---------- .. toctree:: :maxdepth: 1 /api/mani_skill/utils/building/_mjcf_loader/index /api/mani_skill/utils/building/actor_builder/index /api/mani_skill/utils/building/actors/index /api/mani_skill/utils/building/articulation_builder/index /api/mani_skill/utils/building/articulations/index /api/mani_skill/utils/building/ground/index /api/mani_skill/utils/building/mjcf_loader/index /api/mani_skill/utils/building/urdf_loader/index Classes ------- .. autoapisummary:: mani_skill.utils.building.ActorBuilder mani_skill.utils.building.ArticulationBuilder mani_skill.utils.building.MJCFLoader mani_skill.utils.building.URDFLoader Functions --------- .. autoapisummary:: mani_skill.utils.building.get_articulation_builder Package Contents ---------------- .. py:class:: ActorBuilder Bases: :py:obj:`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 .. py:method:: add_plane_repeated_visual(pose = sapien.Pose(), half_size = [5, 5], mat = None, texture_repeat = [1, 1]) 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 :param texture_repeat: the number of times to repeat the texture in each direction. .. py:method:: build(name) Build the actor with the given name. Different to the original SAPIEN API, a unique name is required here. .. py:method:: build_dynamic(name) .. py:method:: build_entity() build the raw sapien entity. Modifies original SAPIEN function to accept new procedurally generated render components .. py:method:: build_kinematic(name) .. py:method:: build_physx_component(link_parent=None) .. py:method:: build_static(name) .. py:method:: set_allow_overlapping_plane_collisions(v) 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 .. py:method:: set_scene_idxs(scene_idxs = None) Set a list of scene indices to build this object in. Cannot be used in conjunction with scene mask .. py:attribute:: _allow_overlapping_plane_collisions :value: False .. py:attribute:: _plane_collision_poses .. py:attribute:: _procedural_shapes :value: [] procedurally generated shapes to attach .. py:attribute:: initial_pose :value: None .. py:attribute:: scene :type: mani_skill.envs.scene.ManiSkillScene .. py:attribute:: scene_idxs :value: None .. py:class:: ArticulationBuilder Bases: :py:obj:`sapien.wrapper.articulation_builder.ArticulationBuilder` .. py:method:: _build_entities(fix_root_link=None, name_prefix='', initial_pose=sapien.Pose()) .. py:method:: build(name=None, fix_root_link=None, build_mimic_joints=True) .. py:method:: build_entities(*args, **kwargs) :abstractmethod: .. py:method:: create_link_builder(parent = None) .. py:method:: set_name(name) .. py:method:: set_scene_idxs(scene_idxs = None) Set a list of scene indices to build this object in. Cannot be used in conjunction with scene mask .. py:attribute:: disable_self_collisions :type: bool :value: False .. py:attribute:: initial_pose :value: None .. py:attribute:: name :value: None .. py:attribute:: scene :type: mani_skill.envs.scene.ManiSkillScene .. py:attribute:: scene_idxs :value: None .. py:class:: MJCFLoader(ignore_classes=['motor'], visual_groups=[0, 2]) Bases: :py:obj:`mani_skill.utils.building._mjcf_loader.MJCFLoader` Wrapper for the SAPIEN MJCF Loader to support easy parallelization .. py:method:: load(mjcf_file, package_dir=None, name=None, scene_idxs=None) :param urdf_file: filename for URDL file :param srdf_file: SRDF for urdf_file. If srdf_file is None, it defaults to the ".srdf" file with the same as the urdf file :param package_dir: base directory used to resolve asset files in the URDF file. If an asset path starts with "package://", "package://" is simply removed from the file name :param name: name of the created articulation :type name: str :param scene_idxs: the ids of the scenes to build the objects in :type scene_idxs: list[int] :returns: returns a single Articulation loaded from the URDF file. It throws an error if multiple objects exists .. py:method:: parse(mjcf_file, package_dir=None) Parses a given MJCF file into articulation builders and actor builders and sensor configs .. py:attribute:: disable_self_collisions :type: bool :value: False .. py:attribute:: name :type: str :value: None .. py:attribute:: scene :type: mani_skill.envs.scene.ManiSkillScene .. py:class:: URDFLoader Bases: :py:obj:`sapien.wrapper.urdf_loader.URDFLoader` .. py:method:: load(urdf_file, srdf_file=None, package_dir=None, name=None, scene_idxs=None) :param urdf_file: filename for URDL file :param srdf_file: SRDF for urdf_file. If srdf_file is None, it defaults to the ".srdf" file with the same as the urdf file :param package_dir: base directory used to resolve asset files in the URDF file. If an asset path starts with "package://", "package://" is simply removed from the file name :param name: name of the created articulation :type name: str :param scene_idxs: the ids of the scenes to build the objects in :type scene_idxs: list[int] :returns: returns a single Articulation loaded from the URDF file. It throws an error if multiple objects exists .. py:method:: load_file_as_articulation_builder(urdf_file, srdf_file=None, package_dir=None) .. py:method:: parse(urdf_file, srdf_file=None, package_dir=None) .. py:attribute:: disable_self_collisions :type: bool :value: False .. py:attribute:: name :type: str :value: None .. py:attribute:: scene :type: mani_skill.envs.scene.ManiSkillScene .. py:function:: get_articulation_builder(scene, id, fix_root_link = True, urdf_config = dict()) Builds an articulation or returns an articulation builder given an ID specifying which dataset/source and then the articulation ID Currently these IDs are hardcoded for a few datasets. The new Shapedex platform for hosting and managing all assets will be integrated in the future