CollisionUtility
Description
The CollisionUtility object is a programmatic representation of
the Collision Authoring
Tool (RoadRunner Scenario) from RoadRunner Scenario. Use a CollisionUtility object to configure the attributes of
the Collision Authoring Tool that specify the location collision points between
two vehicle actors.
You can use a CollisionUtility object with the
roadrunner.extensions.setupCollision function to run collision analysis
computations with MATLAB®. RoadRunner Scenario uses the computation results to automatically adjust the timing of the scenario
so that the collision happens at the specified point during simulation. By designing precise
collision scenarios, you can study timing-critical interactions between vehicles, and use the
results to validate safety features.
To use this object, you must have these products installed:
Automated Driving Toolbox™ R2026a or later
Automated Driving Toolbox Test Suite for Euro NCAP® Protocols support package
For details on the Automated Driving Toolbox Test Suite for Euro NCAP Protocols support package, see Automated Driving Toolbox Test Suite for Euro NCAP Protocols. For information on how to get and install support packages, see Get and Manage Add-Ons.
Creation
To return the CollisionUtility object that represents the
Collision Authoring Tool in your RoadRunner scenario, extract the CollisionUtility property of your
Scenario object and assign it
to a variable. For example, given the Scenario object
scnro, collisionUtil = scnro.CollisionUtility creates
the CollisionUtility object collisionUtil.
Properties
Examples
Limitations
The Collision Authoring Tool supports only two actors at a time.
The Collision Authoring Tool supports scenario logic that contains only these actions, conditions, and attributes for each actor:
A
Waitaction with an associatedDurationcondition preceding theInitialize Speedaction.The
Initialize Speedaction must have the Relative to attribute set to eitherAbsoluteorWaypoint Time Data.
Both actors must have defined paths that intersect at least once. The Collision Authoring Tool does not support actors that use the built-in lane-following behavior.
Both actors must have a speed value greater than 0. The Collision Authoring Tool does not support collision scenarios with static actors.
The Collision Authoring Tool does not update the collision analysis results if you change the scenario after MATLAB runs the collision analysis computations. If you modify the scenario after performing an initial collision analysis, you must run the computation again by clicking Run in MATLAB.
The Collision Authoring Tool does not support collision scenarios that have elevation differences between the two actors. To enable accurate collision analysis, the z-axis values of your actors and path waypoints must match.
Scenarios with roads that have banked angles or superelevation might cause inaccurate collision results.
Collision analysis does not support actors with more than two logic phases in the Logic editor.
Collision analysis does not support collisions between actors with Heading values at 0 or 180 degrees, such as head-on collisions.
Because RoadRunner Scenario uses a fixed-step simulation solver, the timing of collision scenarios might be inaccurate at greater step sizes. To increase collision accuracy, reduce the Step Size value of the Simulation Properties to the
Recommended StepSizevalue in the collision analysis results.The Collision Authoring Tool does not support actors that have attachments, such as trucks with trailers.
Collision analysis does not support vehicle actors with assets that have a Forward Offset value other than 0. To check if an actor asset has a supported Forward Offset value, select the asset for the vehicle actor in the Library Browser. Then, in the Attributes pane, in the Vehicle Parameters section, verify that the Forward Offset value is 0.

Version History
Introduced in R2026a
See Also
roadrunnerAPI | addActor | addPoint | createSimulation | ScenarioSimulation
Topics
- Collision Authoring Tool (RoadRunner Scenario)
- Path Editing (RoadRunner Scenario)