Page 1 of 1

Unable to read gyroSensor data on Matlab

Posted: 09 Mar 2018, 04:02
by sasyeah
Hi,

I tried to read accelero and gyro on Matlab using remote API.
the command for accel is

Code: Select all

[returnCode,~,acc,~,~]=vrep.simxCallScriptFunction(clientID,'Accelerometer',vrep.sim_scripttype_childscript,'getAccelData',[],[],[],[],vrep.simx_opmode_blocking); % accel


and the command for gyro is

Code: Select all

[returnCode,~,gyro,~,~]=vrep.simxCallScriptFunction(clientID,'GyroSensor',vrep.sim_scripttype_childscript,'getGyroData',[],[],[],[],vrep.simx_opmode_blocking);% gyro


but I couldn't get the gyro data on Matlab. It said that "Index exceeds matrix dimensions."

please help me,
thanks

Re: Unable to read gyroSensor data on Matlab

Posted: 12 Mar 2018, 07:30
by coppelia
Hello,

did you try to look at the example script programming/remoteApiBindings/Matlab/Matlab/complexCommandTest.m?
Best is to try to gradually modify that scene to see what might be going wrong in your case.

Cheers