mani_skill.utils.structs ======================== .. py:module:: mani_skill.utils.structs Submodules ---------- .. toctree:: :maxdepth: 1 /api/mani_skill/utils/structs/actor/index /api/mani_skill/utils/structs/articulation/index /api/mani_skill/utils/structs/articulation_joint/index /api/mani_skill/utils/structs/base/index /api/mani_skill/utils/structs/decorators/index /api/mani_skill/utils/structs/drive/index /api/mani_skill/utils/structs/link/index /api/mani_skill/utils/structs/pose/index /api/mani_skill/utils/structs/render_camera/index /api/mani_skill/utils/structs/types/index Attributes ---------- .. autoapisummary:: mani_skill.utils.structs.Array mani_skill.utils.structs.Device mani_skill.utils.structs.DriveMode Classes ------- .. autoapisummary:: mani_skill.utils.structs.Actor mani_skill.utils.structs.ArticulationJoint mani_skill.utils.structs.BaseStruct mani_skill.utils.structs.DefaultMaterialsConfig mani_skill.utils.structs.GPUMemoryConfig mani_skill.utils.structs.Link mani_skill.utils.structs.PhysxJointComponentStruct mani_skill.utils.structs.PhysxRigidBaseComponentStruct mani_skill.utils.structs.PhysxRigidBodyComponentStruct mani_skill.utils.structs.PhysxRigidDynamicComponentStruct mani_skill.utils.structs.Pose mani_skill.utils.structs.RenderCamera mani_skill.utils.structs.SceneConfig mani_skill.utils.structs.SimConfig Package Contents ---------------- .. py:class:: Actor Bases: :py:obj:`mani_skill.utils.structs.base.PhysxRigidDynamicComponentStruct`\ [\ :py:obj:`sapien.Entity`\ ] Wrapper around sapien.Entity objects mixed in with useful properties from the RigidBodyDynamicComponent components At the moment, on GPU and CPU one can query pose, linear velocity, and angular velocity easily On CPU, more properties are available .. py:method:: __hash__() .. py:method:: __repr__() .. py:method:: __str__() .. py:method:: apply_force(force) Apply an instantaneous external force to this actor in Newtons to the body's center of mass. Once called no need to call any gpu_apply_x functions as this handles it for you. .. py:method:: create_from_entities(entities, scene, scene_idxs, shared_name = None) :classmethod: .. py:method:: get_collision_meshes(to_world_frame = True, first_only = False) Returns the collision mesh of each managed actor object. Note results of this are not cached or optimized at the moment so this function can be slow if called too often. Some actors have no collision meshes, in which case this function returns an empty list. :param to_world_frame: Whether to transform the collision mesh pose to the world frame :type to_world_frame: bool :param first_only: Whether to return the collision mesh of just the first actor managed by this object. If True, this also returns a single Trimesh.Mesh object instead of a list. This can be useful for efficiency reasons if you know ahead of time all of the managed actors have the same collision mesh :type first_only: bool .. py:method:: get_first_collision_mesh(to_world_frame = True) Returns the collision mesh of the first managed actor object. Note results of this are not cached or optimized at the moment so this function can be slow if called too often. Some actors have no collision meshes, in which case this function returns None :param to_world_frame: Whether to transform the collision mesh pose to the world frame :type to_world_frame: bool .. py:method:: get_state() .. py:method:: hide_visual() Hides this actor from view. In CPU simulation the visual body is simply set to visibility 0 For GPU simulation, currently this is implemented by moving the actor very far away as visiblity cannot be changed on the fly. As a result we do not permit hiding and showing visuals of objects with collision shapes as this affects the actual simulation. Note that this operation can also be fairly slow as we need to run px.gpu_apply_rigid_dynamic_data and px.gpu_fetch_rigid_dynamic_data. .. py:method:: is_static(lin_thresh=0.01, ang_thresh=0.1) Checks if this actor is static within the given linear velocity threshold `lin_thresh` and angular velocity threshold `ang_thresh` .. py:method:: merge(actors, name = None) :classmethod: Merge actors together under one view so that they can all be managed by one python dataclass object. This can be useful for e.g. randomizing the asset loaded into a task and being able to do object.pose to fetch the pose of all randomized assets or object.set_pose to change the pose of each of the different assets, despite the assets not being uniform across all sub-scenes. For example usage of this method, see mani_skill/envs/tasks/pick_single_ycb.py :param actors: The actors to merge into one actor object to manage :type actors: list[Actor] :param name: A new name to give the merged actors. If none, the name will default to the first actor's name :type name: str .. py:method:: remove_from_scene() .. py:method:: set_collision_group(group, value) .. py:method:: set_collision_group_bit(group, bit_idx, bit) Set's a specific collision group bit for all collision shapes in all parallel actors .. py:method:: set_pose(arg1) .. py:method:: set_state(state, env_idx = None) .. py:method:: show_visual() .. py:property:: has_collision_shapes .. py:attribute:: hidden :type: bool :value: False .. py:attribute:: initial_pose :type: mani_skill.utils.structs.pose.Pose :value: None The initial pose of this Actor, as defined when creating the actor via the ActorBuilder. It is necessary to track this pose to ensure the actor is still at the correct pose once gpu system is initialized. It may also be useful to help reset a environment to an initial state without having to manage initial poses yourself .. py:attribute:: merged :type: bool :value: False Whether this object is a view of other actors as a result of Actor.merge .. py:attribute:: name :type: str :value: None .. py:property:: per_scene_id Returns a int32 torch tensor of the actor level segmentation ID for each managed actor object. .. py:property:: pose :type: mani_skill.utils.structs.pose.Pose .. py:attribute:: px_body_type :type: Literal['kinematic', 'static', 'dynamic'] :value: None .. py:class:: ArticulationJoint Bases: :py:obj:`mani_skill.utils.structs.base.BaseStruct`\ [\ :py:obj:`sapien.physx.PhysxArticulationJoint`\ ] Wrapper around physx.PhysxArticulationJoint objects At the moment, all of the same joints across all sub scenes are restricted to having the same properties as each other .. py:method:: __hash__() .. py:method:: __repr__() .. py:method:: __str__() .. py:method:: create(physx_joints, physx_articulations, scene, scene_idxs, joint_index, active_joint_index = None) :classmethod: Creates an object for managing articulation joints in articulations Note that the properties articulation, child_link, parent_link are by default None as they might not make sense in GPU sim and must be set by user .. py:method:: get_child_link() .. py:method:: get_damping() .. py:method:: get_dof() .. py:method:: get_drive_mode() .. py:method:: get_drive_target() .. py:method:: get_force_limit() .. py:method:: get_friction() .. py:method:: get_global_pose() .. py:method:: get_limits() .. py:method:: get_name() .. py:method:: get_parent_link() .. py:method:: get_pose_in_child() .. py:method:: get_pose_in_parent() .. py:method:: get_stiffness() .. py:method:: get_type() .. py:method:: set_drive_properties(stiffness, damping, force_limit = 3.4028234663852886e+38, mode = 'force') .. py:method:: set_drive_target(target) .. py:method:: set_drive_velocity_target(velocity) .. py:method:: set_friction(friction) .. py:method:: set_limits(limits) .. py:property:: _data_index .. py:attribute:: _physx_articulations :type: list[sapien.physx.PhysxArticulation] :value: None .. py:attribute:: active_index :type: torch.Tensor index of this joint amongst the active joints .. py:attribute:: articulation :type: Optional[mani_skill.utils.structs.articulation.Articulation] :value: None .. py:attribute:: child_link :type: Optional[mani_skill.utils.structs.link.Link] :value: None .. py:property:: damping :type: torch.Tensor .. py:property:: dof :type: torch.Tensor .. py:property:: drive_mode :type: list[Literal['force', 'acceleration']] typing.Literal['force', 'acceleration'] :type: type .. py:property:: drive_target :type: torch.Tensor .. py:property:: drive_velocity_target :type: torch.Tensor .. py:property:: force_limit :type: torch.Tensor .. py:property:: friction :type: torch.Tensor .. py:property:: global_pose :type: mani_skill.utils.structs.pose.Pose .. py:attribute:: index :type: torch.Tensor index of this joint among all joints .. py:property:: limits :type: torch.Tensor .. py:attribute:: name :type: str :value: None .. py:attribute:: parent_link :type: Optional[mani_skill.utils.structs.link.Link] :value: None .. py:property:: pose_in_child .. py:property:: pose_in_parent .. py:property:: qpos The qpos of this joint in the articulation .. py:property:: qvel The qvel of this joint in the articulation .. py:property:: stiffness :type: torch.Tensor .. py:property:: type :type: list[Literal['fixed', 'revolute', 'revolute_unwrapped', 'prismatic', 'free']] .. py:class:: BaseStruct Bases: :py:obj:`Generic`\ [\ :py:obj:`T`\ ] Base class of all structs that manage sapien objects on CPU/GPU .. py:method:: __hash__() .. py:method:: __post_init__() .. py:method:: __repr__() .. py:method:: __str__() .. py:property:: __maniskill_hash__ A better hash to use compared to the default frozen dataclass hash. It is tied directly to the only immutable field (the _objs list). .. py:property:: _num_objs .. py:attribute:: _objs :type: list[T] list of objects of type T managed by this dataclass. This should not be modified after initialization. The struct hash is dependent on the hash of this list. .. py:attribute:: _scene_idxs :type: torch.Tensor a list of indexes parallel to `self._objs` indicating which sub-scene each of those objects are actually in by index .. py:property:: device .. py:property:: px The physx system objects managed by this dataclass are working on .. py:attribute:: scene :type: mani_skill.envs.scene.ManiSkillScene The ManiSkillScene object that manages the sub-scenes this dataclasses's objects are in .. py:class:: DefaultMaterialsConfig .. py:method:: dict() .. py:attribute:: dynamic_friction :type: float :value: 0.3 .. py:attribute:: restitution :type: float :value: 0 .. py:attribute:: static_friction :type: float :value: 0.3 .. py:class:: GPUMemoryConfig A gpu memory configuration dataclass that neatly holds all parameters that configure physx GPU memory for simulation .. py:method:: dict() .. py:attribute:: collision_stack_size :type: int :value: 4194304 Increase this if you get 'Collision stack overflow detected' .. py:attribute:: found_lost_aggregate_pairs_capacity :type: int :value: 1024 .. py:attribute:: found_lost_pairs_capacity :type: int :value: 33554432 .. py:attribute:: heap_capacity :type: int :value: 67108864 .. py:attribute:: max_rigid_contact_count :type: int :value: 524288 Increase this if you get 'Contact buffer overflow detected' .. py:attribute:: max_rigid_patch_count :type: int :value: 262144 Increase this if you get 'Patch buffer overflow detected' .. py:attribute:: temp_buffer_capacity :type: int :value: 16777216 overflowing initial allocation size, increase capacity to at least %.' :type: Increase this if you get 'PxgPinnedHostLinearMemoryAllocator .. py:attribute:: total_aggregate_pairs_capacity :type: int :value: 1024 .. py:class:: Link Bases: :py:obj:`mani_skill.utils.structs.base.PhysxRigidBodyComponentStruct`\ [\ :py:obj:`sapien.physx.PhysxArticulationLinkComponent`\ ] Wrapper around physx.PhysxArticulationLinkComponent objects .. py:method:: __hash__() .. py:method:: __repr__() .. py:method:: __str__() .. py:method:: bbox(filter) .. py:method:: create(physx_links, scene, scene_idxs) :classmethod: .. py:method:: generate_mesh(filter, mesh_name) 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. .. py:method:: get_articulation() .. py:method:: get_index() .. py:method:: get_joint() .. py:method:: get_name() .. py:method:: get_visual_meshes(to_world_frame = True, first_only = False) 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 .. py:method:: merge(links, name = None) :classmethod: .. py:method:: set_collision_group(group, value) .. py:method:: set_collision_group_bit(group, bit_idx, bit) 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 .. py:method:: set_pose(arg1) .. py:attribute:: articulation :type: mani_skill.utils.structs.Articulation :value: None 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 .. py:property:: index :type: torch.Tensor 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 .. py:property:: is_root :type: torch.Tensor .. py:attribute:: joint :type: mani_skill.utils.structs.articulation_joint.ArticulationJoint :value: None 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 .. py:attribute:: merged :type: bool :value: False whether this link is result of Link.merge or not .. py:attribute:: meshes :type: dict[str, list[trimesh.Trimesh]] 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 .. py:attribute:: name :type: str :value: None .. py:property:: per_scene_id :type: torch.Tensor Returns a int32 torch tensor of the link level segmentation ID for each managed link object. .. py:property:: pose :type: mani_skill.utils.structs.pose.Pose .. py:property:: render_shapes Returns each managed link objects render shape list (a list of lists) .. py:class:: PhysxJointComponentStruct Bases: :py:obj:`BaseStruct`\ [\ :py:obj:`T`\ ], :py:obj:`Generic`\ [\ :py:obj:`T`\ ] Base class of all structs that manage sapien objects on CPU/GPU .. py:attribute:: pose_in_child :type: mani_skill.utils.structs.pose.Pose .. py:attribute:: pose_in_parent :type: mani_skill.utils.structs.pose.Pose .. py:class:: PhysxRigidBaseComponentStruct Bases: :py:obj:`BaseStruct`\ [\ :py:obj:`T`\ ], :py:obj:`Generic`\ [\ :py:obj:`T`\ ] Base class of all structs that manage sapien objects on CPU/GPU .. py:attribute:: _bodies :type: list[sapien.physx.PhysxRigidBaseComponent] .. py:class:: PhysxRigidBodyComponentStruct Bases: :py:obj:`PhysxRigidBaseComponentStruct`\ [\ :py:obj:`T`\ ], :py:obj:`Generic`\ [\ :py:obj:`T`\ ] Base class of all structs that manage sapien objects on CPU/GPU .. py:method:: get_angular_damping() .. py:method:: get_angular_velocity() .. py:method:: get_auto_compute_mass() .. py:method:: get_cmass_local_pose() .. py:method:: get_disable_gravity() .. py:method:: get_linear_damping() .. py:method:: get_linear_velocity() .. py:method:: get_mass() .. py:method:: get_net_contact_forces() Get the net contact forces on this body. Returns force vector of shape (N, 3) where N is the number of environments, and 3 is the dimension of the force vector itself, representing x, y, and z direction of force. .. py:method:: get_net_contact_impulses() Get the net contact impulses on this body. Returns impulse vector of shape (N, 3) where N is the number of environments, and 3 is the dimension of the impulse vector itself, representing x, y, and z direction of impulse. .. py:method:: set_angular_damping(damping) .. py:method:: set_disable_gravity(arg0) .. py:method:: set_linear_damping(damping) .. py:method:: set_mass(arg0) .. py:attribute:: _bodies :type: list[sapien.physx.PhysxRigidBodyComponent] .. py:property:: _body_data :type: torch.Tensor .. py:property:: _body_data_index a list of indexes of each GPU rigid body in the `px.cuda_rigid_body_data` buffer, one for each element in `self._objs` .. py:attribute:: _body_data_index_internal :type: slice :value: None .. py:attribute:: _body_data_name :type: str .. py:property:: _body_force_query .. py:property:: angular_damping :type: torch.Tensor .. py:property:: angular_velocity :type: torch.Tensor .. py:property:: auto_compute_mass :type: torch.Tensor .. py:property:: cmass_local_pose :type: mani_skill.utils.structs.pose.Pose .. py:property:: disable_gravity :type: torch.Tensor .. py:property:: linear_damping :type: torch.Tensor .. py:property:: linear_velocity :type: torch.Tensor .. py:property:: mass :type: torch.Tensor .. py:property:: px The physx system objects managed by this dataclass are working on .. py:class:: PhysxRigidDynamicComponentStruct Bases: :py:obj:`PhysxRigidBodyComponentStruct`\ [\ :py:obj:`T`\ ], :py:obj:`Generic`\ [\ :py:obj:`T`\ ] Base class of all structs that manage sapien objects on CPU/GPU .. py:method:: get_angular_velocity() .. py:method:: get_gpu_index() .. py:method:: get_gpu_pose_index() .. py:method:: get_linear_velocity() .. py:method:: get_locked_motion_axes() .. py:method:: set_angular_velocity(arg0) Set the angular velocity of the dynamic rigid body. :param arg0: The angular velocity to set. Can be of shape (N, 3) where N is the number of managed bodies or (3, ) to apply the same angular velocity to all managed bodies. .. py:method:: set_linear_velocity(arg0) Set the linear velocity of the dynamic rigid body. :param arg0: The linear velocity to set. Can be of shape (N, 3) where N is the number of managed bodies or (3, ) to apply the same linear velocity to all managed bodies. .. py:method:: set_locked_motion_axes(axes) Set some motion axes of the dynamic rigid body to be locked :param axes: list of 6 true/false values indicating whether which of the 6 DOFs of the body is locked. The order is linear X, Y, Z followed by angular X, Y, Z. If given a single list of length 6, it will be applied to all managed bodies. If given a a batch of shape (N, 6), you can modify the N managed bodies each in batch. .. rubric:: Example set_locked_motion_axes([True, False, False, False, True, False]) allows the object to move along the X axis and rotate about the Y axis .. py:attribute:: _bodies :type: list[sapien.physx.PhysxRigidDynamicComponent] .. py:property:: angular_velocity :type: torch.Tensor .. py:property:: gpu_index .. py:property:: gpu_pose_index .. py:property:: is_sleeping .. py:property:: linear_velocity :type: torch.Tensor .. py:property:: locked_motion_axes :type: mani_skill.utils.structs.types.Array list[bool] :type: type .. py:class:: Pose Wrapper around sapien.Pose that supports managing a batch of Poses and flexible creation of them from a variety of sources (list, numpy array, sapien.Pose). This pose object will also return information with a batch dimension, even if it is just holding a single position and quaternion. As a result pose.p and pose.q will return shapes (N, 3) and (N, 4) respectively for N poses being stored. pose.raw_pose stores all the pose data as a single 2D array of shape (N, 7). All sapien.Pose API are re-implemented in batch mode here to support GPU simulation. E.g. pose multiplication and inverse with ``pose_1.inv() * pose_2``, or creating transformation matrices with ``pose_1.to_transformation_matrix()`` are suppported they same way they are in sapien.Pose. Pose Creation ------------- To create a batched pose with a given position ``p`` and/or quaternion ``q``, you run: .. code-block:: python pose = Pose.create_from_pq(p=p, q=q) ``p`` and ``q`` can be a torch tensor, numpy array, and/or list, or None. If ``p`` or ``q`` have only 1 value/not batched, then we automatically repeat the value to the batch size of the other given value. For example, if ``p`` has a batch dimension of size > 1, and ``q`` has a batch dimension of size 1 or is a flat list, then the code automatically repeats the ``q`` value to the batch size of ``p``. Likewise in the reverse direction the same repeating occurs. If ``p`` and ``q`` have the same batch size, they are stored as so. If ``p`` and ``q`` have no batch dimensions, one is automatically added (e.g. ``p`` having shape (3,) now becomes (1, 3)) If ``p`` is None, it is auto filled with zeros. If ``q`` is None, it is auto filled with the [1, 0, 0, 0] quaternion. If you have a sapien.Pose, another Pose object, or a raw pose tensor of shape (N, 7) or (7,) called ``x``, you can create this Pose object with: .. code-block:: python pose = Pose.create(x) If you want a sapien.Pose object instead of this batched Pose, you can do ``pose.sp`` to get the sapien.Pose version (which is not batched). Note that this is only permitted if this Pose has a batch size of 1. Pose Indexing ------------- You can index into a Pose object like numpy/torch arrays to get a new Pose object with the indexed data. For example if ``pose`` has a batch size of 4, then ``pose[0]`` will be a Pose object with batch size of 1, and ``pose[1:3]`` will be a Pose object with batch size of 2. .. py:method:: __getitem__(i) .. py:method:: __len__() .. py:method:: __mul__(arg0) Multiply two poses. Supports multiplying singular poses like sapien.Pose or Pose object with batch size of 1 with Pose objects with batch size > 1. .. py:method:: create(pose, device = None) :classmethod: Creates a Pose object from a given ``pose``, which can be a torch tensor, sapien.Pose, list of sapien.Pose, or Pose .. py:method:: create_from_pq(p = None, q = None, device = None) :classmethod: Creates a Pose object from a given position ``p`` and/or quaternion ``q`` .. py:method:: get_p() Returns self.p, the position .. py:method:: get_q() Returns self.q, the quaternion .. py:method:: inv() Returns the inverse of this pose .. py:method:: set_p(p) Sets the position of this pose .. py:method:: set_q(q) Sets the quaternion of this pose .. py:method:: to(device) Move the Pose object to a different device .. py:method:: to_transformation_matrix() Returns the (N, 4, 4) shaped transformation matrix equivalent to this pose .. py:property:: device :type: mani_skill.utils.structs.types.Device Torch Device the Pose object is on .. py:property:: p The position of this pose .. py:property:: q The quaternion of this pose .. py:attribute:: raw_pose :type: torch.Tensor .. py:property:: shape :type: torch.Size Shape of the Pose object .. py:property:: sp Returns the equivalent sapien pose. Note that this is only permitted if this Pose has a batch size of 1. .. py:class:: RenderCamera Wrapper around sapien.render.RenderCameraComponent .. py:method:: __hash__() .. py:method:: create(render_cameras, scene, mount = None) :classmethod: .. py:method:: get_extrinsic_matrix() .. py:method:: get_far() .. py:method:: get_global_pose() .. py:method:: get_height() .. py:method:: get_intrinsic_matrix() .. py:method:: get_local_pose() .. py:method:: get_model_matrix() .. py:method:: get_name() .. py:method:: get_near() .. py:method:: get_picture(names) .. py:method:: get_projection_matrix() .. py:method:: get_skew() .. py:method:: get_width() .. py:method:: set_far(far) .. py:method:: set_focal_lengths(fx, fy) .. py:method:: set_fovx(fov, compute_y = True) .. py:method:: set_fovy(fov, compute_x = True) .. py:method:: set_gpu_pose_batch_index(arg0) .. py:method:: set_local_pose(arg0) .. py:method:: set_near(near) .. py:method:: set_perspective_parameters(near, far, fx, fy, cx, cy, skew) .. py:method:: set_principal_point(cx, cy) .. py:method:: set_property(name, value) change properties of the camera. This is not well documented at the moment and is a heavily overloaded function. At the moment you can do this: - set_property("toneMapper", value) where value is 0 (gamma), 1 (sRGB), 2 (filmic) change the color management used. Default is 0 (gamma) - set_property("exposure", value) where value is the exposure. Default is 1.0 .. py:method:: set_skew(skew) .. py:method:: take_picture() .. py:attribute:: _cached_extrinsic_matrix :type: torch.Tensor :value: None .. py:attribute:: _cached_intrinsic_matrix :type: torch.Tensor :value: None .. py:attribute:: _cached_local_pose :type: mani_skill.utils.structs.pose.Pose :value: None .. py:attribute:: _cached_model_matrix :type: torch.Tensor :value: None .. py:property:: _cuda_buffer .. py:attribute:: _render_cameras :type: list[sapien.render.RenderCameraComponent] .. py:attribute:: camera_group :type: sapien.render.RenderCameraGroup :value: None .. py:property:: cx :type: float .. py:property:: cy :type: float .. py:property:: far :type: float .. py:property:: fovx :type: float .. py:property:: fovy :type: float .. py:property:: fx :type: float .. py:property:: fy :type: float .. py:property:: global_pose :type: mani_skill.utils.structs.pose.Pose .. py:property:: height :type: int .. py:property:: local_pose :type: sapien.Pose .. py:attribute:: mount :type: Union[mani_skill.utils.structs.actor.Actor, mani_skill.utils.structs.link.Link] :value: None .. py:attribute:: name :type: str .. py:property:: near :type: float .. py:attribute:: scene :type: Any .. py:property:: skew :type: float .. py:property:: width :type: int .. py:class:: SceneConfig .. py:method:: dict() .. py:attribute:: bounce_threshold :type: float :value: 2.0 .. py:attribute:: contact_offset :type: float :value: 0.02 .. py:attribute:: cpu_workers :type: int :value: 0 .. py:attribute:: enable_ccd :type: bool :value: False .. py:attribute:: enable_enhanced_determinism :type: bool :value: False .. py:attribute:: enable_friction_every_iteration :type: bool :value: True .. py:attribute:: enable_pcm :type: bool :value: True .. py:attribute:: enable_tgs :type: bool :value: True .. py:attribute:: gravity :type: Union[numpy.ndarray, list[float]] .. py:attribute:: rest_offset :type: float :value: 0 .. py:attribute:: sleep_threshold :type: float :value: 0.005 .. py:attribute:: solver_position_iterations :type: int :value: 15 .. py:attribute:: solver_velocity_iterations :type: int :value: 1 .. py:class:: SimConfig Simulation configurations for ManiSkill environments .. py:method:: dict() .. py:attribute:: control_freq :type: int :value: 20 control frequency (Hz). Every control step (e.g. env.step) contains sim_freq / control_freq physx simulation steps .. py:attribute:: default_materials_config :type: DefaultMaterialsConfig .. py:attribute:: gpu_memory_config :type: GPUMemoryConfig .. py:attribute:: scene_config :type: SceneConfig .. py:attribute:: sim_freq :type: int :value: 100 simulation frequency (Hz) .. py:attribute:: spacing :type: float :value: 5 Controls the spacing between parallel environments when simulating on GPU in meters. Increase this value if you expect objects in one parallel environment to impact objects within this spacing distance .. py:type:: Array :canonical: Union[torch.Tensor, np.ndarray[Any], Sequence] .. py:type:: Device :canonical: Union[str, torch.device] .. py:data:: DriveMode