Main Content

ExternalPlatform

Specify external platform

Since R2025b

    Description

    The ExternalPlatform object represents the platform of a behavior asset defined in an external platform, such as CARLA. The ExternalPlatform object enables you to specify a behavior file defined in CARLA to associate to a BehaviorAsset in your RoadRunner scenario. For more information on cosimulating scenarios with CARLA, see CARLA Cosimulation Workflow (RoadRunner Scenario).

    Creation

    To create an ExternalPlatform object, use the setPlatform function and specify the platformType argument as "ExternalPlatform".

    For example, given the BehaviorAsset object extBehavior, specifying extPlatform = setPlatform(extBehavior,"ExternalPlatform"); creates an ExternalPlatform object, extPlatform, and assigns it to the Platform property of extBehavior.

    To associate the ExternalPlatform object with a behavior file, you must set the ModelLocation property. The specified behavior file must originate from CARLA.

    Properties

    expand all

    Name of the external platform of the behavior file, specified as "CARLA". RoadRunner supports only CARLA as an external platform for behavior assets.

    Path to the behavior file, specified as a string scalar or character vector. You can specify an absolute path or a path relative to the Assets folder of your RoadRunner project.

    Because behavior assets in RoadRunner Scenario must be .rrbehavior files, you must associate a CARLA-authored file to a behavior asset to use it in your scenario. After creating an ExternalPlatform object associated with a BehaviorAsset object, which represents a RoadRunner behavior asset, specify the ModelLocation property of the ExternalPlatform object as the location of the CARLA behavior file. The behavior file for the ExternalPlatform object must be of the .py file type.

    Example: extPlatform.ModelLocation = "Behaviors/myCustom_Behavior.py"; specifies for RoadRunner to use myCustom_Behavior.py for the behavior file.

    Version History

    Introduced in R2025b