Receiving data from V-REP in MATLAB

Typically: "How do I... ", "How can I... " questions
Post Reply
AHARR64
Posts: 12
Joined: 15 Nov 2018, 21:42

Receiving data from V-REP in MATLAB

Post by AHARR64 » 15 Jul 2019, 16:57

Hi,

I'm trying to get the values from a table in vrep and send them to matlab, but the signal doesnt receive any information, and the table always ends up blank. Perhaps i'm misunderstanding how the signals between matlab and vrep work. My code for V-REP is

Code: Select all

simRemoteApi.start(19999)
myTable = {1,2,3}
local E = sim.packInt32Table(myTable)
sim.setStringSignal("signal",E)
And my code in matlab is

Code: Select all

vrep.simxGetStringSignal(clientID,'signal',vrep.simx_opmode_streaming); %Tell V-REP to stream the data
 [~,EValue]=vrep.simxGetStringSignal(clientID,'signal',vrep.simx_opmode_buffer);
 E=vrep.simxUnpackInts(EValue);
The values of EValue and E are always empty arrays whenever I run the program. The program already connects to V-REP and gets the necessary data, so no connectivity problems otherwise.

Thanks in advance,
Alan

AHARR64
Posts: 12
Joined: 15 Nov 2018, 21:42

Re: Receiving data from V-REP in MATLAB

Post by AHARR64 » 15 Jul 2019, 18:20

EDIT: fixed by changing operationMode from buffer to blocking

Post Reply