Simulink and V-REP

Typically: "How do I... ", "How can I... " questions
dds
Posts: 72
Joined: 20 Mar 2014, 14:35

Re: Simulink and V-REP

Post by dds » 08 Apr 2014, 17:15

Hi! I tried with the coder.extrinsic but I couldn't reach an eficient comunication. I also tried to use Matlab S-function but i couldnt find a way to share the "vrep" object between functions There is some kind of "hack" with the Dwork vector, but I'm not well versed in simulink. So now I'll try to generate S-function in C. I hope I have better luck. Greetings!

xepost
Posts: 11
Joined: 20 Jan 2014, 09:37

Re: Simulink and V-REP

Post by xepost » 08 Sep 2014, 14:45

Hi,
I am trying to do the same thing. I am running the "simpleTest()" and it is working fine. When i copy and paste the same code to simulink via 'Matlab Fcn' I get this error:

"Variable 'vrep' is resolved in workspace ('base') for block 'amk_02/MATLAB Function1' but it is not a 'Simulink.Signal' object".

coder.extrinsic does not help, and running it partially as init file and then calling also does not.

Do you have any recommendations??

masteryoda
Posts: 8
Joined: 20 Feb 2015, 05:12

Re: Simulink and V-REP

Post by masteryoda » 30 May 2015, 18:00

hello,
does anybody here have solved the problem?. It seems we are all running into the same problem.
Would be awesome if someone share the solution to this.

cheers

dds
Posts: 72
Joined: 20 Mar 2014, 14:35

Re: Simulink and V-REP

Post by dds » 26 Aug 2015, 13:58


sample
Posts: 6
Joined: 27 Mar 2017, 21:30

Re: Simulink and V-REP

Post by sample » 15 Jun 2017, 10:44

First of all, I'd like to thank for your hard work, this forum is very
helpful!

I am doing my masters thesis and plan was to control the model of the robot
in VREP using the Matlab/Simulink. I have managed to establish Matlab/VREP
connection and send and retrieve data from Matlab to VREP. When I tried to
do the same using Simulink I ran into the same problem as described in this topic.

My question is, do you know if Simulink-Vrep connection is possible? As
much as I can see in this topic no one established the connection. If it is
possible how can I bypass the problem described in the mentioned topic?
One of the possible solutions to this problem is Shared Memory Plugin, but I am not sure how to install and use it, and I think i have read that it doesn't work with the last VREP.

Thank you in advance!!

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

Re: Simulink and V-REP

Post by coppelia » 16 Jun 2017, 07:54

Yes, you can have a simulink interface, but we haven't worked on it. I know that some people from Matlab have prepared such an interface, but I still didn't get the chance to have a look at it, unfortunately.

Cheers

Laercio Barbosa
Posts: 2
Joined: 27 Apr 2017, 06:11
Location: Brazil - São Bernardo do Campo

Re: Simulink and V-REP

Post by Laercio Barbosa » 18 Jun 2017, 19:00

Mathworks working in a Simulink interface, really? Cool! I am looking forward to see it!
And about shared memory in V-REP 3.4.0, do you plan any fix for it as it was workink on 3.2.0?

Thanks

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

Re: Simulink and V-REP

Post by coppelia » 20 Jun 2017, 21:19

The shared memory code you are referring to wasn't developed by us, so we do not really check for compatibility on the way. The next version of the remote API (V-REP 3.4.1) on the other hand will also support shared memory (instead of socket communication). This modification is courtesy of Benjamin Navarro.

Cheers

Laercio Barbosa
Posts: 2
Joined: 27 Apr 2017, 06:11
Location: Brazil - São Bernardo do Campo

Re: Simulink and V-REP

Post by Laercio Barbosa » 21 Jun 2017, 03:12

That is very good!

Thanks

dds
Posts: 72
Joined: 20 Mar 2014, 14:35

Re: Simulink and V-REP

Post by dds » 29 Jun 2017, 19:48

Hi. In the following link you can access the "Library SAS". This library allows you to link several programs through shared memory. Among the utilities included is the communication for shared memory compatible with the last Vrep (3.4.0). It is in a very early stage of development so the documentation may be incomplete.
https://drive.google.com/drive/folders/ ... sp=sharing
To install it you must open matlab with administrator privilege and run the row "INSTALL_SimulinkLibrary.m". Vrep models and dlls should be installed automatically if you are using windows. In linux the process is manual.

Post Reply