importScene
Description
importScene(
imports data from a file specified by rrApp
,filename
,formatname
)filename
into the currently open
scene. The specified file must be in a format RoadRunner supports.
importScene(
sets options for import using the rrApp
,filename
,formatname
,importoptions
)importoptions
argument.
Examples
Import Scene from ASAM OpenDRIVE® File to RoadRunner
Open a project in RoadRunner using the roadrunner
function by specifying the location in which to create a project. This example assumes that RoadRunner is installed in its default location in Windows.
Specify the path to an existing project. For example, this code shows the path to a project located on C:\RR\MyProject
. The function returns a roadrunner
object, rrApp,
that provides functions for performing basic workflow tasks such as opening, closing, and saving scenes and projects.
projectFolder = "C:\RR\MyProject";
rrApp = roadrunner(projectFolder);
Open a new scene in the current project. The newScene
function opens a blank scene in the currently open project.
newScene(rrApp);
Set import options by creating an openDriveImportOptions
object that disables the import of signals and objects from the file.
options = openDriveImportOptions(ImportSignals=false,ImportObjects=false);
Specify the path to an ASAM OpenDRIVE file. Then, use the importScene
function to import data from the specified ASAM OpenDRIVE file into the blank open scene.
filename = "C:\RR\MyProject\Exports\FourWaySignal.xodr"; formatname = "OpenDRIVE"; importScene(rrApp,filename,formatname,options);
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 into RoadRunner
character vector | string scalar
Path of file to import into RoadRunner, specified as a character vector or string scalar. This argument specifies
the absolute or relative file path of the file to import. If you specify a relative
path, then the path is relative to the Assets
folder of the current
project.
Example:
importScene(rrApp,"C:\RR\MyProject\Exports\FourWaySignal.xodr","OpenDRIVE",options)
,
"C:\RR\MyProject\Exports\FourWaySignal.xodr"
represents the
absolute file path of the file to be imported.
Data Types: char
| string
formatname
— Import format name
character vector | string scalar
Import format name, specified as a character vector or string scalar. This value must correspond to a valid import format supported by RoadRunner. Format name options are case-insensitive. RoadRunner supports only ASAM OpenDRIVE® format.
Example: importScene(rrApp,"FourWaySignal.xodr","OpenDRIVE",options)
"OpenDRIVE"
specifies that the imported file
FourWaySignal.xodr
is in the ASAM OpenDRIVE format.
Data Types: char
| string
importoptions
— Import options configuration
valid export options object
Import options configuration, specified as one of the import options objects
compatible with the file specified in the filename
argument.
Supported objects are:
openDRIVEImportOptions
roadrunnerHDMapImportOptions
Import Formats | Description | Properties | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
openDriveImportOptions | Options for importing ASAM OpenDRIVE files into RoadRunner scene.
If a default property value is |
Example: | ||||||||||||||
laneImportOptions |
If a default property value is |
Example:
| ||||||||||||||
projectionImportOptions |
If a default property value is
|
Example:
| ||||||||||||||
roadrunnerHDMapImportOptions | Options for importing RoadRunner HD Map files into RoadRunner scene.
If a default property value is |
Example:
| ||||||||||||||
roadrunnerHDMapLoadOptions | Options for loading RoadRunner HD Map files into RoadRunner scene.
If a default property value is |
Example:
| ||||||||||||||
roadrunnerHDMapBuildOptions | Options for building RoadRunner HD Map files into RoadRunner scene.
If a default property value is |
Example:
| ||||||||||||||
autoDetectBridgesOptions | Options for auto detecting bridges.
If a default property value is |
Example:
|
Version History
Introduced in R2022a
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
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)