- Add the new driving scenario in the 'helperLCSetup.m' file - this is to make sure that the new driving scenario gets loaded properly. This script initializes the ego car and actor profiles after loading the driving scenario.
- In the helper script, add the scenarioFileName, ScenarioFcnName, and set the corresponding scenarioID. Refer to the highlighted lines in the image below:
automated driving toolbox example 'LaneChangeExample' problem
1 view (last 30 days)
Show older comments
호열 맹
on 10 Nov 2022
Answered: Kishen Mahadevan
on 16 Nov 2022
Hi, I was curious if it would work even if I put another driving scenario in 'LaneChangeExample', an example provided by MATLAB automated driving toolbox. So I put the scenario reader's scenario as a scenario I made and run it. (The scenariofcnname and scenariofilename of the workspace are all matched with the scenario I created) Then I got this error. I'd like to know how to solve this problem.
Causes:
- MATLAB System block 'LaneChangeExample/Occupancy Grid Generator' error occurred when invoking 'stepImpl' method of 'outputgrid'. The error was thrown from ' 'C:\Program Files\MATLAB\R2021b\examples\autonomous_control\main\outputgrid.m' at line 146'.
- 'currentLane' is an unrecognized function or variable.
It seems problems of outputgrid.m, but I don't know how to solve it.
0 Comments
Accepted Answer
Kishen Mahadevan
on 16 Nov 2022
Hi,
Please try the following steps:
This script also sets the selected scenario's name in the Scenario Reader block, so you wouldnt have to add it separately.
Thanks,
Kishen
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!