Hello,
I know that is possible to control the simulation in V-Rep from an external hardware via remote api but i would like know if is possible to control the external hardware from the simulation. For example if i can connect an arduino with the simulation and control its output port status.
Thank you in advance,
Julio
Is it possible to control an ext hard from the simulation?
Re: Is it possible to control an ext hard from the simulatio
Hi,
Indeed it is possible! for example via the serial port. Have a look at the arduino esplora model...
Cheers
Eric
Indeed it is possible! for example via the serial port. Have a look at the arduino esplora model...
Cheers
Eric
Re: Is it possible to control an ext hard from the simulatio
Hello,
yes, that is correct. You basically have several mechanisms to connect to and communicate with hardware from V-REP:
yes, that is correct. You basically have several mechanisms to connect to and communicate with hardware from V-REP:
- using a plugin. This gives you most flexibility, speed, etc. From within a plugin, you can do everything. Take the example of the haptic device (i.e. force feedback joystick) interface in V-REP, that is based on a plugin. A plugin can also register new Lua functions, that if called, will call-back a function in the plugin: this allows you to use plugin functionality directly from within en embedded script in a very flexible way.
- using the remote API. But as you mentioned it, V-REP will act as a server. But if the client is listening to a specific signal (e.g. with simxReadStringStream), then you can continuously send data to the client from V-REP by setting string signals (simSetStringSignal). But remember, connection and communication is asynchronous.
- using ROS. Very similar to the remote API approach.
- using serial port communication from within an embedded script.
- using socket communication, from within an embedded script.
- using any other Lua extension library, from within an embedded script.
Re: Is it possible to control an ext hard from the simulatio
Thank you very much guys! Also you have done an amazing job with this V-Rep and also us, the students, can use it for our projects and do things that we couldn't do with other softwares as easy as with V-Rep. Congratulations and thanks again.