Model specification
A YAML model file model.yaml
defines the mechanical system for the simulation. It defines:
- Bodies: rigid bodies that carry mass and inertia and, optionally, collision and visualization geometry
- Joints: connection between a pair of bodies, specified either as a kinematic (ideal) joint or as a bushing
- Passive force elements: translational and rotational linear or non-linear spring-damper force elements acting between two rigid bodies
- Motors and actuators:
- translational and rotational motors acting between two rigid bodies at the position (displacement or angle), velocity (linear or angular speed), or force (force or torque) levels. Motors are specified through a time function for the control input (position, velocity, or force)
- external actuators
Bodies
Each body represents a physical object in the simulation with the following properties:
Property | Description | Required | Default |
---|---|---|---|
name | Unique identifier for the body | Yes | |
fixed | Indicates if body fixed relative to global frame | No | false |
mass | Mass in kg | Yes, if body not fixed | |
com | Center of Mass, relative to body reference frame | No | same as body reference frame |
inertia ->moments | Moments of inertia [Ixx, Iyy, Izz] relative to centroidal frame | Yes, if body not fixed | |
inertia ->products | Products of inertia [Ixy, Iyz, Izx] relative to centroidal frame | No | [0, 0, 0] |
location | Origin of the body reference frame, relative to model frame | Yes | |
orientation | Orientation of the body reference frame relative to model frame | No | identity rotation |
Joints
Joints connect two bodies and constrain their relative motion. They can be represented through constraints (kinematic joints) or through stiff compliance (bushings).
Property | Description | Required |
---|---|---|
type | Joint type (revolute, prismatic, spherical, etc.) | Yes |
name | Unique identifier for the joint | Yes |
body1 | Name of the first body to connect | Yes |
body2 | Name of the second body to connect | Yes |
bushing_data | Bushing compliance data; if not present, the joint is kinematic | No |
Passive spring-damper force elements
Spring-damper elements apply forces between bodies.
Property | Description | Required |
---|---|---|
type | Spring-damper type type (TSDA, RSDA) | Yes |
name | Unique identifier for the force element | Yes |
body1 | Name of the first body to connect | Yes |
body2 | Name of the second body to connect | Yes |
For linear spring-dampers, use the spring_coefficient
and damping_coefficient
properties. For example:
For nonlinear behavior, use spring_curve_data
and/or damping_curve_data
and/or the pair deformation
/map_data
. These properties allow specification of spring-damper characteristics as tabular data (which will be linearly interpolated by Chrono at run-time). For example: