Clear Filters
Clear Filters

Problem with KinectSimulator.

3 views (last 30 days)
Dawid Jakiel
Dawid Jakiel on 14 Jun 2021
Answered: arushi on 7 May 2024
Hello everyone, I have a little problem.
I have just downloaded KinectSimulator from here: https://github.com/michael0113/KinectSimulator
After downloaded I unpacked this file and then I ran mexall.m Compilation was successfull but when i want run file demo_KinectSimulator.m i got these errors:
>> demo_KinectSimulator
Adding opcodemesh path...\n
Error using load
Unable to read file 'default_load_files\kinect-pattern_3x3.mat'. No such file or directory.
Error in KinectSimulator_IR (line 390)
load('default_load_files\kinect-pattern_3x3.mat')
Error in demo_KinectSimulator (line 28)
[~,~,~] = KinectSimulator_IR(vertex_wall,face_wall,norm_wall);
And I really do not know hot to fix it. Please i need help. Thanks in advance. It is very important for me!

Answers (1)

arushi
arushi on 7 May 2024
Hi Dawid,
The error message you're encountering indicates that the "KinectSimulator" is trying to load a file named "kinect-pattern_3x3.mat" from a directory named `default_load_files`, but it cannot find the file or the directory.
1. Check the Current Working Directory - Ensure that your current working directory in MATLAB is set to the root directory of the `KinectSimulator` project. MATLAB's "load" function will look for files relative to the current working directory unless an absolute path is provided.
2. Verify the Path in the Code - If the file exists in the correct folder and your working directory is set properly, check the path used in the `KinectSimulator_IR` function. It's possible there may be a typo or incorrect path specification in the code. If you're using Windows, the path should be correct as it uses backslashes "\". However, if you're on a Unix-based system (like macOS or Linux), you might need to change the backslashes to forward slashes "/", although MATLAB typically handles these differences automatically.
3. Add the Directory to MATLAB's Path - You can also try adding the "default_load_files" directory to MATLAB's path programmatically to ensure MATLAB can access the file regardless of the current working directory.
4. Manually Specify the Full Path - As a last resort, you could modify the "KinectSimulator_IR" function to specify the full path to the "kinect-pattern_3x3.mat" file when calling "load". This is not the most elegant solution, as it hardcodes paths into your code, but it can be a quick workaround.
Hope this helps.

Categories

Find more on Environment and Settings in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!