Video tutorial on how control V-REP with Arduino+sensors

Post links to your Youtube videos related to V-REP
Post Reply
Eric
Posts: 186
Joined: 11 Feb 2013, 16:39

Video tutorial on how control V-REP with Arduino+sensors

Post by Eric » 03 Mar 2014, 22:51

Arduino + compass+ PSD sensor +V-REP simulation

This is a simple video tutorial to show how to control a V-REP simulation through a serial port, with an Arduino Mega 2560, collecting heading data from a magnetic compass HMC6352 and the distance to an obstacle with a Sharp GP2D12 PSD sensor. You can easily change the sensors by other devices like potentiometers (to make a joystick) or other sensors and adapt the code in both the Arduino and the simulation script.

We can push and rotate (Jedi style ;) ) the cube inside the V-REP simulation.

You can download the V-REP scene including the cube and the control code, along with the Arduino code to read the sensors, and prepare their values to be sent to the serial port toward the simulation here

http://youtu.be/ZJQV2FlGFBo

zerokol
Posts: 10
Joined: 15 Jun 2013, 02:00
Location: Brazil
Contact:

Re: Video tutorial on how control V-REP with Arduino+sensors

Post by zerokol » 25 Mar 2014, 15:05

Very Cool!

Eric
Posts: 186
Joined: 11 Feb 2013, 16:39

Re: Video tutorial on how control V-REP with Arduino+sensors

Post by Eric » 25 Mar 2014, 21:03

valeu zerokol! ;)

oxsygiandi
Posts: 4
Joined: 10 Mar 2015, 07:10

Re: Video tutorial on how control V-REP with Arduino+sensors

Post by oxsygiandi » 06 Jul 2015, 17:07

You use Windows for this project?

Eric
Posts: 186
Joined: 11 Feb 2013, 16:39

Re: Video tutorial on how control V-REP with Arduino+sensors

Post by Eric » 06 Jul 2015, 18:28

Yes, but I don t see why it would not work on a linux or macOS machine. You would have to adjust the portNumber variable

oxsygiandi
Posts: 4
Joined: 10 Mar 2015, 07:10

Re: Video tutorial on how control V-REP with Arduino+sensors

Post by oxsygiandi » 07 Jul 2015, 03:33

Could you tell me how to install or Connect Matlab to V-rep in Windows?? Any tutorial and the video?

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

Re: Video tutorial on how control V-REP with Arduino+sensors

Post by coppelia » 07 Jul 2015, 10:55

As already mentioned in one of your other posts, you will have to use the remote API. Check also for the example programs located in programming/remoteApiBindings/matlab/matlab, e.g. simpleTest.m.

But basically, you always need to connect to a remote API server service. By default, one is running on port 19997. But you can start your own if you read the instructions here.

On the client side, i.e. Matlab, make sure to fullfil the conditions mentioned here.

Cheers

Post Reply