IntelRealSense / librealsense

Intel® RealSense™ SDK
https://www.intelrealsense.com/
Apache License 2.0
7.63k stars 4.83k forks source link

Unable to use RealSense MATLAB wrapper with MATLAB 2024a on Windows 11 #13532

Open SBaharavIntegra opened 1 day ago

SBaharavIntegra commented 1 day ago

Required Info
Camera Model { D400 }
Firmware Version (Unable to check - setup issue)
Operating System & Version Windows 11
Kernel Version (Linux Only) (NA)
Platform PC
SDK Version { 2.54.1.5216}
Language {MATLAB }
Segment {Robot }

I'm experiencing difficulties setting up the RealSense MATLAB wrapper. Here are the specifics: Environment Details:

MATLAB Version: 2024a SDK: Intel.RealSense.SDK-WIN10-2.54.1.5216.exe Downloaded from: https://github.com/IntelRealSense/librealsense/releases/tag/v2.54.1

Steps Taken: Installed Intel.RealSense.SDK-WIN10-2.54.1.5216.exe Set up MATLAB paths: mkdir RealSense_Project cd RealSense_Project addpath('C:\Users\SBaharav\OneDrive - JNJ\Ragistration Optical\Intel.RealSense.SDK-WIN10-2.54.1.5216\matlab') addpath('C:\Users\SBaharav\OneDrive - JNJ\Ragistration Optical') addpath('C:\Users\SBaharav\OneDrive - JNJ\Ragistration Optical\librealsense-2.56.2\wrappers\matlab')

Attempted to run depth_example()

Unable to resolve the name 'realsense.pipeline'. Error in depth_example (line 3) pipe = realsense.pipeline();

The error suggests MATLAB cannot find the RealSense package despite adding the paths. Is there a compatibility issue between the current MATLAB wrapper and MATLAB 2024a? Are there additional setup steps needed for newer MATLAB versions? Maybe beause windows 11? 

I've checked the documentation but haven't found specific guidance for MATLAB 2024a compatibility. Any assistance would be appreciated.

MartyG-RealSense commented 1 day ago

Hi @SBaharavIntegra The MATLAB wrapper is no longer updated for modern MATLAB versions, or included in the Intel.RealSense.SDK-WIN10 installer after SDK version 2.54.1. So I do not have guidance about how compatible MATLAB 2024a will be with the wrapper.

However, you can install the 2.54.1 SDK to install the MATLAB wrapper and then install the newer 2.55.1 SDK with Intel.RealSense.SDK-WIN10 to update to 2.55.1 and keep the wrapper installation from 2.54.1. Because the installer does not overwrite SDK components that are not in its list of components to install, you can have the modern 2.55.1 version and still have the MATLAB wrapper from 2.54.1 that you installed earlier, as the 2.55.1 installation will not remove it.

I would not recommend having 2.54.1 and beta 2.56.2 installed on the same computer because of the risk of two SDK versions conflicting. The ideal situation would be to just use 2.54.1 or 2.55.1 and the MATLAB wrapper. It is okay to update the SDK with the Intel.RealSense.SDK-WIN10 installer, as it overwrites the previous SDK installed by that method so you only have one SDK version on the computer at a time, not two.