当前位置: 首页 > 工具软件 > Indigo Engine > 使用案例 >

ros与vrep通信:ROS Indigo+ubuntu14.04.4+V-REP_PRO_EDU_V3_3_1_64_Linux

丁经国
2023-12-01

纸上得来终觉浅,绝知此事要躬行。

前后绕了很多弯路,最后发现只要按照vrep的官方教程安装就没有问题,不需要安装什么vrep-ros-bridge

不需要安装什么vrep-ros-bridge.不需要安装什么vrep-ros-bridge!!!

重要的事情说三遍!!


地址在http://www.coppeliarobotics.com/helpFiles/en/rosTutorialIndigo.htm

1. 安装ros indigo

参考官方教程一步一步来,应该没有问题。

教程地址:http://wiki.ros.org/indigo/Installation/Ubuntu

2. 创建catkin_ws

http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment

按照教程就行。

3. 安装catkin_tools

也有相应的教程,按照其中的ubuntu那部分来做就行。安装这个主要是为了之后会用到catkin build

http://catkin-tools.readthedocs.io/en/latest/installing.html


4. 进入安装vrep的文件下的compiledRosPlugins这个文件,复制两个文件

libv_repExtRos.so和libv_repExtRosInterface.so到vrep文件夹下。

5. 进入安装vrep的文件下的programming/ros_packages这个文件夹,

把它下面的八个文件夹都复制到~/catkin_ws/src中。就是ros_bubble_rob,vrep_plugin还有其他六个

6. $ sudo apt-get install ros-indigo-pr2-controllers ros-indigo-joystick-drivers

7. 回到catkin目录下

$~/catkin_ws

$ export VREP_ROOT=~/path/to/v_rep/folder

这里~/path/to/v_rep/folder换成自己装VREP的文件夹
$ catkin build

只要没报错就大功告成啦!!按照上面的一步一步来,我没有报错哈!

8.这里我加了一步 

$ sudo gedit ~/.bashrc

在最后加一行:

source ~/catkin_ws/devel/setup.bash

这样就可以用roscd找到刚才安装的那些包啦。

检验是否成功:

1. roscd检验

$ roscd vrep_ros_interface
$ roscd vrep_plugin
$ roscd vrep_common
$ roscd vrep_joy
$ roscd ros_bubble_rob
$ roscd ros_bubble_rob2
$ roscd vrep_skeleton_msg_and_srv
$ roscd vrep_plugin_skeleton

应该都能找到

2. 打开vrep

$ roscore

进入安装VREP的文件夹,

$ ./vrep.sh

看下终端有没有报错,正常的话应该不会报错。

是这样的:

Simulator launched.
Plugin 'MeshCalc': loading...
Plugin 'MeshCalc': load succeeded.
Plugin 'BubbleRob': loading...
Plugin 'BubbleRob': load succeeded.
Plugin 'Collada': loading...
Plugin 'Collada': load succeeded.
Plugin 'ConvexDecompose': loading...
Plugin 'ConvexDecompose': load succeeded.
Plugin 'CustomUI': loading...
Plugin 'CustomUI': load succeeded.
Plugin 'DynamicsBullet-2-78': loading...
Plugin 'DynamicsBullet-2-78': load succeeded.
Plugin 'DynamicsBullet-2-83': loading...
Plugin 'DynamicsBullet-2-83': load succeeded.
Plugin 'DynamicsNewton': loading...
Plugin 'DynamicsNewton': load succeeded.
Plugin 'DynamicsOde': loading...
Plugin 'DynamicsOde': load succeeded.
Plugin 'DynamicsVortex': loading...
Plugin 'DynamicsVortex': load succeeded.
Plugin 'ExternalRenderer': loading...
Plugin 'ExternalRenderer': load succeeded.
Plugin 'K3': loading...
Plugin 'K3': load succeeded.
Plugin 'LuaRemoteApiClient': loading...
Plugin 'LuaRemoteApiClient': load succeeded.
Plugin 'Mtb': loading...
Plugin 'Mtb': load succeeded.
Plugin 'OMPL': loading...
Plugin 'OMPL': load succeeded.
Plugin 'OpenMesh': loading...
Plugin 'OpenMesh': load succeeded.
Plugin 'PovRay': loading...
Plugin 'PovRay': load succeeded.
Plugin 'Qhull': loading...
Plugin 'Qhull': load succeeded.
Plugin 'RRS1': loading...
Plugin 'RRS1': load succeeded.
Plugin 'ReflexxesTypeIV': loading...
Plugin 'ReflexxesTypeIV': load succeeded.
Plugin 'RemoteApi': loading...
Starting a remote API server on port 19997
Plugin 'RemoteApi': load succeeded.
Plugin 'Ros': loading...
Plugin 'Ros': load succeeded.
Plugin 'RosInterface': loading...
Plugin 'RosInterface': load succeeded.
Plugin 'SimpleFilter': loading...
Plugin 'SimpleFilter': load succeeded.
Plugin 'Urdf': loading...
Plugin 'Urdf': load succeeded.
Plugin 'Vision': loading...
Plugin 'Vision': load succeeded.
Using the 'MeshCalc' plugin.
Checking for an updated V-REP version...
qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method
qt.network.ssl: QSslSocket: cannot resolve SSLv2_server_method
Failed checking whether this V-REP version is up-to-date.
Please visit www.coppeliarobotics.com to verify
that you are running the last V-REP version.
Initializing the Bullet physics engine in plugin 'DynamicsBullet_2_78'...
Engine version: 2.78
Plugin version: 8
Initialization successful.
然后看下vrep是否能正常仿真,就完成啦。


 类似资料: