25. OpenPLX for AGX Dynamics

OpenPLX is a high-level modeling language designed to work seamlessly with AGX Dynamics. It provides a structured approach to defining physics simulations, allowing users to create and configure rigid bodies, constraints, motors, friction models, and more in a human-readable format.

By leveraging AGX Dynamics, OpenPLX enables the simulation of complex mechanical systems, vehicles, robotics, and deformable terrains with minimal effort.

Note

OpenPLX is a work in progress. This draft version will evolve with user feedback and experience. We welcome your input and collaboration.

This page explains how OpenPLX interacts with AGX Dynamics and provides a structured way to define physics simulations. For a complete overview of OpenPLX Syntax and Bundles, consult the OpenPLX Documentation.

Note

This version of AGX (2.50.0.0) is built with OpenPLX version 0.35.5. OpenPLX release log.

25.1. How OpenPLX Works with AGX Dynamics

OpenPLX acts as an interface layer for AGX Dynamics, converting structured OpenPLX definitions into AGX simulation components. When you load an OpenPLX file, it is transformed into an AGX Dynamics simulation tree, allowing for efficient physics-based interactions.

This means:

  1. OpenPLX describes the physics setup and the scene.

  2. The AGX Dynamics engine executes the simulation.

  3. Users can interact with the scene through OpenPLX files.

  4. Python controllers interact by sending or receiving OpenPLX signals.

25.2. Simulating an OpenPLX File in AGX Viewer

To simulate an .openplx file with AGX Dynamics, pass it to agxViewer as you would an .agx file. agxOSGViewer is also available when AGX is built with the OpenSceneGraph viewer.

agxViewer myModel.openplx

To load a specific model declared in the file, pass its name with --modelName:

agxViewer myModel.openplx --modelName MyScene

25.3. Tire models

The AGX.Tires bundle provides wheel components for vehicles and body models for direct use:

Wheel / body constructor

Contact model

AGX.Tires.GTire.Wheel / AGX.Tires.GTire.Body

Compliant tire contact on rigid surfaces.

AGX.Tires.TerrainWheel.Wheel / AGX.Tires.TerrainWheel.Body

Wheel-soil interaction on deformable terrain.

AGX.Tires.Unified.Wheel / AGX.Tires.Unified.Body

GTire on rigid surfaces and TerrainWheel on deformable terrain.

The wheel components inherit Vehicles.Wheels.Base and can replace slots declared with that type. Each specializes rim as a rigid body with the corresponding tire traits. Use the standard connector for suspension attachment. Set dimensions, tire settings, simulated mass and visuals on rim:

Vehicle is Physics3D.System:
    wheel is Vehicles.Wheels.Base

UnifiedVehicle is Vehicle:
    wheel becomes AGX.Tires.Unified.Wheel:
        rim:
            radius: 0.5
            width: 0.3
            rotational_axis: {0, 1, 0}
            inertia.mass: 20
            inflation_pressure: 240000
            pressure_sinkage_model: "bekker"

rim.rotational_axis sets both the cylinder orientation and connector axis; its default is local Z, following Vehicles.Wheels.Rim. Set the connector’s normal for the desired assembly orientation. The wheel’s rim is always a Physics3D.Bodies.RigidBody. GTire and Unified suspensions attach to the native carrier, and wheel actuators drive the carcass hinge. TerrainWheel uses the rim body and the suspension’s wheel coordinate directly.

Each body constructor creates a cylinder named tire_cylinder and references it through tire_geometry. Set radius and width on the cylinder, and tire-model parameters on the body:

Wheel is AGX.Tires.Unified.Body:
    tire_cylinder:
        radius: 0.5
        height: 0.3
    inertia.mass: 20
    inflation_pressure: 240000
    pressure_sinkage_model: "bekker"

To specialize an existing body, apply AGX.Tires.TireGeometryReference and one or both configuration traits, then reference a cylinder owned by that body. Use AGX.Tires.GTire.Configuration for GTire, AGX.Tires.TerrainWheel.Configuration for TerrainWheel, or both for Unified:

WheelModule is Physics3D.System:
    wheel is Physics3D.Bodies.Body:
        inertia becomes Physics3D.Bodies.Inertia:
            mass: 20
        contact_cylinder is Physics3D.Geometries.Cylinder:
            radius: 0.5
            height: 0.3

UnifiedWheelModule is WheelModule:
    wheel becomes Physics3D.Bodies.Body with AGX.Tires.TireGeometryReference, AGX.Tires.GTire.Configuration, AGX.Tires.TerrainWheel.Configuration:
        tire_geometry: wheel.contact_cylinder
        inflation_pressure: 240000
        pressure_sinkage_model: "bekker"

The configuration traits require TireGeometryReference. They can be applied to a body, rigid or flexible, and reuse its selected cylinder. GTire supplies its own tire compliance; explicit beam, curve, surface or volume deformation models cannot be combined with these tire models. The cylinder’s local Y axis is the axle and its height is the tire width. Change its dimensions through its owned name, since tire_geometry is a read-only reference.

For GTire and Unified, carcass_hinge can reference an existing hinge between the tire and a non-tire carrier body; otherwise AGX creates the carrier and hinge. Simulated mass and inertia use the body’s inertia field; GTire’s tire_mass, ixx and iyy are separate tire-model parameters. Configure soil properties on the terrain material. See AGX Vehicle for the native tire models.

25.3.1. GTire parameters from JSON files

Apply AGX.Tires.GTire.JsonParameters to a GTire or Unified body and set parameters_path to a parameter file. AGX includes presets under MaterialLibrary/GTireParameters:

Wheel is AGX.Tires.GTire.Body with AGX.Tires.GTire.JsonParameters:
    parameters_path: $"{AGX_DATA_DIR}/MaterialLibrary/GTireParameters/Car-205-60R15.json"
    tire_cylinder:
        radius: 0.5
        height: 0.3

For a vehicle wheel component, apply the trait to its rim instead:

Wheel is AGX.Tires.Unified.Wheel:
    rim becomes Vehicles.Wheels.Rim with AGX.Tires.GTire.JsonParameters:
        parameters_path: $"{AGX_DATA_DIR}/MaterialLibrary/GTireParameters/Car-205-60R15.json"
        radius: 0.5
        width: 0.3

The file is loaded directly through agxVehicle::GTireParametersReaderWriter and supplies the complete GTireParameters set instead of the OpenPLX tire parameter settings. All entries required by the native reader must be present. Use its JSON format, as in the supplied presets, including names such as verticalStiffness and muStatic. Unknown keys produce console warnings naming the unused entry and file. A file that cannot be read as a complete parameter set is reported as a loader error. JSON comments are supported. Use @"tire.json" for a path relative to the OpenPLX source file.

AGX.Tires.GTire.Variants provides a wheel model for each bundled preset: Aircraft_F4_Main_30x11_5_14_5, Bus_275_70R22_5, Car_205_60R15, Truck_315_80R22_5 and WheelLoader_23_5R25. These inherit AGX.Tires.GTire.Wheel and reference the corresponding JSON file. Set wheel dimensions and simulated body inertia separately:

Wheel is AGX.Tires.GTire.Variants.Car_205_60R15:
    rim:
        radius: 0.3135
        width: 0.205
        inertia.mass: 20

The overrides apply to the native AGX tire after OpenPLX expressions have been evaluated. They do not change the OpenPLX object or re-evaluate expressions: if tire_cylinder.radius depends on vertical_stiffness, that expression uses the authored OpenPLX stiffness even when JSON overrides the native tire’s stiffness. The body’s simulated mass, inertia and cylinder dimensions are configured separately and are not overridden by the parameter file.

25.3.2. Deforming tire visuals in agxRender

Apply AGX.Tires.GTire.Visuals.TireDeformation to a visual geometry or Visuals.Node owned by a body with AGX.Tires.TireGeometryReference and AGX.Tires.GTire.Configuration. agxRender deforms its meshes against the contacts of the selected tire_geometry. This also works with the unified tire.

Wheel is AGX.Tires.GTire.Body:
    tire_cylinder:
        radius: 0.5
        height: 0.3
    visual is Visuals.Geometries.ExternalTriMeshGeometry with AGX.Tires.GTire.Visuals.TireDeformation:
        path: @"tire.obj"
        axis: {0, 1, 0}
        outer_radius: 0.5
        rim_radius: 0.3
        sectors: 72
        lateral_samples: 3
        sidewall_bulge: 0.35
        transition_angle: 0.25
        max_deflection: 0

Settings correspond to agxRender.TireDeformationSettings in each mesh’s local frame. A zero axis selects the thinnest axis; zero radii measure the mesh tread and bead radii. Zero max_deflection uses 75% of sidewall height. Radii and deflection are meters; transition_angle is radians. Counts must be in [8, 255] for sectors and [1, 8] for lateral_samples; other scalar settings must be nonnegative. Collision geometry and tire dynamics are unchanged. The OSG viewer draws the original mesh. See tests/agxOpenPLX/resources/gtire_vehicle.openplx for a vehicle example.

25.4. Animating the SNAP assembly process

Use openplx_animate_snap to inspect how SNAP positions the parts of an OpenPLX model during loading. The viewer replays the recorded transforms, shows the responsible mate and connector, and highlights forcing steps. This is a playback of the assembly process, not a dynamic simulation of the machine.

Parts appear when their nearest animated transform begins its first SNAP step. A cylinder body whose own local transform stays unchanged follows its animated barrel, rod or actuator parent. Transforms recorded only as initial states do not keep a part hidden.

25.4.1. Starting the animation

Run the command in an AGX Python environment with OpenPLX support. On Linux and macOS, source setup_env.bash from the AGX installation or build you intend to use. On Windows, use the configured AGX command prompt. The AGX and OpenPLX versions must support recording SNAP history and the SNAP report; the script enables both automatically when loading the model.

python -m agxPythonModules.openplx.openplx_animate_snap scene.openplx

Playback starts automatically and loops by default. For inspection, start paused and advance one step at a time with the Right Arrow key:

python -m agxPythonModules.openplx.openplx_animate_snap scene.openplx --start-paused

If the model uses custom bundles, supply their search paths. Repeat --extra-bundle-path for each path. Model and bundle paths are resolved relative to the current working directory; absolute paths can also be used.

python -m agxPythonModules.openplx.openplx_animate_snap scene.openplx \
  --extra-bundle-path ../machine_bundles \
  --extra-bundle-path ../robot_bundles \
  --start-paused

--addBundlePath is an alias for --extra-bundle-path. To select a specific model declared in the file, add --modelName MyScene; otherwise the last model in the file is loaded.

25.4.2. Playback controls

Give the viewer window keyboard focus before using these controls. Camera navigation remains available while playback is paused.

Key

Action

Space

Toggle automatic playback.

Right Arrow

Pause automatic playback and animate the next step.

Left Arrow

Pause automatic playback and animate the previous step.

r

Return to the initial state and pause.

End

Jump to the final assembled state and pause.

l

Toggle looping.

Pausing during a transition completes that transition. To examine a step, start with --start-paused and advance to it with the arrow keys.

25.4.3. Reading the overlay and markers

The overlay begins with SNAP instruction [step] type and lists the moved local transform, its owning model, the mate, and the responsible connector. Use these paths to locate the corresponding declarations in the OpenPLX source. One mate can produce several steps, for example a translation followed by a rotation.

The viewer creates one sphere and an axis marker for the active instruction:

  • Green identifies the responsible connector for an ordinary SNAP step.

  • Red identifies a Forcing or ForcingDof step. SNAP has chosen a reference pose or degree of freedom that the model did not uniquely determine. Review the accompanying SNAP warnings for details.

The same marker changes color and position as playback advances; markers are not retained at every previously processed connector. A following step without new connector information can retain the preceding marker. If a report does not identify a connector, the script falls back to the moved transform’s origin.

The sphere has a radius of 0.06 m. Markers use normal scene rendering, so they can be small at the current zoom level or obscured by model geometry. Pause playback and adjust the camera to inspect them. Markers are hidden at the initial state, before an instruction has been selected.

25.4.4. Timing and loading options

For a slower, single playback:

python -m agxPythonModules.openplx.openplx_animate_snap scene.openplx \
  --duration-ms 1000 --step-delay-ms 300 --no-loop

Option

Default

Meaning

--duration-ms

320

Duration of each animated transition, in milliseconds.

--step-delay-ms

60

Delay between transitions during automatic playback, in milliseconds.

--start-paused

Off

Wait for keyboard input before starting playback.

--no-loop

Looping enabled

Stop at the final step instead of restarting.

--serialization-mode

auto

Select auto, full or registered scene serialization.

--serialization-timeout-ms

8000

Time limit for the full-serialization helper process, in milliseconds.

In auto mode the script first attempts full serialization in a helper process, then falls back to registered objects if the attempt fails or times out. Registered serialization also reconstructs nested actuator and cylinder owner frames from their transform metadata. Use --serialization-mode registered to skip the full-serialization attempt. In full mode a helper failure is reported instead of falling back; use --serialization-timeout-ms to adjust its time limit.

Run the command with --help to list its options. You can also select the script explicitly by passing its full path to Python:

python /path/to/agx/data/python/modules/agxPythonModules/openplx/openplx_animate_snap.py scene.openplx --start-paused

An error about missing SNAP history or a missing SNAP report indicates that the loaded model or runtime did not provide the required playback data. Check the model’s load errors and use compatible AGX/OpenPLX binaries with the animation script.

25.5. Importing an AGX File in OpenPLX

AGX .agx files contain pre-defined physics models. OpenPLX supports seamless integration of AGX models into simulation systems.

  1. The AGX Model describes the basic physics setup, including rigid bodies, constraints, collision geometries and visuals.

  2. OpenPLX imports the AGX model and augments it with additional components, such as tracks and a drivetrain.

  3. OpenPLX describes the complete simulation scene.

  4. Controller scripts (python/C++) connects the OpenPLX model to the desired control systems.

  5. The AGX Dynamics engine executes the simulation.

25.5.1. Syntax for Importing an AGX File

To import an .agx file into OpenPLX, use the following OpenPLX syntax:

import @"model.agx" as AGXModel

Scene is Physics3D.System:
  my_model is AGXModel

The imported AGX model (AGXModel) can now be referenced within OpenPLX.

To load the OpenPLX scene and view the AGX model, use:

agxOSGViewer scene.openplx -p

25.5.2. Viewing an AGX File as an OpenPLX Model

You can open an AGX file to find the components you need to reference using the anytoopenplx command:

python -m agxPythonModules.openplx.anytoopenplx model.agx > model_reference.openplx

Use this file to identify signals and components to reference when augmenting your model with additional OpenPLX components.

Note

At the moment, the models generated OpenPLX file will duplicate the content of the agx file, creating a conflict when running the simulation. To accommodate this, change the file extension of the new .openplx file to .txt, or place it outside the root folder of your OpenPLX bundle.

25.6. OpenPLX Tutorials

Explore the OpenPLX Tutorials to get started with OpenPLX for AGX Dynamics.

25.7. AGX Annotations

Table 25.1 AGX Parameters

Annotation

Description

Type

agx_solve_type

Set the AGX Solve type for a constraint.
Applies to Physics3D.Interactions.Mate
Accepted values "DIRECT" | "DIRECT_AND_ITERATIVE" | "ITERATIVE"

String

agx_friction_solve_type

Sets the AGX Solve type for the friction model.
Applies to Physics.Interactions.Dissipation.DefaultDissipation
Accepted values "SPLIT" | "DIRECT" | "DIRECT_AND_ITERATIVE" | "ITERATIVE"

String

agx_approximate_cone_friction

Enables AGX approximate cone friction.

Bool

agx_terrain_material

Sets an AGX terrain material preset.
Applies to Terrain.TerrainMaterial

String

agx_actuator_internal_inertia

Sets the internal inertia of the input shaft of a agxPowerLine::RotationalActuator or the internal mass of the input rod of a agxPowerLine::TranslationalActuator.
Applies to DriveTrain.HingeActuator and DriveTrain.PrismaticActuator

Real

agx_observer_frame

Maps a Physics3D.Interactions.MateConnector to a agx::ObserverFrame.
Applies to Physics3D.Interactions.MateConnector

Bool

agx_debug_render_frame

Renders the axes of a Physics3D.Interactions.MateConnector, also maps it to a agx::ObserverFrame.
Applies to Physics3D.Interactions.MateConnector

Bool

25.8. AGX Track Wheel Annotations

The following annotations can be applied to a Vehicles.TrackSystem.Components.TrackWheels.Base to set AGX Track Wheel properties.

Table 25.2 AGX Track Wheel Annotations

Annotation

Description

Type

agx_track_wheel_split_segments

SPLIT_SEGMENTS

Bool

25.9. AGX Sensor Annotations

The following annotations are applied to Sensor bundle related models to tweak how they are loaded.

Table 25.3 AGX Sensor Annotations

Annotation

Description

Type

agx_sensor_lidar_preview

Annotate a Sensors.LidarLogic to enable, or not, visualization of the lidar point cloud.

Bool

agx_sensor_camera_output_preview

Annotate a Sensors.Signals.CameraColorOutput or a Sensors.Signals.CameraDepthOutput to enable, or not, a visualization of that output.

Bool

agx_sensor_camera_output_preview_maximum_depth

Annotate a Sensors.Signals.CameraDepthOutput to optionally specify the maximum depth value used to scale the preview visualization values.

Real

25.10. AGX Plugin Annotations

When importing a .agx file there are a few annotations that change the import behavior.

Table 25.4 AGX Plugin Annotations

Annotation

Description

Type

discard_rigid_body_positions

Discards all position information for rigid bodies if set to true, allowing SNAP to reposition them.

Bool

regenerate_shape_uuids

Setting this to true will create new UUIDs for all AGX shapes. This is useful when importing the same .agx file twice.

Bool

material_naming_rule

Controls how imported materials will be named. This can be necessary to avoid collisions since materials are always put in a global scope.

Accepted values

"UUID" sets the material unique_name to the AGX UUID.

"OPENPLX_NAME" sets the material unique_name to the OpenPLX name.

"AGX_NAME" (default) sets the material unique_name to the AGX name.

If UUIDs are not unique, try "OPENPLX_NAME" together with a namespace to generate unique names.

String

ignore_disabled_secondary_constraints

Secondary constraints that are disabled are not imported if this is set to true. Can improve performance when importing the AGX file.

Bool

25.11. AGX Terrain Plugin Annotations

The following annotations can be applied to the import of a .tif or .tiff file.

Table 25.5 AGX Terrain Plugin Annotations

Annotation

Description

Type

num_samples_x

Number of samples to read in x-axis.

Int

num_samples_y

Number of samples to read in y-axis.

Int

offset_x

Pixel offset in x-axis.

Int

offset_y

Pixel offset in y-axis.

Int

height_offset

Shifts heights by a fixed amount.

Real

max_depth

The maximum depth of the terrain.

Real

26. OpenPLX → AGX: Mapping Guide

26.1. Scope

A guide to the OpenPLX types and attributes supported by AGX. The mappings below describe simulator support, which can be narrower than the bundle’s type system.

26.2. Accessing mapped AGX objects

After loading an OpenPLX model, use LoadResult.getAgxObjectMap() to find the AGX objects created from its OpenPLX objects. This provides access to the running simulation, for example to change a body’s mass or a gear’s damping. The object map looks up existing objects; it does not create or remap them.

First obtain an OpenPLX object from result.scene() using its path relative to that scene. For example, use robot.joint1.mate when the full object name is Scene.robot.joint1.mate. Pass that object to the map, rather than its name or UUID. Use objects from the same load result as the map.

The C++ API is findMapped<AgxType>(openplxObject). It returns an agx::ref_ptr<AgxType>; an empty reference means that no matching object of the requested type was found. Include the header defining the requested AGX type. Python exposes the named methods listed below instead of the C++ template.

26.2.1. Obtaining the object map

These examples assume that result is a successful return value from agxopenplx::load_from_file in C++, or agxOpenPLX.load_from_file in Python, and that the simulation remains alive. Check result.errors() before accessing the scene. The paths in the examples are illustrative; replace them with paths in your model.

#include <agxOpenPLX/AgxOpenPlxApi.h>
#include <agxOpenPLX/AgxObjectMap.h>
#include <openplx/Object.h>
#include <stdexcept>

auto scene = result.scene();
auto objectMap = result.getAgxObjectMap();

// Reused by the C++ examples below.
auto requireObject = [scene](const char* path) {
    auto object = scene->getObject(path);
    if (!object)
        throw std::runtime_error(path);
    return object;
};
scene = result.scene()
object_map = result.getAgxObjectMap()

# Reused by the Python examples below.
def require_object(path):
    obj = scene.getObject(path)
    if obj is None:
        raise RuntimeError(f"OpenPLX object not found: {path}")
    return obj

def require_mapped(ref, path):
    if not ref:
        raise RuntimeError(f"AGX object not found: {path}")
    return ref

Keep the returned references while using the objects. In Python, .get() accesses the underlying AGX object. Acquire a new map and new object references after reloading the scene.

26.2.2. Rigid bodies and mass properties

Map the Physics3D.Bodies.RigidBody instance, such as a tool body, to agx::RigidBody. Mass and inertia are properties of this AGX body; the OpenPLX inertia object is not a separate AGX rigid body.

#include <agx/RigidBody.h>

auto body = objectMap->findMapped<agx::RigidBody>(
    requireObject("robot.tool"));
if (!body || !body->getMassProperties()->setMass(12.0))
    throw std::runtime_error("Unable to set tool mass");
body_ref = require_mapped(
    object_map.findMappedRigidBody(require_object("robot.tool")),
    "robot.tool")
if not body_ref.get().getMassProperties().setMass(12.0):
    raise RuntimeError("Unable to set tool mass")

setMass also scales the inertia tensor with the mass change. If a tool’s mass distribution changes, update its center of mass and inertia tensor as well.

26.2.3. Contact geometries

An OpenPLX contact geometry maps to agxCollide::Geometry. Its collision shape is accessed through that geometry. Visual geometries do not have this mapping.

#include <agxCollide/Geometry.h>

auto geometry = objectMap->findMapped<agxCollide::Geometry>(
    requireObject("robot.tool.contact_geometry"));
if (!geometry)
    throw std::runtime_error("Tool contact geometry was not mapped");
geometry->setEnableCollisions(false);

Python provides findMappedGeometry overloads for OpenPLX Sphere, Box and Cylinder contact geometries:

# Each path names a contact geometry of the indicated type.
for path in ("ball.sphere", "crate.box", "roller.cylinder"):
    geometry_ref = require_mapped(
        object_map.findMappedGeometry(require_object(path)), path)
    geometry_ref.get().setEnableCollisions(False)

26.2.4. Mates and constraints

Map the mate itself, for example robot.joint1.mate, rather than the robotics joint system containing it. Request agx::Constraint to accept different constraint implementations, or a concrete type when that type is required. For example, a hinge configured with clearance can map to a slack hinge instead of agx::Hinge.

#include <agx/Constraint.h>
#include <agx/Hinge.h>

auto constraint = objectMap->findMapped<agx::Constraint>(
    requireObject("robot.joint1.mate"));
if (!constraint)
    throw std::runtime_error("Joint mate was not mapped");
constraint->setEnableComputeForces(true);

// Use a concrete type only when the model produces that type.
auto hinge = objectMap->findMapped<agx::Hinge>(
    requireObject("robot.joint1.mate"));
if (hinge) {
    const auto angle = hinge->getAngle();
    // Use angle in the application.
}

Python provides findMappedConstraint overloads for OpenPLX Hinge, Prismatic, Lock and Cylindrical interactions. They return agx.ConstraintRef:

for path in ("hinge", "prismatic", "lock", "cylindrical"):
    constraint_ref = require_mapped(
        object_map.findMappedConstraint(require_object(path)), path)
    constraint_ref.get().setEnableComputeForces(True)

For a known regular hinge, constraint_ref.get().asHinge() gives access to hinge-specific methods. Check the downcast before using it.

26.2.5. Motors, springs and ranges (C++)

One OpenPLX interaction can produce both an AGX constraint and a secondary controller. Select the controller’s type when changing its operating value. The following examples cover Physics3D.Interactions.TorqueMotor, LinearSpring and RotationalRange, respectively:

#include <agx/ElementaryConstraint.h>

auto motor = objectMap->findMapped<agx::TargetSpeedController>(
    requireObject("robot.disturbanceTorque1"));
if (!motor)
    throw std::runtime_error("Torque motor was not mapped");
// Equal lower and upper bounds prescribe a torque in Nm.
motor->setForceRange(5.0, 5.0);

auto spring = objectMap->findMapped<agx::LockController>(
    requireObject("suspension.spring"));
if (!spring)
    throw std::runtime_error("Spring controller was not mapped");
spring->setPosition(0.25);

auto range = objectMap->findMapped<agx::RangeController>(
    requireObject("robot.joint1.range"));
if (!range)
    throw std::runtime_error("Range controller was not mapped");
range->setEnable(false);

Physics3D force and velocity motors also use agx::TargetSpeedController. This does not imply that a DriveTrain.TorqueMotor maps to the same type. For normal control of actuators, the OpenPLX signal/control interfaces provide their declared inputs, such as torque_input, without requiring AGX-specific lookups.

26.2.6. Drivetrain units and connectors

Drivetrain bodies map to powerline units, while couplings such as gears map to powerline connectors. In C++, request the appropriate concrete type:

#include <agxDriveTrain/Shaft.h>
#include <agxDriveTrain/Gear.h>

auto shaft = objectMap->findMapped<agxDriveTrain::Shaft>(
    requireObject("robot.joint1.drive_train.motor_shaft"));
if (!shaft)
    throw std::runtime_error("Motor shaft was not mapped");
const auto angularVelocity = shaft->getAngularVelocity();

auto gear = objectMap->findMapped<agxDriveTrain::Gear>(
    requireObject("robot.joint1.drive_train.gear"));
if (!gear)
    throw std::runtime_error("Gear was not mapped");
const auto ratio = gear->getGearRatio();

A DriveTrain.FlexibleGear maps to agxDriveTrain::HolonomicGear. For LinearElastic flexibility with nonzero stiffness k, the mapper sets compliance to 1 / k. Both MechanicalDamping and ConstraintRelaxationTimeDamping map to attenuation using the simulation time step. The mapper calls the inherited setAttenuation(attenuation); the native gear stores this dimensionless attenuation directly. An ideal gear keeps zero compliance and uses attenuation 2 by default.

New archives store attenuation. Archives from before the general attenuation change convert damping time with attenuation = damping_time / saved_time_step. The conversion uses the timestep saved in the scene, even when loading without restoring the simulation timestep. Raw legacy storage streams require the caller to supply that saved timestep through StorageStream::RestoreLegacy.

Python exposes this lookup as findMappedFlexibleGear. Keep the returned agxDriveTrain.HolonomicGearRef and use .get() to access the gear:

gear_model = require_object("robot.joint1.drive_train.gear")
gear_ref = require_mapped(
    object_map.findMappedFlexibleGear(gear_model),
    "robot.joint1.drive_train.gear")
compliance = gear_ref.get().getViscousCompliance()
attenuation = gear_ref.get().getAttenuation()

26.2.7. Flexible bodies and component ports

Flexible bodies inherit Physics3D.Bodies.Flexible.Body and its physical material. MachineModeling.Components.Primitive.Base.body can become a rigid body or a concrete flexible body type. Keep component ports as references to body connectors, or redirect them to the appropriate body or rigid carrier.

26.2.7.1. Beams

Physics3D.Bodies.Flexible.Beam.Body maps to agxModel::Beam. kinematics.start and end define its initial span in body-local coordinates; up sets the cross-section orientation in that frame. kinematics.local_transform places the body in its owning system. Connectors, visuals and merge-selection planes use the authored body frame too.

The endpoints must be finite and distinct. up must be finite, nonzero and not parallel to the span. Span length comes from the endpoints, not a kinematics length attribute. Positive resolution specifies segments per metre: the segment count is max(1, ceil(span_length * resolution)). The cross-section and elastic material determine the physical beam.

For example, declare this beam inside a Physics3D.System:

beam is Physics3D.Bodies.Flexible.Beam.Body:
    kinematics.start: {-1, 0, 0}
    kinematics.end: {1, 0, 0}
    kinematics.up: {0, 0, 1}
    resolution: 8
    cross_section becomes Physics3D.Bodies.Flexible.Beam.CrossSection.Rectangular:
        width: 0.08
        height: 0.12
    visual is Visuals.Geometries.Box:
        size: {2, 0.08, 0.12}

26.2.7.2. Surface and volume meshes

The following types are relative to Physics3D.Bodies.Flexible:

  • Surface.Body uses kinematics.surface_mesh and kinematics.thickness. The mapper extrudes the triangle surface into a thin tetrahedral volume.

  • Volume.TetrahedronMesh.Body uses explicit vertices and tetrahedron indices in kinematics.mesh.

  • Volume.ConvexMesh.Body uses kinematics.volume_mesh. The mapper fills the convex hull with tetrahedra, filling in concavities. Apply AGX.ConvexDecomposition.VolumetricReduction to the source mesh to decompose it into hulls before filling and welding them.

Surface and convex-volume source meshes may be inline Physics3D.Geometries.TriMesh or ExternalTriMeshGeometry assets. Their scale and local transform are applied once. The body’s material supplies density and Young’s modulus; the source geometry’s material does not configure its elasticity. Surface/volume mapping currently does not apply material Poisson ratio or dissipation; beam mapping does support these properties.

Convex-volume mesh controls apply before the simulation starts:

  • kinematics.reduction.ratio is the target fraction of source triangles to retain, in (0, 1]. 1 bypasses simplification.

  • kinematics.reduction.aggressiveness is positive and controls the simplifier’s error-threshold progression. It has no effect at ratio 1.

  • Decomposition resolution controls voxelization, defaults to 50 and is clamped to 20–400. Higher values cost more time and memory.

  • kinematics.vertex_merge_distance is a nonnegative welding tolerance in metres, defaulting to 1.0e-6.

Decomposition and welding approximate a continuous volume; overlapping hulls are not globally remeshed. Excessive welding can collapse features, while insufficient welding can leave disconnected parts. Empty/disconnected results are rejected. Decomposition and triangle reduction require triangle indices; a single hull without reduction may use vertices alone.

26.2.7.3. Visuals and materials

Declare Visuals geometry on the flexible body to render it. The mapper skins it automatically; no skinning trait or separate skin-mesh reference is needed. Without an explicit visual, there is no normal visual representation. Physics debug rendering is separate. In particular, a convex volume does not automatically display kinematics.volume_mesh.

Visuals use body-local coordinates, with each node’s scale and transform applied once. Each visual’s material and supported visual-node material overrides control its appearance. The physical body material, or visual_material on the body alone, does not create or paint a skin. Multiple visual parts can have separate materials; a visual on an enclosing system is not skinned to its child.

Surface/volume skins bind to simulation tetrahedra; exterior vertices use the closest boundary triangle and a rotating rest offset. Exterior offsets do not stretch. Beam visuals follow bending and twist, with coarse triangles refined along the segments before binding. Cable skins interpolate segment frames; wire skins follow adaptive route frames without physical twist. An explicit Visuals.Geometries.Curve uses the tube renderer. Visuals do not change collision shapes, mass, stiffness or simulation topology; empty triangle meshes do not request a fallback visual.

Source examples in tests/agxOpenPLX/resources include flexible_beam_skin.openplx and the surface, convex and decomposed deformable_bunny*_on_box.openplx scenes. The bunnies declare a separate original-mesh visual independently of their simplified physics meshes.

26.2.7.4. Mate connectors

Ordinary beam connectors attach to the closest segment while retaining their exact body-local position and axes. No selection trait or distance tolerance is required; off-axis positions and points beyond the beam ends are supported.

For actual simulation-vertex attachment, use Physics3D.Interactions.ConnectorProperties.NearestVertex. This is optional on beams and required for surface, volume, cable and wire connectors:

# Declare inside the flexible body.
attachment is Physics3D.Interactions.MateConnector:
    with Physics3D.Interactions.ConnectorProperties.NearestVertex
    position: {0.02, 0, 0}
    max_distance: 0.001

The mapper resolves the nearest vertex once after assembly and discretization, using the connector’s body-local position. max_distance defaults to 1.0e-6 metres and must be finite and nonnegative. Out-of-range and equally near matches report mapper errors. Beam/cable vertices are segment endpoints; wire vertices are generated lumps, whose identities are retained when attached.

Surface and volume vertices support Ball, Distance and Lock mates. Lock gives the selected vertex six degrees of freedom and supports ConstantLockClearance; its orientation alone does not clamp a material patch. Beam, cable and wire attachments also support Hinge, Prismatic, Cylindrical, Universal and ConstantVelocity. Position/orientation, regularization, enable controls and force outputs follow the corresponding native mate mapping. Unsupported attachments report errors.

For unsupported surface/volume mates, SNAP a small rigid carrier to the body connector with a disabled positioning Lock, attach a non-collinear material patch to it with Merge, and redirect the active mate to the carrier’s port. tests/agxOpenPLX/resources/crane.openplx demonstrates this for volume booms. A SNAP-only mate uses enabled: false and enable_snap: true. Unsupported runtime attachments are then omitted; supported attachments remain mapped as disabled constraints and retain their enable controls.

26.2.8. Body merges

Physics3D.Interactions.Merge permanently attaches two or more rigid or flexible bodies listed in bodies. Selection is evaluated once after SNAP and discretization. Without a selection trait, the whole bodies participate. Unselected flexible portions remain deformable; a rigid body participates as a whole when its collision geometry intersects the selection, or its origin does if it has no geometry. At least two listed bodies must contribute.

pad_attachment is Physics3D.Interactions.Merge with Physics3D.Interactions.MergeSelection.HalfSpace:
    bodies: [pad, finger]
    plane: pad.attachment_plane

HalfSpace selects the negative side of a connector plane, including the plane. Its assembled position and main_axis define the point and normal. GeometryDistance instead selects points whose signed distance to geometry is at most max_distance. The selection reference participates only if listed in bodies. One selection trait is supported per merge.

Rigid participants use lock joints. Flexible nodes attach to the nearest rigid shape, or to selected nodes of the first participating flexible body by model-name order when no rigid participates. Offsets follow the material’s rotation. For particle vertices, offset attachments use distance joints to three independent nearby material points; coincident vertices use ball joints. Neighbouring vertices supporting an attachment remain dynamic. An offset particle attachment without three independent support directions is unsupported. The joints preserve assembled positions, topology and masses, without projecting nodes onto surfaces or introducing initial deformation. Generic curves require positive Radius and CurveResolution traits.

Nearest-target queries support boxes, spheres, cylinders, capsules, planes, convex meshes and triangle meshes. Signed-distance selection excludes non-convex triangle meshes. Rigid-region intersection supports convex shapes and half-space planes; negative thresholds support sphere, box, cylinder and capsule regions. Invalid or unsupported selections report mapper errors.

enabled: false omits the merge and its collision exclusions. Runtime unmerging is not supported. Active merges exclude collisions between their participating bodies through native collision groups in the target simulation; independent collision filters still apply. Selected wire lumps remain permanent, while unselected nodes remain adaptive.

The mapped object is a normal agxSDK::Assembly containing native constraints, available through AgxObjectMap::findMapped<agxSDK::Assembly>. Native constraints and simulation collision filters survive AGX save/restore without an OpenPLX-specific archive type. Mapping requires a target simulation. See data/openplx/models/Panda/Variants/PandaWithSoftPads.openplx for a complete robot example and tests/agxOpenPLX/resources/flexible_gripper_pad.openplx for a minimal attachment.

26.2.9. Assemblies and frames (C++)

A nested Physics3D.System maps to an agxSDK::Assembly. Transform objects map to agx::Frame: use the system’s local_transform, a body’s kinematics.local_transform or kinematics.local_cm_transform, or a contact geometry’s local_transform.

#include <agxSDK/Assembly.h>
#include <agx/Frame.h>
#include <agx/ObserverFrame.h>

auto robot = objectMap->findMapped<agxSDK::Assembly>(requireObject("robot"));
if (!robot)
    throw std::runtime_error("Robot assembly was not mapped");

auto toolFrame = objectMap->findMapped<agx::Frame>(
    requireObject("robot.tool.kinematics.local_transform"));
if (!toolFrame)
    throw std::runtime_error("Tool frame was not mapped");
const auto toolTransform = toolFrame->getMatrix();

auto observer = objectMap->findMapped<agx::ObserverFrame>(
    requireObject("robot.tool.tcp_connector"));
if (!observer)
    throw std::runtime_error("TCP connector has no observer frame");

The last lookup requires a mate connector that was mapped to an observer frame, for example by adding the .agx_observer_frame: true annotation. An ordinary mate connector’s internal constraint frame is not automatically available through this lookup. To obtain the root assembly directly, use result.assembly().

26.2.10. Sensors and terrain tools (C++)

Sensor lookups use the sensor logic object. For example, a Sensors.PulsedLidarLogic maps to an agxSensor::Lidar; the enclosing sensor body and its visual geometry are separate objects. A Terrain.Shovel maps to an agxTerrain::Shovel, which is a terrain tool instance, separate from its bucket rigid body.

#include <agxSensor/Lidar.h>
#include <agxTerrain/Shovel.h>

auto lidar = objectMap->findMapped<agxSensor::Lidar>(
    requireObject("robot.lidar.logic"));
if (!lidar)
    throw std::runtime_error("Lidar logic was not mapped");

auto shovel = objectMap->findMapped<agxTerrain::Shovel>(
    requireObject("shovel"));
if (!shovel)
    throw std::runtime_error("Shovel was not mapped");
shovel->setEnable(false);

These lookups require the corresponding sensor or terrain objects to have been created during loading. Not every object listed elsewhere in this mapping guide is indexed by AgxObjectMap. For example, retrieve a body’s mass properties through the body, and a collision shape or material through its geometry.

26.2.11. Camera optics and binary sensor outputs

Sensors.CameraLogic maps its lens to agxSensor::CameraLensSingleElement and a Sensors.Optics.CameraCMOSSensor to the CMOS photodetector. Supported lens properties include focal length, f-stop, manual focus or autofocus, and the illuminated image-circle radius. Unsupported photodetector types are reported as UnsupportedSensorConstruct errors.

Sensors.Optics.Lenses.Traits.LensDistortion supports Brown-Conrady, Kannala-Brandt, Usenko-Demmel and lookup-table distortion models. Lookup tables use floating-point textures: three channels for ray_enter_direction and two for ray_exit_position. Either table may be used on its own. The image domain is derived from the sensor size and focal length, which must be positive for this mapping.

Sensors.Optics.Lenses.Traits.LensDiaphragm supports a BladedDiaphragm or a TextureMaskedDiaphragm. The texture mask is a single-channel floating-point transmission map. Lens lookup tables and texture masks require a visuals mapper to decode their textures. Invalid data produces InvalidSensorConfiguration errors; unsupported constructs produce UnsupportedSensorConstruct errors. Review load errors rather than assuming the requested lens feature was applied.

Sensor output signals carry binary data through openplx::DetachedBlob. Interpret the payload using the output’s declared fields, channel type, resolution and units. The payload is not a BlobStore handle. Camera color, depth and stereo-depth outputs are separate configurations; consult tests/agxOpenPLX/resources/sensors_color_camera.openplx, sensors_depth_camera.openplx and sensors_stereo_depth_camera.openplx.

26.2.12. Python lookup methods

The currently exposed Python methods are:

Method

OpenPLX input type

Return type

findMappedRigidBody

Physics3D.Bodies.RigidBody

agx.RigidBodyRef

findMappedGeometry

Physics3D.Geometries.Sphere, Box, Cylinder

agxCollide.GeometryRef

findMappedConstraint

Physics3D.Interactions.Hinge, Prismatic, Lock, Cylindrical

agx.ConstraintRef

findMappedFlexibleGear

DriveTrain.FlexibleGear

agxDriveTrain.HolonomicGearRef

Other C++ findMapped<T> instantiations are not exposed as Python methods. An unsupported Python argument type raises an overload/type error; a supported argument without a matching AGX object returns an empty reference.

26.2.13. Runtime updates and lookup modes

Changing an OpenPLX object with setDynamic does not automatically update the already mapped AGX mass, stiffness or damping. Apply runtime parameter changes to the AGX object, or use an OpenPLX input supported by the signal/control interface. AGX setters likewise do not write the new values back to the OpenPLX objects. Apply updates on the simulation thread between steps, or while simulation stepping is otherwise synchronized.

Prefer the map supplied by LoadResult. It includes the assembly, powerline and sensor environment used during loading. The default lookup mode uses UUIDs derived from the OpenPLX object’s UUID and type, so the OpenPLX UUID string should not be assumed to equal the AGX UUID string.

When working with an existing assembly instead, a map can be created explicitly. For name-based lookup, the AGX names must match the full names returned by the corresponding OpenPLX objects’ getName():

auto nameMap = agxopenplx::AgxObjectMap::create(
    result.assembly(), result.power_line(), nullptr,
    agxopenplx::AgxObjectMapMode::Name);

This example includes drivetrain objects but omits sensors. Supply their agxSensor::Environment* as the third argument when needed. Transform agx::Frame entries are indexed only in UUID mode. Recreate an explicitly built map when adding objects that need to be indexed.

26.3. Core object / ID / transform mapping

OpenPLX

AGX

Notes

Object::getName()

agx::Name

The name of an object in AGX is generally the full OpenPLX name including all namespaces with dot separation.

.uuid

getUuid()

AGX UUIDs are derived from the OpenPLX UUID, type and mapped role. One OpenPLX object may produce several AGX objects; use AgxObjectMap instead of assuming identical UUID strings.

Math::AffineTransform

agx::AffineMatrix4x4

mapLocalTransform writes the local transform on assemblies, bodies and geometries.

System / RigidBody / contact Geometry

agxSDK::Assembly / agx::RigidBody / agxCollide::Geometry

Systems map to assemblies containing their bodies and geometries. Flexible bodies use beam, cable, wire or deformable objects rather than one rigid body.

MateConnector

agx::Frame / agx::ObserverFrame

Pose computed from main axis/normal/position; observer frames preserved for AGX-imported connectors.

26.4. Bodies & mass properties

OpenPLX Physics3D::Bodies::RigidBody

AGX agx::RigidBody

Notes

Physics3D::Bodies::RigidBodyKinematics

Kinematics declaration for rigid bodies. Container of velocities and transforms.

Physics3D::Bodies::Inertia

Inertia declaration for rigid bodies. Contains scalar mass and inertia tensor.

is_dynamic is Bool

RigidBody::MotionControl

is_dynamic: True → DYNAMICS; otherwise KINEMATICS.

inertia.mass()

MassProperties::setMass

Negative mass → error. Auto-generate if not given.

inertia.tensor()

MassProperties::setInertiaTensor

CM rotation applied to tensor; SPD validation.

kinematics.local_transform

RigidBody::getFrame()->setLocalMatrix

Local transform relative owning system.

kinematics.local_cm_transform

RigidBody::getCmFrame()->setLocalMatrix

Local CM transform relative the local transform. In AGX the rotation must match model frame. Keep identity rotation!

kinematics.initial_local_linear/angular_velocity

setVelocity / setAngularVelocity

The local OpenPLX velocities will be transformed to world in AGX.

26.5. Geometry (contact shapes & attributes)

OpenPLX

Attributes

AGX mapping

Notes

ContactGeometry

material is Physics::Geometries::Material, local_transform is Math.AffineTransform, enable_collisions is Bool, include_in_mass_properties is Bool

agxCollide::Geometry with one or more agxCollide::Shape objects

Convex decomposition places all resulting hulls in one geometry.

Box

size is Math::Vec3

agxCollide::Box

Size mapped with 0.5 factor per axis for half-extents.

Cylinder

radius is Real, height is Real

agxCollide::Cylinder

The Y axis is the default cylinder axis in AGX.

Capsule(r,h)

radius is Real, height is Real

agxCollide::Capsule

The Y axis is the default capsule axis in AGX.

Sphere

radius is Real

agxCollide::Sphere

ConvexMesh

vertices is Math.Vec3[]

agxCollide::Convex

Built via agxUtil::ConvexReaderWriter.

TriMesh

vertices is Math.Vec3[], indices is Int[]

agxCollide::Trimesh or agxCollide::Convex shapes

Built via TrimeshReaderWriter unless convex decomposition is requested.

ExternalTriMeshGeometry

path is String, scale is Math.Vec3

agxCollide::Trimesh or agxCollide::Convex shapes

Use an OpenPLX asset path such as @"meshes/tool.obj"; the loader resolves it relative to its source. Scale is applied to the source mesh. Convex decomposition is also available.

26.5.1. Volumetric convex decomposition

Add AGX.ConvexDecomposition.VolumetricReduction to a Physics3D.Geometries.TriMesh or ExternalTriMeshGeometry contact geometry to replace its triangle mesh collision shape with convex hulls. AGX uses agxUtil::ConvexReaderWriter::createConvexDecomposition and places all hulls in one agxCollide::Geometry. That geometry retains the source contact material, local transform, and collision settings.

Scene is Physics3D.System:
    bunny is Physics3D.Geometries.ExternalTriMeshGeometry with AGX.ConvexDecomposition.VolumetricReduction:
        path: @"bunny.obj"
        resolution: 60

resolution is the voxel count per axis, clamped to 20–400; its default is 50. A higher value can preserve smaller features at the cost of more time and memory. The scale attribute of an external mesh is applied before decomposition.

26.5.2. Visual meshes and binary data

Physics geometry and Visuals.Geometries have separate roles. The visuals mapper accepts primitive visual shapes, external triangle meshes, Base64TriMeshGeometry and BlobTriMeshGeometry. These create render meshes, not contact geometry or mass. On a flexible body, these explicit visuals use the skinning paths described above.

Visuals.Geometries.BlobTriMeshGeometry stores binary mesh data through handles into the load context’s BlobStore. Index data must match numIndices, contain complete triangles and reference valid vertices; position data must match numVertices. Missing storage and malformed mesh data produce InvalidBlobMesh errors. Normal loading APIs preserve the context needed to resolve these handles. If calling map_to_agx on an already loaded scene, use its context-aware overload with the original OpenPlxContext when the scene contains blob-backed assets.

Texture data supports unsigned-byte and 32-bit floating-point channels. Channel swizzling preserves complete channel elements, including floats. Texture sampling properties are separate from the encoded pixel data. Camera lens lookup tables and aperture masks use these same texture-decoding paths.

26.6. Materials & surface contact

OpenPLX

AGX

Notes

Physics::Geometries::Material

agx::Material

Name/UUID; density → BulkMaterial::setDensity.

LinearElasticMaterial

BulkMaterial::setYoungsModulus

Supplies Young’s modulus in addition to density. Flexible bodies also configure their native elastic properties from the body material where supported.

OpenPLX

Alternatives

AGX mapping

Notes

SurfaceContact.Model

Configurable with attributes listed below.

agx::ContactMaterial

Created per material pair in AGX, with normal and tangential restitution.

normal_flexibility

LinearElastic, Rigid, PatchElasticity, PointwiseElasticity

stiffness attribute of LinearElastic maps to agx::ContactMaterial::setYoungsModulus

PatchElasticity enables “contact area approach”.

dissipation

MechanicalDamping, ConstraintRelaxationTimeDamping

ContactMaterial::setAttenuation

Mechanical damping: damping_constant / (stiffness * time_step) for nonzero linear elastic stiffness. Constraint relaxation time: relaxation_time / time_step.

friction

DryConeFriction, DryBoxFriction, DryScaleBoxFriction, DryConstantNormalForceFriction, DryDepthScaledConstantNormalForceFriction.

agx::FrictionModel

agx_friction_solve_type & agx_approximate_cone_friction annotations respected; Traits.OrientedFriction in the Physics3D bundle need reference_body/reference_geometry + primary_direction.

clearance

ConstantDistanceClearance and ConstantAngleClearance

ConstantDistanceClearance maps to adhesiveOverlap in SurfaceMaterial::setAdhesion(force, adhesiveOverlap)

Mate clearances are configured separately on the interaction, not through its surface contact model.

normal_restitution

A non zero scalar value.

setRestitution

Restitution in the direction of a contact normal.

tangential_restitution

A non zero scalar value.

setTangentialRestitution, OpenPLX value will be set in both primary and secondary direction.

Restitution orthogonal to the contact normal. Not mapped to support a different restitution in the secondary direction.

26.7. Interactions & constraints

An agx::Constraint is created using frames computed from its mate connectors and their rigid bodies or resolved flexible-body nodes. Each constrained DOF’s compliance and attenuation are set from the corresponding OpenPLX flexibility/dissipation component (see below). Friction controllers on supported constraints are configured from OpenPLX friction. friction may become DefaultDryFriction, AsymmetricLimitFriction or ConstantLimitFriction. The latter two set agx::FrictionController::setMinimumStaticFrictionForceRange.

Names are propagated and UUIDs are derived for the mapped objects.

OpenPLX

Notes on Attributes

AGX mapping

DOFs & extras

Physics3D::Interactions::Hinge

Slack variant if clearance becomes ConstantHingeClearance.

agx::Hinge or agx::SlackHingeJoint

Free to rotate around the main_axis

Physics3D::Interactions::Prismatic

Slack if clearance becomes ConstantPrismaticClearance

agx::Prismatic or agx::SlackPrismaticJoint

Free to move along the main_axis

Physics3D::Interactions::Cylindrical

Slack variant if clearance becomes ConstantCylindricalClearance

agx::CylindricalJoint or agx::SlackCylindricalJoint

Free to move along and rotate around the main_axis

Physics3D::Interactions::Ball

No slack version. No mapping of ranges implemented.

agx::BallJoint

Free to rotate around all axes.

Physics3D::Interactions::Lock

Slack variant if clearance becomes ConstantLockClearance;

agx::LockJoint or agx::SlackLockJoint

Selected flexible vertex bodies are promoted to six degrees of freedom.

Physics3D::Interactions::Distance

No slack version. No mapping of distance range or distance motor implemented.

agx::DistanceJoint

Constrained to keep the distance between the mate connectors, otherwise free to move.

Physics::KinematicLock(bodies)

Add all rigid bodies you like to merge to the bodies array of the KinematicLock.

agx::MergedBody

Bodies merged via agx::MergedBody::EmptyEdgeInteraction.

Physics3D::Interactions::Merge

Rigid and flexible participants; optional spatial selection.

agxSDK::Assembly containing native attachment constraints

Preserves assembled offsets and flexible topology. See Body merges above.

26.8. Regularization parameters

Most OpenPLX interactions, including mates and surface contact models, have attributes for flexibility and dissipation which map to compliance and dimensionless attenuation in AGX. The OpenPLX models are designed so that if the attributes does not become anything, the parameters will get the default AGX values. The attributes are unique for each mate, listing one parameter for each degree of freedom (DOF). Generally the local axes of a mate use the naming convention of the mate connectors, which are main, normal and cross. Each regularization parameter is defined either around or along one of these axes.

  • flexibility alternatives:

    • Rigid → compliance set to machine-epsilon (nearly rigid).

    • LinearElastic(stiffness) → compliance = 1/stiffness. stiffness == 0 → kill DOF (force range 0).

  • dissipation alternatives:

    • MechanicalDamping(damping_constant) requires nonzero LinearElastic(stiffness) flexibility and maps directly to attenuation = damping_constant / (stiffness * time_step).

    • ConstraintRelaxationTimeDamping(relaxation_time) maps to attenuation = relaxation_time / time_step without requiring elastic stiffness. Beam material dissipation uses the same conversion.

    • The legacy agx_relaxation_time annotation is ignored. Unsupported dissipation leaves the AGX attenuation unchanged.

26.9. Controllers: motors, ranges, springs (1-DOF controller constraints)

OpenPLX interactions also include springs, motors and ranges. These map to AGX controller constraints. Each controlling one degree of freedom with the possibility to declare regularization parameters.

OpenPLX

AGX

Notes

RotationalVelocityMotor / LinearVelocityMotor

agx::TargetSpeedController via SingleControllerConstraint1DOF

gain > 0 → compliance = 1/gain; target_speed; enabled flag; force range from min_effort, max_effort; zero_speed_as_spring locks at zero and applies spring flex/dissipation.

TorqueMotor / ForceMotor

Maps to agx::TargetSpeedController in AGX.

Controlled in runtime by updating the force range with required_effort = min = max.

RotationalRange / LinearRange

agx::RangeController

Range [start,end], force range, enable, flexibility and dissipation attributes.

TorsionSpring / LinearSpring

agx::LockController

Position/angle set; force range; enable; flexibility and dissipation attributes.

Annotation agx_imported_controller_constraint

Reuse existing AGX constraint’s motor/range/lock

Present when importing an .agx file, looks up constraint by UUID and attaches controller to the correct DOF.

Annotation agx_solve_type for an OpenPLX Interaction

Constraint::setSolveType

DIRECT / DIRECT_AND_ITERATIVE / ITERATIVE.

26.10. Environment, collisions & signals

OpenPLX

AGX

Notes

Simulation::Environment.gravity

UniformGravityField or PointGravityField

Vector or center+magnitude mapped.

Simulation::CollisionGroup

Geometry/group assignment

Assigns explicit contact geometries and mapped rigid/flexible bodies; systems includes nested systems. Generated flexible geometries inherit the group.

Simulation::DisableCollisionPair

space->setEnablePair(g1,g2,false)

Applied recursively in disableCollisionPairs.

Physics3D::Signals::MateConnector::Output

ObserverFrame(s)

Ensures frames exist for source and relative connectors (world excluded).

Both CollisionGroup.bodies and CollisionGroup.systems support beams, cables, wires, surfaces and volumes. Groups are registered on mapped flexible objects so geometries generated during initialization or adaptive refinement inherit them. To disable all internal collisions in a machine while preserving external collisions, declare the following inside its system:

self_group is Simulation.CollisionGroup:
    systems: [this]
disable_self_collision is Simulation.DisableCollisionPair:
    group1: self_group
    group2: self_group

Use bodies: [body_a, body_b] to restrict the group to selected rigid or flexible bodies. A group assignment alone does not disable collisions; a DisableCollisionPair must reference it.

26.11. Friction on constraints (non-contacts)

OpenPLX

AGX

Notes

Interactions::*::friction()

Constraint…::getFrictionController

Dry/limit frictions converted to coefficient or static force ranges; controller disabled if unsupported in PLX side.

26.12. Annotations reference

  • Controller reuse: agx_imported_controller_constraint (UUID of an AGX constraint to attach to).

  • Constraint solve: agx_solve_type (DIRECT, DIRECT_AND_ITERATIVE, ITERATIVE).

  • Friction solve: agx_friction_solve_type (DIRECT, SPLIT, DIRECT_AND_ITERATIVE, ITERATIVE) + agx_approximate_cone_friction (boolean).

  • Oriented friction: reference_body / reference_geometry + primary_direction (Vec3).

  • Terrain material: agx_terrain_material (string).

  • Observer frames: agx_observer_frame / agx_debug_render_frame on MateConnectors.

  • Track-specific: agx_track_*, agx_set_* (see Tracks table).

26.13. Errors when loading a model

When you load an OpenPLX model in agxViewer, AGX checks whether its definitions can form a valid simulation. A model with valid OpenPLX syntax can still contain physical or connection errors. These are printed in the terminal with a source location and an explanation.

Typical errors include:

  • Negative mass or invalid inertia tensors.

  • Missing connected bodies or misplaced MateConnectors.

  • Duplicate material pairs or invalid friction frames.

  • Missing or invalid mesh data.

  • Unsupported flexible-body mate attachments or Merge selections.

For a flexible-body mate or Merge, the message names the interaction and explains why the attachment or selection failed. Use the reported location and object name to find the relevant definition, correct it, and reload the model. Also review warnings during loading: some unsupported configurations are skipped, which can leave the scene incomplete.