Unable to read gyroSensor data on Matlab

Typically: "How do I... ", "How can I... " questions
Post Reply
sasyeah
Posts: 5
Joined: 02 Mar 2018, 02:26
Contact:

Unable to read gyroSensor data on Matlab

Post by sasyeah » 09 Mar 2018, 04:02

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

coppelia
Site Admin
Posts: 6747
Joined: 14 Dec 2012, 00:25

Re: Unable to read gyroSensor data on Matlab

Post by coppelia » 12 Mar 2018, 07:30

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

Post Reply