mani_skill.utils.structs.base#
Attributes#
Classes#
Base class of all structs that manage sapien objects on CPU/GPU |
|
Base class of all structs that manage sapien objects on CPU/GPU |
|
Base class of all structs that manage sapien objects on CPU/GPU |
|
Base class of all structs that manage sapien objects on CPU/GPU |
|
Base class of all structs that manage sapien objects on CPU/GPU |
Module Contents#
- class mani_skill.utils.structs.base.BaseStruct[source]#
Bases:
Generic[T]Base class of all structs that manage sapien objects on CPU/GPU
- property __maniskill_hash__[source]#
A better hash to use compared to the default frozen dataclass hash. It is tied directly to the only immutable field (the _objs list).
- _objs: list[T][source]#
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.
- _scene_idxs: torch.Tensor[source]#
a list of indexes parallel to self._objs indicating which sub-scene each of those objects are actually in by index
- scene: mani_skill.envs.scene.ManiSkillScene[source]#
The ManiSkillScene object that manages the sub-scenes this dataclasses’s objects are in
- class mani_skill.utils.structs.base.PhysxJointComponentStruct[source]#
Bases:
BaseStruct[T],Generic[T]Base class of all structs that manage sapien objects on CPU/GPU
- pose_in_child: mani_skill.utils.structs.pose.Pose[source]#
- pose_in_parent: mani_skill.utils.structs.pose.Pose[source]#
- class mani_skill.utils.structs.base.PhysxRigidBaseComponentStruct[source]#
Bases:
BaseStruct[T],Generic[T]Base class of all structs that manage sapien objects on CPU/GPU
- class mani_skill.utils.structs.base.PhysxRigidBodyComponentStruct[source]#
Bases:
PhysxRigidBaseComponentStruct[T],Generic[T]Base class of all structs that manage sapien objects on CPU/GPU
- get_net_contact_forces()[source]#
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.
- get_net_contact_impulses()[source]#
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.
- property _body_data_index[source]#
a list of indexes of each GPU rigid body in the px.cuda_rigid_body_data buffer, one for each element in self._objs
- property cmass_local_pose: mani_skill.utils.structs.pose.Pose[source]#
- Return type:
- class mani_skill.utils.structs.base.PhysxRigidDynamicComponentStruct[source]#
Bases:
PhysxRigidBodyComponentStruct[T],Generic[T]Base class of all structs that manage sapien objects on CPU/GPU
- set_angular_velocity(arg0)[source]#
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.
- Parameters:
arg0 (mani_skill.utils.structs.types.Array) –
- set_linear_velocity(arg0)[source]#
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.
- Parameters:
arg0 (mani_skill.utils.structs.types.Array) –
- set_locked_motion_axes(axes)[source]#
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.
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
- Parameters:
axes (mani_skill.utils.structs.types.Array) –
- Return type:
None