Matlab/VRep robot control

Typically: "How do I... ", "How can I... " questions
Post Reply
shazam
Posts: 7
Joined: 20 Sep 2019, 10:41

Matlab/VRep robot control

Post by shazam » 16 Mar 2020, 22:09

So, my robot in vrep needs to be controlled through matlab(Simulink). The problem is that I want that:
-simulink sends the joints values at the instant i;
-Vrep receives the info and movesthe robot;
-Vrep then sends the info about the joints values to simulink so that they get feedbacked.

I am able now to send information from matlab to vrep but not the opposite.
Any suggestion?

Abdelrahman
Posts: 8
Joined: 20 Dec 2019, 19:06

Re: Matlab/VRep robot control

Post by Abdelrahman » 17 Mar 2020, 02:41

I don't know about simulink but you can write code in matlab to move your robot in v rep , check matlab api functions list

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

Re: Matlab/VRep robot control

Post by coppelia » 17 Mar 2020, 17:52

Hello,

using the remote API, the client will send data and request data from CoppeliaSim.
The simplest situation would be to have your remote API client (i.e. Matlab) call a script function in CoppeliaSim (the server) via simxCallScriptFunction:
You can execute both functions in a blocking fashion (i.e. call the function and wait for a reply from the server), in a send-and-forget fashion (i.e. inform the remote API to execute the function call, but return control immediately), or in a streaming fashion (i.e. inform the remote API that the server should execute the script function on a constant basis, and send back the reply).

Cheers

shazam
Posts: 7
Joined: 20 Sep 2019, 10:41

Re: Matlab/VRep robot control

Post by shazam » 17 Mar 2020, 21:55

so in order to do, for instance, the third thing, should I program in vrep or can I avoid that and write a program on Matlab? until now I have been using this program in order to move the robot http://webuser.unicas.it/lai/robotica/i ... impletest/

Is there any tutorial?

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

Re: Matlab/VRep robot control

Post by coppelia » 19 Mar 2020, 15:44

You'll have to do minimal programming in CoppeliaSim. You'll have to write that script function that you will call from your remote API client.

Cheers

shazam
Posts: 7
Joined: 20 Sep 2019, 10:41

Re: Matlab/VRep robot control

Post by shazam » 24 Mar 2020, 10:02

Thanks,

Cheers

Post Reply