mani_skill.utils.structs.Actor#

class mani_skill.utils.structs.Actor(_objs: List[T], _scene_idxs: torch.Tensor, scene: ManiSkillScene, _bodies: List[physx.PhysxRigidDynamicComponent], _body_data_name: str, _body_data_index_internal: slice = None, px_body_type: Literal['kinematic', 'static', 'dynamic'] = None, hidden: bool = False, initial_pose: Pose = None, name: str = None, merged: bool = False)[source]#

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

Methods

__init__(_objs, _scene_idxs, scene, _bodies, ...)

apply_force(force)

Apply an instantaneous external force to this actor in Newtons to the body's center of mass.

create_from_entities(entities, scene, scene_idxs)

get_angular_damping()

get_angular_velocity()

get_auto_compute_mass()

get_cmass_local_pose()

get_collision_meshes([to_world_frame, ...])

Returns the collision mesh of each managed actor object.

get_disable_gravity()

get_first_collision_mesh([to_world_frame])

Returns the collision mesh of the first managed actor object.

get_gpu_index()

get_gpu_pose_index()

get_linear_damping()

get_linear_velocity()

get_locked_motion_axes()

get_mass()

get_net_contact_forces()

Get the net contact forces on this body.

get_net_contact_impulses()

Get the net contact impulses on this body.

get_state()

hide_visual()

Hides this actor from view.

is_static([lin_thresh, ang_thresh])

Checks if this actor is static within the given linear velocity threshold lin_thresh and angular velocity threshold ang_thresh

merge(actors[, name])

Merge actors together under one view so that they can all be managed by one python dataclass object.

remove_from_scene()

set_angular_damping(damping)

set_angular_velocity(arg0)

Set the angular velocity of the dynamic rigid body.

set_collision_group(group, value)

set_collision_group_bit(group, bit_idx, bit)

Set's a specific collision group bit for all collision shapes in all parallel actors

set_disable_gravity(arg0)

set_linear_damping(damping)

set_linear_velocity(arg0)

Set the linear velocity of the dynamic rigid body.

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.

set_mass(arg0)

set_pose(arg1)

set_state(state[, env_idx])

show_visual()

Attributes

angular_damping

angular_velocity

auto_compute_mass

cmass_local_pose

device

disable_gravity

gpu_index

gpu_pose_index

has_collision_shapes

hidden

initial_pose

The initial pose of this Actor, as defined when creating the actor via the ActorBuilder.

is_sleeping

linear_damping

linear_velocity

locked_motion_axes

list[bool]

mass

merged

Whether this object is a view of other actors as a result of Actor.merge

name

per_scene_id

Returns a int32 torch tensor of the actor level segmentation ID for each managed actor object.

pose

px

The physx system objects managed by this dataclass are working on

px_body_type

scene

The ManiSkillScene object that manages the sub-scenes this dataclasses's objects are in