_rigid_body

Module Contents

Classes

RigidBody

A collection of geometries and physics parameters.

class RigidBody(initial_pose: simulation.scene._pose.Pose, static_friction: float, dynamic_friction: float, geometries: list[simulation.scene.geometry.Geometry])

A collection of geometries and physics parameters.

property uuid: uuid.UUID

Get the uuid.

Returns:

The uuid.

initial_pose: simulation.scene._pose.Pose
static_friction: float
dynamic_friction: float
geometries: list[simulation.scene.geometry.Geometry]
sensors: _AttachedSensors
mass() float

Get mass of the rigid body.

Returns:

The mass.

center_of_mass() pyrr.Vector3

Calculate the center of mass in the local reference frame of this rigid body.

If no geometry has mass, the average position of all geometries is returned, unweighted.

Returns:

The center of mass.

inertia_tensor() pyrr.Matrix33

Calculate the inertia tensor in the local reference frame of this rigid body.

For more details on the inertia calculations, see https://en.wikipedia.org/wiki/List_of_moments_of_inertia.

Returns:

The inertia tensor.

Raises:

ValueError – If one of the geometries is not a box.