Missing .jpg files when running Automated Driving Toolbox Unreal Engine Simulation

1 次查看(过去 30 天)
I'm following this example from the Matlab documentation:Select Waypoints for Unreal Engine Simulation - MATLAB & Simulink (mathworks.com)
So far, I've tried running the following code in Matlab 2023a and 2023b:
sceneName = 'ParkingLot';
[sceneImage, sceneRef] = helperGetSceneImage(sceneName);
Error using imread>get_full_filename
File "sim3d_ParkingLot.jpg" does not exist.

Error in imread (line 372)
fullname = get_full_filename(filename);

Error in helperGetSceneImage (line 46)
sceneImage = imread(imageName);
imshow(sceneImage);
The above code works when I change the sceneName to be either "LargeParkingLot" or "USCityBlock", but fails when I do any other scene name. I'm trying valid scene names based on the documentation for the
helperGetSceneImage
function.
I found the location where the image files are located at "C:\Program Files\MATLAB\R2023a\toolbox\driving\drivingdata". It turns out that the image files corresponding to the scene names that do not work are indeed missing ("sim3d_ParkingLot.jpg" is missing whereas "sim3d_LargeParkingLot" is there). That appears to be the case for 2023a and 2023b. I checked this on two seperate computers.
I was able to find the missing image files ("sim3d_ParkingLot.jpg") in 2021a and the code ran in that version without any problems. I then copied the missing image files from 2021a and pasted them into the exact same location in the 2023a installation. The code still does not work in 2023a.
Why are these files missing from the 2023a installation, and does anyone have any ideas for how to solve this?
  1 个评论
Upneet Singh
Upneet Singh 2023-12-26
编辑:Upneet Singh 2023-12-26
As of right now, I don't have a solution for this error. However, I did find an alternative approach for doing the same thing. The drivingScenarioDesigner has cuboid versions of most of the 3D simulation environments, so I was able to use that to set the trajectory of the vehicle using that app. I followed this documentation: Design driving scenarios, configure sensors, and generate synthetic data - MATLAB (mathworks.com) under the last tab "Specify Vehicle Trajectories for 3D Simulation"

请先登录,再进行评论。

回答(2 个)

SACHIN KHANDELWAL
SACHIN KHANDELWAL 2023-12-27
编辑:SACHIN KHANDELWAL 2024-1-18
Hi Upneet,
The issue you are encountering is attributed to the absence of the specified required files. The files are available for specific examples. The example runs without any issues unless you modifies it to use a different scene than the one the example uses.
Thanks
  1 个评论
Upneet Singh
Upneet Singh 2023-12-27
It seems odd that these image files were removed between the 2022 releases and the 2023 releases. Is there a reason these files were removed?
Also, when I put those missing files into the folder where they should be, it still can't find those image files. Why would that be?

请先登录,再进行评论。


Steven Lord
Steven Lord 2024-1-18
How are you trying to run the code in the example? Have you opened the example itself (so MATLAB changes to the folder where the example's files are located) or are you just running code you've copied and pasted from the example in the Command Window? If you're doing the latter (as I suspect you are) try opening the example in MATLAB before doing so.

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by