Ubuntu16.04、vrep3.6.0与ros kinetic通信

Ubuntu16.04、vrep3.6.0与ros kinetic通信

  • 在Ubuntu16.04安装vrep 3.6.0
  • 安装ros kinetic完整版本
  • ros 和 vrep通信

在Ubuntu16.04安装vrep 3.6.0

官网下载64位vrep软件,将其放在Dowloads目录下

cd /home/xxx/Dowloads/
xz -d V-REP_PRO_EDU_V3_6_0_Ubuntu16_04.tar.xz
tar -xvf V-REP_PRO_EDU_V3_6_0_Ubuntu16_04.tar

将vrep环境添加进~/.bashrc中

echo 'export VREP_ROOT="$HOME/V-REP_PRO_EDU_V3_6_0_Ubuntu16_04"' >> ~/.bashrc
source ~/.bashrc

安装ros kinetic完整版本

参考官网

ros 和 vrep通信

  1. 然后在终端中运行roscore开启ROS master,接着执行vrep.sh脚本打开VREP,打开过程中会导入插件。但是我在操作过程中,插件没能成功导入,需要自己重新编译库文件。编译所需的文件在GitHub,包括四个package: v_repExtRosInterface-master、vrep_plugin_skeleton-master、vrep_skeleton_msg_and_srv-master、ros_bubble_rob2-master,另外需要下载v_repPlusPlus-master、v_repStubsGen-master、PyCPP-c5ec1cf71c303d1115342cc18f74b8902b0f0c8e、cmake-master,
  2. 安装tf2-sensor-msgs
    sudo apt-get install ros-kinetic-tf2-sensor-msgs
    安装xsltproc
    sudo apt-get install xsltproc
  3. 将PyCPP-c5ec1cf71c303d1115342cc18f74b8902b0f0c8e的全部文件copy到v_repStubsGen-master/external/pycpp
  4. 将v_repPlusPlus-master、v_repStubsGen-master的全部文件分别copy到v_repExtRosInterface-master/external/的对应目录下
  5. 将cmake-master中的FindVREP.cmake copy到v_repExtRosInterface-master/cmake/CoppeliaRobotics-modules
  6. 将v_repExtRosInterface-master、vrep_plugin_skeleton-master、vrep_skeleton_msg_and_srv-master、ros_bubble_rob2-master copy、v_repExtRosInterface-master中的external copy到自己的catkin_ws/src中,修改v_repExtRosInterface-master中的CMakelist.txt第36行为find_package(VREP 3.6.0.1 REQUIRED),修改v_repExtRosInterface-master/include中的config.h.in第5行,去掉__DATE__后面程序,执行catkin_make进行编译。编译成功后将生成的.so库文件复制到V-rep安装目录中即可。
  7. 编译过程中遇到C++:internal compiler error,一般为内存不够,虚拟机可关机修改内存大小,重新编译。
  8. 先启动ros,再启动vrep,即可看到rosinterface加载成功。
    Ubuntu16.04、vrep3.6.0与ros kinetic通信_第1张图片
    以上为安装过程中,出现报错进行的修改,记录在此作为参考。

你可能感兴趣的:(vrep教程)