I am Using Matlan as API for Coppeliasn(Vrep) - Libpointer 'setdatatype' Error

function Front_Portion()
sim=remApi('remoteApi');
sim.simxFinish(-1);
clientID=sim.simxStart('127.0.0.1',19999,true,true,5000,5);
[returnCode,F_Ind]=sim.simxGetObjectHandle(clientID,'Front_Indi',sim.simx_opmode_blocking);
[returnCode,F_One]=sim.simxGetObjectHandle(clientID,'Front_O1',sim.simx_opmode_blocking);
[returnCode,F_Two]=sim.simxGetObjectHandle(clientID,'Front_O2',sim.simx_opmode_blocking);
[returnCode,resolution,image]=sim.simxGetVisionSensorImage(clientID,F_Ind,0,sim.simx_opmode_streaming);
for i=1:50
[returnCode,resolution,image]=sim.simxGetVisionSensorImage(clientID,F_Ind,0,sim.simx_opmode_buffer);
setdatatype(image,'uint8Ptr',1,3);
get(image.value(1);
pause(0.1);
end
end
It is Showing Error like this. I have referred all the supporting documents from the website. But i couldn't solve the error. Kindly help me.

2 Comments

Hi Vishal! Have you managed to resolve this problem ?
Have you managed to solve this problem? I am stuck in ZeroMQ library

Sign in to comment.

Answers (0)

Products

Release

R2020a

Asked:

on 8 May 2022

Commented:

on 24 Nov 2022

Community Treasure Hunt

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

Start Hunting!