Automotive tool box running code

I am trying to run the "closely spcaed targets" demo, which is embedded with FCW (Forward collision waring) demo.
I just pulled out the snippet of code which belongs to "closely spcaed targets", which is towards the end of the script as below.
I was able to run the entire demo of FCW, whereas the snippet of "closely spaced targets" is giving me errors as below :
Unrecognized method, property, or field 'SensorLocation' for class 'drivingRadarDataGenerator'.
Error in helperCreateSensorDemoDisplay>setupPanels (line 88)
plotCoverageArea(caPlotter, sensor.SensorLocation,...
Error in helperCreateSensorDemoDisplay (line 32)
bep = setupPanels(scenario,egoCar,sensor,figScene,sideView);
Error in helperRunSensorDemoScenario (line 35)
[bep, figScene] = helperCreateSensorDemoDisplay(scenario, egoCar, sensor, sideView);
Error in test_2bike_det (line 39)
metrics = helperRunSensorDemoScenario(scenario, egoCar, radarSensor, snapTime);
Additinally, i am also interested in getting radar raw data to further use it for my own algorithm development. But when i went through documentation, i dont find any method to pull raw data. Can you please help me with both of these queries.
Attaching the file of "closely spaced targets" script.

5 Comments

If you want to refer to a particular section of a documentation page on MATLAB Answers, like the "Detection of Closely Spaced Targets" section on this documentation page please link to it rather than making a copy.
Which version of that documentation section are you running? I'm not certain if it has changed between release R2021b and release R2022b (the version that you are using if you extracted that section of code from the online documentation.) What happens if you run that code from the documentation installed locally on your machine?
I am running R2021b version and if i run the code from matlab folder : <Path>\MATLAB\Examples\R2021b\driving\ModelRadarSensorDetectionsExample , it runs smoothly.
Whereas if i pull closed spaced targets snippet, i am unable to run the code.
One other issue related to this is : Would i be able to get Raw data from these scripts ?, such as RD-map or Range-angle map etc.
Looks like some functions used in this main demo script are missing.
I guess this is why you can run it from your local MATLAB but cannot with the one you snipped off. I bet you can see other scripts/functions exist in "\MATLAB\Examples\R2021b\driving\ModelRadarSensorDetectionsExample" too. They are the parts of the demo.
Would it be possible to copy and paste the link to the documentation page you are refering to?
Thanks Hiro. But i am not able to figure which snippet of code is required (which is part of demo) for running closely spaced targets demo. All these look like isolated from each other , hence i pulled only sloely spaced target demo, which is of my interest.
I referred the guide : matlab-automated-driving-toolbox-user-s-guide_compress.pdf , which also seem to give code in isolated manner unlike the demo script which has some link.
I did not refer any documentation other than these.
But my other query is : Would it be possible to get raw data of radar from these examples ?
Interestingly if i place the above script in to folder of "\MATLAB\Examples\R2021b\driving\ModelRadarSensorDetectionsExample", it just works. Seem like outside of this folder , the script enters some other function .

Sign in to comment.

Answers (0)

Categories

Products

Release

R2021b

Asked:

on 29 Nov 2022

Commented:

on 30 Nov 2022

Community Treasure Hunt

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

Start Hunting!