importScenario
Syntax
Description
importScenario(
imports an ASAM OpenSCENARIO® file or a CSV file trajectory into the currently open scenario.rrApp
,filename
,formatname
)
importScenario(
sets options for import using rrApp
,filename
,formatname
,importoptions
)importoptions
.The import options
configuration is specified as one of the import options objects compatible with the file
specified in the filename
argument. You can import only CSV trajectory
files.
Input Arguments
rrApp
— RoadRunner application
roadrunner
object
RoadRunner application associated with a project, specified as a
roadrunner
object. This object provides functions
for performing common workflow tasks such as opening, closing, and saving scenes and
projects. rrApp
provides functions that support importing data from
files and exporting scenes to other formats from RoadRunner.
filename
— Path of file to import
character vector | string scalar
Path of the file to import, specified as a character vector or string scalar.
filename
is the absolute or relative path to the file to be
imported. If you specify a relative path, then you must specify a path to a file in the
Assets
folder of the current project.
Example: importScenario(rrApp,"C:\RR\MyProject\Assets\FourWaySignal.xosc","OpenSCENARIO")
,
imports the file FourWaySignal.xosc
from the
Assets
folder of the current project.
Data Types: char
| string
formatname
— Import format name
"OpenSCENARIO"
| "CSV Trajectory"
Import format name, specified as "OpenSCENARIO"
or "CSV
Trajectory"
. Format name options are case-insensitive.
"OpenSCENARIO"
— Import an ASAM OpenSCENARIO file"CSV Trajectory"
— Import a vehicle trajectory from a CSV file
Example: importScenario(rrApp,"C:\RR\MyProject\Assets\FourWaySignal.xosc","OpenSCENARIO")
,
specifies that the file to be imported, FourWaySignal.xosc
, is in the
ASAM OpenSCENARIO format.
Data Types: char
| string
importoptions
— Import options configuration
importoptions
object
Import options configuration, specified as one of the import options objects
compatible with the file specified in the filename
argument. This
argument specifies the options that can be used with import. Only
csvTrajectoryImportOptions
object is supported.
Import Format Options Object | Description | Properties | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
csvTrajectoryImportOptions | Specifies options for importing RoadRunner scene and scenario to CSV trajectories.
|
Example: | ||||||||||
actorImportOptions | Specifies options for importing actors with CSV Trajectory.
|
Example: |
Data Types: char
| string
Version History
Introduced in R2022a
See Also
roadrunner
| exportScenario
| close
Topics
- RoadRunner Scenario Fundamentals (RoadRunner Scenario)
- Simulate a RoadRunner Scenario Using MATLAB Functions
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)