That works fine at first, but as soon as I try to subscribe to /joint_states (for example with rostopic echo /joint_states) V-Rep Crashes with: "Segmentation fault (core dumped)"
we have tried your example on ROS Fuerte and ROS Hydro, without problem. I guess it is specifically linked to ROS Indigo.. maybe you could try to recompile the ROS plugin?
Just a little notice:
When I first tried to compile the plugin it gave me an error, that the dependency to opencv2 is unresolved. As I found out opencv is no longer released as a Ros Package in Indigo. http://wiki.ros.org/opencv2
So I just deleted the opencv dependency entry in the manifest.xml and then it compiled. (Same for the vrep_common package)
I have the same problem. I use the V-Rep 3.1.2 64 bits with Ubuntu 14.04 64 bits and Ros Indigo. The publishers work well but my subscribers close the V-Rep with message "Segmentation fault (core dumped)". I tried to recompile the vrep plugin and vrep_common but the error continues. The same scene works correctly in Hydro and Fuerte. Any idea to solve this issue?
The same error occurs with example rosTopicPublisherAndSubscriber.ttt (included in V-Rep). Sometimes the V-Rep closes with another message, as follows.
"terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct null not valid
Aborted (core dumped)"
1) download V-Rep 3.1.2 64 bits again
2) copy the vrep_plugin from vrep-installation/programming/ros_packages to catkin_ws/src
3) change CMakeLists.txt of vrep_plugin to Indigo libraries "link_directories("/opt/ros/indigo/lib")"
4) compile plugin "roscd vrep_plugin and catkin_make"
5) copy the builded plugin form /devel/lib/libv_repExtRos.so to v-rep installation directory