vrep_ros_interface安装过程
在linux 16.04/ros kinetic环境下,下载Vrep3.5.0 linux版本后,启动roscore,并执行./vrep.sh命令,发现vrep_ros_interface
插件无法加载。vrep安装目录下的libv_repExpRosInterface.so
无法加载。
重新下载vrep3.4.0版本,将compiledPlugin/libv_repExtRosInterface.so
拷出,启动roscore
,执行./vrep.sh
,同样vrep_ros_interface
插件无法加载且vrep
发生崩溃,出现undefined symbol
错误(详情不再细说)。
解决办法:需要重新编译libv_repExpRosInterface.so
插件。
1.准备vrep_plugin_ws
# 安装catkin tools :参考:http://catkin-tools.readthedocs.io/en/latest/installing.html
$ $ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list'
$ $ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
$ sudo apt-get install python-catkin-tools
# 建立工作目录
$ cd ~
$ mkdir vrep_plugin_ws/src
$ cd vrep_plugin_ws
$ catkin init
2.安装libv_stubGen的必备组件
# 组件1,python2.7或以上
# 组件2,xsltproc program
in your PATH
$ sudo apt-get install xsltproc
refference--https://github.com/CoppeliaRobotics/v_repStubsGen
3.driver_common pkg的准备
$ cd ~/vrep_plugin_ws/src
$ git clone https://github.com/ros-drivers/driver_common.git
$ cd ..
$ catkin build
ros kinetic没有driver_common
这个包,这会导致编译libv_repRosInterface
时,会出现这个错误:
driver_base/ConfigString.h: No such file.
我们将该pkg进行编译。 参考网址:
https://github.com/ros-drivers/driver_common
http://wiki.ros.org/driver_common
4.编译libv_repRosInterface
#如果是Vrep3.5.0版本的话,请在github上进行下载 #下载pkg
$ cd ~/vrep_plugin_ws/src
$ git clone --recursive https://github.com/CoppeliaRobotics/v_repExtRosInterface.git vrep_ros_interface
如果是rep3.4.0版本的话,请直接在vrep3.4.0主目录中找到programming/ros_pakcge/libv_repExtRosInterface,将其拷入到vrep_plugin_ws/src中
#如果直接进行编译的话,会发现还是处出现无法找到driver_base/ConfigString.h的错误;
#需要将在devel/.private/driver_base/includes文件夹中找到刚刚编译过的driver_common的driver_base文件夹,将其拷入到libv_repRosInterface的include文件夹中。然后进行编译。
$ cd ~/vrep_plugin_ws/devel/include
$ cp driver_base ~/vrep_plugin_ws/src/v_repExtRosInterface/include
$ cd ~/vrep_plugin_ws
#设置vrep的主目录路径
$ export VREP_ROOT=~/VREP_path
$ catkin build
参考网址:https://github.com/CoppeliaRobotics/v_repExtRosInterface
5.将编译好的plugin拷入vrep主文件夹。
在~/vrep_plugin_ws/devel/lib
文件夹中找到编译结果libv_repExtRosInterface.so,并将其拷入vrep主目录。