MATLAB Answers

0

How to get ego vehicle signals and actor size from driving scenario in Simulink test?

Asked by Anton Öqvist on 1 Aug 2019
Latest activity Answered by Roshin Kadanna Pally on 1 Oct 2019
Me and my team are developing an automotive feature in Simulink/Matlab and wan't to use driving scenario designer to create functional tests for our requirements with Simulink test. As a first step we wan't to create an open loop simulation with "ideal" object measurement from the scenario data to test the feature without any sensor flaws.
What we need from the scenario data is ego speed, yawrate and size dimensions, as well as the target position, speed and size in ego coordinates. With the scenario reader we can easily get the dynamic data from the targets in the scenario but the ego is excluded from the actors if ego coordinates is chosen. The only solution I see right now is to read all the actor data in world coordinates (then ego is visible) and transform the target data from world coordinates to ego coordinates during each run. The static data (size and such) have to be read from the sceneario .mat file as a pre step to the simulation. Is there an esier solution that I does not require us to transform the coordinates back and forth just to get the ego data? As I understand it we will not be able to use the birds eye view if we read the actor data in world coordinates either.

  0 Comments

Sign in to comment.

1 Answer

Answer by Roshin Kadanna Pally on 1 Oct 2019

Hi Anton,
In R2019b, we have added the ability in the Scenario Reader block to read directly from a drivingScenario object in the MATLAB workspace. See an example below:
With this feature, it might be easier for you to do both open and closed loops with more programmatic control to bring data to Simulink. Unfortunately, you still don't have access to ego vehicle data easily. This is being added in a future release. For now, consider using the following APIs after creating a driving scenario in the workspace to get the required information:
  1. actorProfiles(scenario)
  2. record(scenario)
  3. actorPoses(scenario)
  4. targetPoses(egoVehicle)
Hope this helps.
Roshin

  0 Comments

Sign in to comment.