参考资料:

ROS安装: ros 是一个framework 和Android有点像,内核用的linux。Ros提供了一种供机器人开发者迅速上手的一个平台,

可以快速搭建自己的应用,利用ros下面自带的应用,不需要自己再重复写程序。

1、ros官网资料很多

http://www.ros.org/ ros官网

Ros与Vrep平台搭建-编程之家

点击进入wiki ,里面有ros安装等一系列教程。

Ros与Vrep平台搭建-编程之家

2、注重平台选择,相应的Ubuntu版本对应着相应的Ros版本。这点需要大家搞清楚。

平台选择: Ubuntu: 14.04

Ros : Jade

Ros与Vrep平台搭建-编程之家

Ros与Vrep平台搭建-编程之家

小助手:如何查看ros安装版本。

先打开一个终端,运行roscore.
再打开另一个终端,输入 rosparam list , rosparam get /rosdistro ,此时显示ros的版本信息。

当我们用虚拟机安装的话,只需要拷贝相应的虚拟机.vmx文件即可。

Ros 务必需要运行在一个模拟器上面,作为ros的插件。Roslaunch相关

需要强调的是:这里的模拟器是一个程序包,ROS必须的 ros-tutorials.

Ros与Vrep平台搭建-编程之家

Ros与Vrep平台搭建-编程之家

3、安装Vrep

搜索Vrep 安装,打开主页,选择相应的版本进行安装。

Ros与Vrep平台搭建-编程之家

目前我们选择的是 PRO-EDU-V3_3_1_64.

Ros与Vrep平台搭建-编程之家

Vrep 本身是一个开源项目,只需要git 就可以把Vrep 给下载下来。当然,需要我们选择合适的版本。

Ros与Vrep平台搭建-编程之家

Ros与Vrep平台搭建-编程之家

建立文件夹,我们可以先在windows里面下载好,然后通过VMware直接复制到Ubuntu里面去,但要主要权限问题,有些地方.tar文件是粘贴不进去的。

只有Home目录可以凑合一下。还有就是上面提到的ros下面需要建立模拟器。

Ros与Vrep平台搭建-编程之家

打开VREP程序:通过.sh脚本文件打开。

Ros与Vrep平台搭建-编程之家

4、安装完VREP和ROS之后,如何进行两者间等人通信?

需要安装插件,Vrep_ros_bridge.git

Ros与Vrep平台搭建-编程之家

在gitHub上面有详细的安装过程,大家可以去参考。

Ros与Vrep平台搭建-编程之家

此插件安装过程中,可能并不会成功,因为有些直接或间接依赖。

Ros与Vrep平台搭建-编程之家

可以尝试安装 其他包,比如下面命令:

Ros与Vrep平台搭建-编程之家

当然,在主文件夹下面,某些插件包里面,如果我们选择 建立 CATKIN_IGNORE时,

此时这个包在编译的时候,并不会发挥作用。当然,在编译之前,务必建立好~/.bashrc命令,且多个终端需要关闭。

不然一直认为没有关闭。

Ros与Vrep平台搭建-编程之家

Ros与Vrep平台搭建-编程之家

此弄完之后,就可以进行通信了。具体见下一期。

插件环境搭建:

这两天安装好vrep的库和插件
http://wiki.ros.org/vrep_ros_bridge

vrep_ros_bridage installation:

final solve method:

###Installation Plugin

1 Go in the src folder of your catkin workspace in catkin_ws/src via terminal

2 Download the plugin from GIT typing:

`git clone https://github.com/lagadic/vrep_ros_bridge.git`

Delete the file “quadrotor_tk_handler” for it has a strange depends package “telekyb_msgs” which is useless for us and will result a missing package error.

3 Open the file bashrc:

gedit ~/.bashrc

in the end of the file add:

export VREP_ROOT_DIR=/ChangeWithyourPathToVrep

and, if you want to avoid to type the following command every time(not mandatory):

export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/path_to_catkin_ws/catkin_ws/src

source /opt/ros/indigo/setup.bash

source /path_to_catkin_ws/catkin_ws/devel/setup.bash

4 Go in your catkin_workspace and run:

catkin_make

5 Now build again the pkg using the next instruction:

catkin_make –pkg vrep_ros_bridge –cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo

使用终端到V-Rep安装目录下,并输入:

ln -s /YOUR_CATKIN_WS_PATH/devel/lib/libv_repExtRosBridge.so

(very important: notice that you should first “cd VREP_INSTALL_FOLDER”, and in this folder input “ln -s /YOUR_CATKIN_WS_PATH/devel/lib/libv_repExtRosBridge.so” which means you should put the link of libv_repExtRosBridge.so in the vrep startup path)

7 If you are using a new version of V-REP (V3_3_1_64_Linux) we need an additional step. We need to create a link pointing to the file compiledRosPlugins/libv_repExtRos.so in the V-REP root folder. Go via terminal to the installation folder of V-Rep and type: (it’s optional)

ln -s compiledRosPlugins/libv_repExtRos.so

other link:

http://www.forum.coppeliarobotics.com/viewtopic.php?f=9&t=1401

http://docs.ros.org/jade/api/vrep_ros_plugin/html/

http://m.blog.csdn.net/article/details?id=49401881

https://github.com/lagadic

http://www.coppeliarobotics.com/helpFiles/en/rosTutorialIndigo.htm

http://www.v-rep.eu/helpFiles/

Eigen error:

http://answers.ros.org/question/207881/build-failed-in-jenkins-eigen-dependency-in-indigo/