V-REP and ROS
There is a tutorial section of the v-rep user manual where the ros integration procedure is detailed. The READMEs file in the codes we will get from others also help.
Installation of V-REP
If you do not have installed v-rep yet, read the very first installation section of this page before continuing.
Enabling ROS compatibility
This consists only in compiling a ros package in your ros workspace. Let us denote here your ros workspace as ~/ros-ws. Let us first add the package.
cp -r $VREP_ROOT/programming/ros_packages/v_repExtRosInterface ~/ros-ws/src
Now we can compile the package.
cd ~/ros-ws
catkin build
A library has been generated, we have to copy it into the vrep directory.
cp ~/ros-ws/devel/lib/libv_repExtRosInterface.so $VREP_ROOT
Running V-REP and ROS
In order to enable ros in v-rep, roscore has to be running when v-rep is launched. So in a first terminal:
source ~/ros-ws/devel/setup.bash
roscore
Now in another terminal, let us start v-rep (in a ros intialized environment):
cd $VREP_ROOT
source ~/ros-ws/devel/setup.bash
./vrep.sh