vrep_ros_interface(libv_repExtRosInterface)的重新编译

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主目录。

转载于:https://www.cnblogs.com/tiderfang/p/8888019.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值