realSense 435i Matlab Error
Hi,
I am running Windows 10 and using the Matlab interface for the 435i. I am running an example depth_example.m . When I run this example I get an error message
Error using librealsense_mex
Frame didn't arrive within 15000
Error in realsense.pipeline/wait_for_frames (line 48)
out = realsense.librealsense_mex('rs2::pipeline', 'wait_for_frames', this.objectHandle);
Error in realsense.depth_example (line 17)
fs = pipe.wait_for_frames();
If I set a breakpoint on line 17 and then continue it works correctly. If I use the prebult C++ codes in the Tools folder they work correctly and I rebuilt the sln file in release and debug modes and they work correctly. Does anyone know what is wrong or wat I am doing wrong in the Matlab codes.
Thanks
-
Hi Rlt1 There was a case involving Error using librealsense_mex Frame didn't arrive within 15000 with the depth_example.m example program in January 2021. It was thought that the likely cause was using a MATLAB version other than the 2017b version recommended by the MATLAB wrapper's documentation (such as MATLAB 2020a).
https://github.com/IntelRealSense/librealsense/issues/8113
Which MATLAB version are you using please?
-
The MATLAB version being used is likely to be the main cause of the problem, rather than the method by which librealsense was installed. An official feature request was submitted to Intel in January 2021 to support MATLAB 2020b but there is no time schedule available for if / when it may be implemented. In the meantime, using MATLAB 2017b with the RealSense MATLAB wrapper may be the only solution.
-
I am not aware of an official documentation for mex file creation, though there was a RealSense user who attempted to do so.
-
The developer called lramati was the main programmer on the non-example core files of the MATLAB wrapper, including the mex related files, according to the GitHub details associated with the files.
-
Hi Jbutle60 You mentioned in a deleted post on this forum that you had the error Unable to resolve the name realsense.pipeline when using depth_example. The link below has information about resolving that issue.
https://github.com/IntelRealSense/librealsense/issues/5376
MATLAB versions newer than 2017 have been able to be used with RealSense cameras.
https://support.intelrealsense.com/hc/en-us/community/posts/1500000577481/comments/1500000640542
-
Hi MartyG,
The behavior I am seeing with Matlab 2022b is that I can run a Matlab example once and then when I try to run an example a second time I see the error 'Frame didn't arrive within 15000'. Sometimes Matlab will completely freeze and I will need to kill it with Task Manager.
-
There have been a few past cases of this error with depth_example.m. The RealSense users in those cases found that the error disappeared if the 2017b version of MATLAB was used.
Are you able to successfully use any of the wrapper's other example programs without the error occurring?
advanced_mode_example.m
capture_example.m
depth_view_example.m
pointcloud_example.m
rosbag_example.mOne RealSense user with this error created their own MATLAB depth script that worked for them.
https://github.com/IntelRealSense/librealsense/issues/9773#issuecomment-925553900
-
The RealSense MATLAB wrapper only has official support for MATLAB 2017b. The wrapper has been able to work with newer versions (2019, 2020, 2021) without official support in the wrapper for those versions, though sometimes with errors.
Do you have the option of trying the examples with an older MATLAB version such as 2020b or 2021b to determine whether the problem is with 2022b specifically, please?
Please sign in to leave a comment.
Comments
17 comments