Converting a Driving Scenario to occupancy grid map for path planning in Simulink

8 views (last 30 days)
I have created a driving scenario using driving scenario designer app and exported the model to Simulink, but I am unable to create an updating occupancy grid map from the scenaio reader and the vision detection generator. I want to use it for vehicle motion planning. There is matlab code to generate the occupancy grid map from the scenario matlab function, and I was thinking to create a matlab function block in Simulink for generating the map. Could you please let me know if there is any way I can feed the scenario and the sensor information from the scenario simulink model to such a function block?
  2 Comments
Shubham Dattatraya Gorde
Shubham Dattatraya Gorde on 15 Sep 2023
Hi Somnath,
I was trying to implement the same , can you please help me, how did you created an updating occupancy grid map from scenario reader and vision detection generator?
Thanks in advance.
Regards,
Shubham.

Sign in to comment.

Answers (1)

Cameron Stabile
Cameron Stabile on 11 Dec 2020
Edited: Cameron Stabile on 15 Dec 2020
Hi Somnath, Rolando
If I understand correctly, it appears you are trying to combine two separate examples: Create Egocentric Occupancy Map from Driving Scenario Designer and General Simulink Model of Scenario and Sensor.
Currently there is no shipping function that will automatically create and update a map from scenario information, but you should be able to convert the first example script into a function with a bit of refactoring. The function does not need to create the scenario or do anything related to visualization, so the only things we need to worry about in this function are:
  1. Creation of the map object (see Create an Egocentric Occupancy Map)
  2. Converting Obstacle and Lane Detections to occupied/unoccupied regions
  3. Updating the map (see end of while loop)
  4. Using the map
For inspiration on step 2, you may want to look at the exampleHelperGetObstacleDataFromSensor and exampleHelperFilterObstacles helper methods. These currently rely on scenario and sensor objects as inputs, but they really only need laneDetections, objectDetections, and the egoVehicle.
Best,
Cameron
Disclaimer: These are my own suggestions and do not represent formal guidance from The Mathworks

Categories

Find more on Propagation and Channel Models in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!