gs.materials.Rigid#

class genesis.engine.materials.rigid.Rigid(rho=200.0, friction=None, needs_coup=True, coup_friction=0.1, coup_softness=0.002, coup_restitution=0.0, sdf_cell_size=0.005, sdf_min_res=32, sdf_max_res=128, gravity_compensation=0.0, coup_type=None, coup_links=None, enable_coup_collision=True, coup_collision_links=None, contact_resistance=None)[source]#

Bases: Kinematic[RigidEntity]

The Rigid class represents a material used in rigid body simulation.

Note

This class is intended for use with the rigid solver and provides parameters relevant to physical interactions such as friction, density, and signed distance fields (SDFs).

Parameters:
  • rho (float, optional) – The density of the material used to compute mass. Default is 200.0.

  • friction (float, optional) – Friction coefficient within the rigid solver. If None, a default of 1.0 may be used or parsed from file.

  • needs_coup (bool, optional) – Whether the material participates in coupling with other solvers. Default is True.

  • coup_friction (float, optional) – Friction used during coupling. Must be non-negative. Default is 0.1.

  • coup_softness (float, optional) – Softness of coupling interaction. Must be non-negative. Default is 0.002.

  • coup_restitution (float, optional) – Restitution coefficient in collision coupling. Should be between 0 and 1. Default is 0.0.

  • sdf_cell_size (float, optional) – Cell size in SDF grid in meters. Defines grid resolution. Default is 0.005.

  • sdf_min_res (int, optional) – Minimum resolution of the SDF grid. Must be at least 16. Default is 32.

  • sdf_max_res (int, optional) – Maximum resolution of the SDF grid. Must be >= sdf_min_res. Default is 128.

  • gravity_compensation (float, optional) – Compensation factor for gravity. 1.0 cancels gravity. Default is 0.

  • coup_type (str or None, optional) –

    Coupling mode for this entity. Only used by the IPC coupler. Requires needs_coup=True. If None, auto-selected based on entity type: 'external_articulation' for fixed-base articulated robots, 'two_way_soft_constraint' for floating-base robots, and 'ipc_only' for non-articulated objects. Valid values:

    • ’two_way_soft_constraint’: Two-way soft coupling.

    • ’external_articulation’: Joint-level coupling for articulated bodies. Joint positions will be coupled at the DOF level.

    • ’ipc_only’: IPC controls entity, transforms copied to Genesis (one-way). Only supported by rigid non-articulated objects.

    Default is None.

  • coup_links (tuple of str or None, optional) – Tuple of link names to include in coupling. When set, only the named links participate in coupling; other links are excluded. Only supported with needs_coup=True and two_way_soft_constraint type in IPC. Default is None.

  • enable_coup_collision (bool, optional) – Whether coupler collision is enabled for this entity’s links. Only used by the IPC coupler. Unlike needs_coup=False (which removes the entity from the coupler entirely), setting this to False keeps the entity in the coupler for coupling forces but disables contact response. Default is True.

  • coup_collision_links (tuple of str or None, optional) – Tuple of link names whose geoms participate in coupler collision. Only used by the IPC coupler. Only effective when enable_coup_collision=True. If None, all coupled links have collision. When set, only the named links get coupler collision; other links are marked no-collision. Default is None.

  • contact_resistance (float or None, optional) – IPC coupling contact resistance/stiffness override for this entity. None means use IPCCouplerOptions.contact_resistance. Default is None.

property gravity_compensation: float#

Gravity compensation factor. 1.0 cancels gravity.

property friction: float | None#

Friction coefficient used within the rigid solver.

property needs_coup: bool#

Whether this material requires solver coupling.

property coup_friction: float#

Friction coefficient used in coupling interactions.

property coup_softness: float#

Softness parameter controlling the influence range of coupling.

property coup_restitution: float#

Restitution coefficient used during contact in coupling.

property contact_resistance: float | None#

IPC coupling contact resistance/stiffness override, or None for coupler default.

property sdf_cell_size: float#

Size of each SDF grid cell in meters.

property sdf_min_res: int#

Minimum allowed resolution for the SDF grid.

property sdf_max_res: int#

Maximum allowed resolution for the SDF grid.

property rho: float#

Density of the rigid material.

property coup_type: str | None#

IPC coupling mode for this entity.

Tuple of link names to include in coupling.

property enable_coup_collision: bool#

Whether IPC collision is enabled for this entity’s links.

Tuple of link names whose geoms participate in IPC collision. None = all coupled links.