Visualize Simulink model in V-rep

Typically: "How do I... ", "How can I... " questions
Post Reply
BiancaSan93
Posts: 23
Joined: 25 Apr 2017, 17:26

Visualize Simulink model in V-rep

Post by BiancaSan93 » 04 Dec 2018, 17:52

Hi,

I have the dynamical model of my manipulator (planar 3 DOF) implemented in Simulink, with identified parameters. I do not know individual mass, inertia matrix of each link, but the model has been identified on the basis of real data by a previous student. This way, I am unable to reconstruct the same model in V-rep, instead I have to run simulations via matlab/simulink. However, I would like to "mirror" exactly what is happening in simulink inside V-Rep, in order to visualize the experiment and perform some other evaluations (unrelated). Is there any way to do this? Simply put, how can I reproduce exactly the behavior of my robot (computed in simulink) in a V-rep scene, possibly in real time?

Thank you very much in advance, any help is greatly appreciated

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

Re: Visualize Simulink model in V-rep

Post by coppelia » 05 Dec 2018, 11:24

Hello,

you will have to use the Matlab binding of the remote API somehow. Or use a direct socket connection to V-REP. Then you will simply send 3 angular values to V-REP, in order to set the 3 joints of the robot (e.g. with sim.setJointPosition).


Cheers

BiancaSan93
Posts: 23
Joined: 25 Apr 2017, 17:26

Re: Visualize Simulink model in V-rep

Post by BiancaSan93 » 05 Dec 2018, 16:23

Hi, thank you for the reply. I have checked the remoteApi for matlab and have no problem interfacing with a .m script to remotely control the robot. However, I do not find any instruction on how to do so through simulink. Is there any way to interface it directly?

Post Reply