Search found 39 matches

by DavideIng
18 Oct 2017, 09:37
Forum: General questions
Topic: End Remote Api Script a the same time of the simulation
Replies: 4
Views: 945

Re: End Remote Api Script a the same time of the simulation

Hello, Also the following method doesn't works: from Vrep: simulationtime = simGetSimulationTime() Sentsimulationtime = simPackFloatTable(simulationtime) to Matlab: [returnCode,simtime]=vrep.simxGetStringSignal(clientID,'Sentsimulationtime',vrep.simx_opmode_oneshot_wait); Vreptime = vrep.simxUnpackF...
by DavideIng
17 Oct 2017, 17:52
Forum: General questions
Topic: End Remote Api Script a the same time of the simulation
Replies: 4
Views: 945

Re: End Remote Api Script a the same time of the simulation

I tryed the following statement in matlab:

Code: Select all

[returnCode,Simtime] = vrep.simxGetSimulationTime(ClientID);
while(Simtime>0)

% Matlab code

end
It return an error: "No appropriate method, property, or field 'simxGetSimulationTime' for class 'remApi'.".
by DavideIng
17 Oct 2017, 15:06
Forum: General questions
Topic: End Remote Api Script a the same time of the simulation
Replies: 4
Views: 945

Re: End Remote Api Script a the same time of the simulation

I mean I am looking for a command that assign a value (like > 0) to a variable when the stop simulation botton is pressed, otherwise its value
is < 0.

Thanks in advance
by DavideIng
17 Oct 2017, 13:03
Forum: General questions
Topic: End Remote Api Script a the same time of the simulation
Replies: 4
Views: 945

End Remote Api Script a the same time of the simulation

Hello,
I am trying to build a while statement in remote Api script (Matlab) with the objective of end the script execution when the simulation on the scene end.
Someone might advise me some variable that store the state of the simulation as argument of my while loop?

Many thanks
Davide
by DavideIng
16 Oct 2017, 14:46
Forum: General questions
Topic: Print ("Word") doesn't works
Replies: 2
Views: 1077

Re: Print ("Word") doesn't works

I have figure it out with simAddStatusbarMessage('Word'), someone could explane me why the statement print("Word") doesn't works?
Many thanks
Davide
by DavideIng
16 Oct 2017, 11:58
Forum: General questions
Topic: Print ("Word") doesn't works
Replies: 2
Views: 1077

Print ("Word") doesn't works

Hello, I have an object 'Plane0' on the scene with associated a Non-Threaded Child Script as below: if (sim_call_type==sim_childscriptcall_initialization) then handlePlane = simGetObjectHandle('Plane0') r,initColor=simGetShapeColor(handlePlane,nil,0) SentString = simPackFloatTable(initColor) print("...
by DavideIng
12 Oct 2017, 15:43
Forum: General questions
Topic: Change color of a primitive shape from remote Api (Matlab)
Replies: 2
Views: 1477

Re: Change color of a primitive shape from remote Api (Matlab)

One of the main issue with these scripts is that the Array InitColor (Initial color of the shape on the scene) has not been got in matlab ( not defined in matlab). How can I fix it? Just define a matlab Array with the same name?

Many thanks

Davide
by DavideIng
11 Oct 2017, 17:11
Forum: General questions
Topic: Change color of a primitive shape from remote Api (Matlab)
Replies: 2
Views: 1477

Change color of a primitive shape from remote Api (Matlab)

Hello, the following it's the code that I have wrote on matlab to get the absolute position of the epuck on the scenes and to try to change the color of a plane (primitive shape) from a remote Api (Matlab), this second instruction doesn't works. disp('Program started'); vrep=remApi('remoteApi'); % o...
by DavideIng
09 Oct 2017, 15:16
Forum: General questions
Topic: temporary remote API server service (server side)
Replies: 1
Views: 566

temporary remote API server service (server side)

Hello,
I need to get the absolute position of an ePuck from v-rep to matlab, I would like to know where should I write the function simExtRemoteApiStart (e.g. main script/ threaded ePuck child script..)

Many thanks

Davide
by DavideIng
09 Oct 2017, 12:07
Forum: General questions
Topic: simExtRemoteApiStart(1999)
Replies: 1
Views: 675

simExtRemoteApiStart(1999)

Hello,
the statement 'simExtRemoteApiStart(1999)' should be used if I would connect matlab to v-rep?
If yes, how I might use it to get, in the matlab workspace, the position of an ePuck?

Thanks in advance

Davide