get
Description
returns the value of the specified parameter Output = get(ScenarioSim,Param)Param from a scenario
simulation ScenarioSim at run-time.
Examples
Create a roadrunner object to launch the RoadRunner application, and open the project at the specified project location.
rrApp = roadrunner("C:\Project\TestHighwayRoute");Open the scenario file TrajectoryCutIn.rrscenario that is
included with the RoadRunner Scenario application.
openScenario(rrApp,"TrajectoryCutIn");Create a ScenarioSimulation object rrSim.
rrSim = createSimulation(rrApp);
Get the current simulation status.
simstatus = get(rrSim,"SimulationStatus");
Get the log data history associated with the simulation.
simLog = get(rrSim,"SimulationLog");Get the ActorSimulation objects corresponding to all actors in the scenario.
actors = get(rrSim,"ActorSimulation");Get an ActorSimulation object from the scenario by using the handle
to the Simulink® model that specifies the behavior of this actor.
actorsim = get(rrSim,"ActorSimulation","SimulinkModel",mdHdl);
Get an ActorSimulation object by using the System object™ that represents its run-time behavior. This operation is possible only if
an actor is already associated with a MATLAB®
System object.
actorsysobj = get(rrSim,"ActorSimulation","SystemObject",obj);
Get a specific actor using its corresponding ActorModel object
name.
actormod = get(rrSim,"ActorSimulation","ActorModel",actorModel);
Retrieve all the sensors from the simulation.
sensors = get(rrSim,"SensorSimulation");Input Arguments
RoadRunner Scenario simulation, specified as a ScenarioSimulation object.
Example: ScenarioSim
Scenario simulation parameter, specified as one of these values:
| Parameter | Description |
|---|---|
"StepSize" | Step size of simulation |
"MaxSimulationTime" | Maximum simulation time of scenario |
"PacerStatus" | Pacer status of simulation |
"SimulationPace" | Pace of simulation |
"SimulationStatus" | Status of simulation |
"SimulationLog" | Logged simulation data |
"Logging" | Logging status of simulation |
"ActorSimulation" | Actors in simulation |
"ActorSimulation", "SimulinkModel", mdHdl | Actor in simulation corresponding to specified Simulink model handle |
"ActorSimulation", "SystemObject", obj | Actor in simulation corresponding to specified System object |
"ActorSimulation", "ActorModel", actorModel | Actor in simulation corresponding to specified
Simulink.ActorModel object |
"Observers" | Observers attached to a simulation |
"SimulationTime" | Simulation time |
"SensorSimulation" | Sensors in simulation |
"Map" | RoadRunner HD map for the scene used in scenario simulation |
"ScenarioServices" | Service that allows you to perform calculations on RoadRunner scene or scenario |
Output Arguments
Value of parameter, returned as one of these data types:
| Parameter | Data Type of Output |
|---|---|
"StepSize" | Step size of simulation, returned as a double. |
"MaxSimulationTime" | Maximum simulation time of scenario, returned as a
double. |
"PacerStatus" | Pacer status of simulation, returned as a char or
string. Possible values are "on" and
"off". |
"SimulationPace" | Simulation pace, returned as adouble. |
"SimulationStatus" | Simulation status, returned as a
|
"SimulationLog" | ScenarioLog object. |
"Logging" | Logging status of simulation, returned as a char or
string. Possible values are "on" and
"off". |
"ActorSimulation" | Cell array of ActorSimulation objects. |
"ActorSimulation", "SimulinkModel", mdHdl | ActorSimulation object. |
"ActorSimulation", "SystemObject", obj | ActorSimulation object. |
"ActorSimulation", "ActorModel", actorModel | ActorSimulation object. |
"Observers" | Structure array containing the following fields:
|
"SimulationTime" | Simulation time, returned as a |
"SensorSimulation" | SensorSimulation object. |
"Map" | roadrunnerHDMap object. |
"ScenarioServices" | ScenarioServices object. |
Version History
Introduced in R2022aGet the current simulation time of a scenario.
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.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- 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)