Descriptors, Enums & Structured Dtypes

Structured NumPy Dtypes

  • joltsim.CONTACT_DTYPE (ContactEvent, 64-byte aligned, 64 bytes/row): env_id (u4), body1 (u4), body2 (u4), flags (u4; bit 0: persisted, bit 1: sensor), px, py, pz (f4), nx, ny, nz (f4), impulse (f4), penetration (f4).

  • joltsim.RAY_HIT_DTYPE (RayHit, 32-byte aligned, 32 bytes/row): body_idx (i4, -1 if miss), fraction (f4 in [0, 1]), px, py, pz (f4), nx, ny, nz (f4).


Enums

  • ShapeType: Box, Sphere, Capsule, Cylinder, ConvexHull, Mesh, HeightField.

  • JointType: Revolute, Continuous, Prismatic, Fixed, Spherical.

  • MotorMode: Off, Position, Velocity, Torque.

  • SoftBendType: None, Distance, Dihedral.

  • RuntimeConstraintType: Fixed, Point, Hinge, Slider.


Descriptors & Result Structs

SolverConfig

  • num_velocity_steps: int = 16, num_position_steps: int = 4

  • baumgarte: float = 0.2, penetration_slop: float = 0.005, speculative_contact_distance: float = 0.01, max_penetration_distance: float = 0.2

  • allow_sleeping: bool = False, constraint_warm_start: bool = True

  • max_bodies: int = 1024, max_body_pairs: int = 8192, max_contact_constraints: int = 4096, max_contacts: int = 1024

ShapeDesc

  • type: ShapeType = ShapeType.Box

  • half_extents: list[float] = [0.5, 0.5, 0.5] (for Box)

  • radius: float = 0.5, half_height: float = 0.5, convex_radius: float = 0.01

  • local_pos: list[float] = [0, 0, 0], local_quat: list[float] = [0, 0, 0, 1] (xyzw)

  • vertices: list[float], indices: list[int] (for ConvexHull, Mesh, HeightField)

  • heightfield_size: int = 0, heightfield_scale: list[float] = [1, 1, 1]

BodyDesc

  • name: str, is_static: bool = False, is_kinematic: bool = False

  • pos: list[float] = [0, 0, 0], quat: list[float] = [0, 0, 0, 1] (xyzw)

  • mass: float = 1.0, has_explicit_inertia: bool = False, com_offset: list[float] = [0, 0, 0], inertia_3x3: list[float] (9 row-major floats), inertia_scale: float = 1.0, min_inertia_diag: float = 0.0

  • friction: float = 0.5, restitution: float = 0.0, linear_damping: float = 0.0, angular_damping: float = 0.0

  • collision_shapes: list[ShapeDesc]

MotorConfig

  • mode: MotorMode = MotorMode.Position, kp: float = 100.0, kd: float = 10.0, max_effort: float = 100.0, max_friction: float = 0.0

JointDesc

  • name: str, type: JointType = JointType.Revolute, parent_link_idx: int, child_link_idx: int

  • anchor_world: list[float], axis_world: list[float], lower_limit: float, upper_limit: float

  • velocity_steps_override: int = 0, position_steps_override: int = 0, motor: MotorConfig

  • mimic_joint_idx: int = -1, mimic_multiplier: float = 1.0, mimic_offset: float = 0.0

SiteDesc

  • name: str, body_idx: int, local_pos: list[float], local_quat: list[float] (xyzw)

ArticulationDesc

  • links: list[BodyDesc], joints: list[JointDesc], disabled_collision_pairs: list[tuple[int, int]], disable_adjacent_collisions: bool = True, fixed_base: bool = False

SoftBodyDesc

  • name: str, pos: list[float], quat: list[float], vertices: list[float], inv_masses: list[float], faces: list[int], compliance: float = 1e-4, shear_compliance: float = 1e-4, bend_compliance: float = 1e-3, bend_type: SoftBendType = SoftBendType.Distance, num_iterations: int = 8, linear_damping: float = 0.1, friction: float = 0.4, restitution: float = 0.0, pressure: float = 0.0, vertex_radius: float = 0.01, faces_double_sided: bool = True

RuntimeConstraintDesc

  • type: RuntimeConstraintType = RuntimeConstraintType.Fixed, body1: int = 0, body2: int = -1 (-1 = world), pivot1: list[float], pivot2: list[float], axis: list[float], max_force: float = 0.0

ClosestPointResult

  • body1: int, body2: int, pos1: list[float], pos2: list[float], normal: list[float], distance: float