Azzera filtri
Azzera filtri

How can I use Intel Realsense Depth d435i in Simulink.

76 visualizzazioni (ultimi 30 giorni)
Hi, my name is Jirat. I want to use Intel Realsense Depth 435i for object detection and run it in Simulink. This device doesn't have any hardware support in Add-ins but it has developed code for use Realsense's product in Github. Initially, I was already successful in Matlab and I adapted that code for use in the Matlab function propose to run in Simulink. But the Simulink function couldn't be used because only Matlab files are supported for that code. So, does anyone know how to run Intel Realsense Depth 435i in Simulink?
---------------------------------------------------------------------------------------
Github link
https://github.com/IntelRealSense/librealsense/releases/tag/v2.50.0
---------------------------------------------------------------------------------------
This is simple code for in Matlab function trial .
function y = func1(x)
pipe = realsense.pipeline();
y = x;
end
---------------------------------------------------------------------------------------
This is a warning.
Function call resolved to MEX file 'C:\Program Files (x86)\Intel RealSense SDK 2.0\matlab\+realsense\librealsense_mex.mexw64'. Only MATLAB files are supported for code generation. Consider using coder.extrinsic to declare MEX function as extrinsic. Function 'pipeline.m' (#48.283.333), line 10, column 37: "realsense.librealsense_mex('rs2::pipeline', 'new')" Launch diagnostic report.

Risposte (1)

CyberRobotics
CyberRobotics il 2 Set 2022
Modificato: CyberRobotics il 2 Set 2022
I had a similar and overcame this issue and found a solution with
Intel Realsense Depth Camera D435 and using Simulink Real Time by instalation guide
for installing the Matlab Package
To overcome this issue you need to make a customade simulink block called with a help of S-function.
This issue can be solved by using a MATLAB S-Function
  1. Under Simulink Library Browser select User-Defined Functions and drag Level-2 MATLAB S-Function
  2. Open a new matlab script file and use the following documentation https://ch.mathworks.com/help/simulink/sfg/writing-level-2-matlab-s-functions.html
For a short toturial how Level-2 MATLAB S-Fuction look at this lecture
Note that in the output function the calculation or comunication to the camera is made.
In the code only the first letter of the camera name is displayed.
Hope this solves the problem.

Prodotti


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by