ubuntu16.04下安装v-rep

1:首先去官网下载http://coppeliarobotics.com/downloads

如下图所示,选择linux版本,教育版

ubuntu16.04下安装v-rep_第1张图片

 

选择ubuntu16.04的版本。并选择教育版

ubuntu16.04下安装v-rep_第2张图片

 

2:将windows中下载好的文件放到ubuntu虚拟机中,

执行 xz -d CoppeliaSim_Edu_V4_0_0_Ubuntu16_04.tar.xz 其中xz是linux的解压缩命令,举例如下,具体很多用法可以百度

xz -d 1.txt.xz

 解压缩,解压缩后压缩包消失

 

从下图可见,解压缩后,xz文件没有了,只剩下tar文件。

ubuntu16.04下安装v-rep_第3张图片

然后执行 tar -xvf CoppeliaSim_Edu_V4_0_0_Ubuntu16_04.tar继续解压

ubuntu16.04下安装v-rep_第4张图片

解压完成后添加路径

echo 'export VREP_ROOT="$/opt/v-rep/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04"' >> ~/.bashrc

source ~/.bashrc

 

3:然后在终端中运行roscore开启ROS master,接着执行coppeliaSim.sh脚本打开VREP,这里不再叫vrep.sh. 

ubuntu16.04下安装v-rep_第5张图片

如上图所示,没出现问题,记录log如下

Loading the CoppeliaSim library...
Done!
Launching CoppeliaSim...
lib: 1
lic: 1

CoppeliaSim Edu V4.0.0. (rev. 4)
Using the default Lua library.
Loaded the video compression library.
Add-on script 'simAddOnScript-addOnScriptDemo.lua' was loaded.
Add-on script 'simAddOnScript-b0RemoteApiServer.lua' was loaded.
Add-on script 'simAddOnScript_PyRep.lua' was loaded.
If CoppeliaSim crashes now, try to install libgl1-mesa-dev on your system:
>sudo apt install libgl1-mesa-dev
OpenGL: VMware, Inc., Renderer: SVGA3D; build: RELEASE;  LLVM;, Version: 3.0 Mesa 18.0.5
...did not crash.
Simulator launched.
Plugin 'Geometric': loading...
Plugin 'Geometric': load succeeded.
Plugin 'Assimp': loading...
Plugin 'Assimp': warning: replaced variable 'simAssimp'
Plugin 'Assimp': load succeeded.
Plugin 'BlueZero': loading...
Plugin 'BlueZero': warning: replaced variable 'simB0'
Plugin 'BlueZero': load succeeded.
Plugin 'BubbleRob': loading...
Plugin 'BubbleRob': load succeeded.
Plugin 'Bwf': loading...
Plugin 'Bwf': load succeeded.
Plugin 'CodeEditor': loading...
Plugin 'CodeEditor': load succeeded.
Plugin 'Collada': loading...
Plugin 'Collada': load succeeded.
Plugin 'ConvexDecompose': loading...
Plugin 'ConvexDecompose': load succeeded.
Plugin 'CustomUI': loading...
Plugin 'CustomUI': warning: replaced variable 'simUI'
Plugin 'CustomUI': warning: replaced function 'simUI.insertTableRow@CustomUI'
Plugin 'CustomUI': warning: replaced function 'simUI.removeTableRow@CustomUI'
Plugin 'CustomUI': warning: replaced function 'simUI.insertTableColumn@CustomUI'
Plugin 'CustomUI': warning: replaced function 'simUI.removeTableColumn@CustomUI'
Plugin 'CustomUI': warning: replaced function 'simUI.setScene3DNodeParam@CustomUI'
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 'ICP': loading...
Plugin 'ICP': warning: replaced variable 'simICP'
Plugin 'ICP': load succeeded.
Plugin 'Image': loading...
Plugin 'Image': warning: replaced variable 'simIM'
Plugin 'Image': load succeeded.
Plugin 'K3': loading...
Plugin 'K3': load succeeded.
Plugin 'Lic': loading...
Plugin 'Lic': load succeeded.
Plugin 'LuaCommander': loading...
Plugin 'LuaCommander': warning: replaced variable 'simLuaCmd'
Plugin 'LuaCommander': load succeeded.
Plugin 'LuaRemoteApiClient': loading...
Plugin 'LuaRemoteApiClient': load succeeded.
Plugin 'Mtb': loading...
Plugin 'Mtb': load succeeded.
Plugin 'OMPL': loading...
Plugin 'OMPL': warning: replaced variable 'simOMPL'
Plugin 'OMPL': load succeeded.
Plugin 'OpenGL3Renderer': loading...
Plugin 'OpenGL3Renderer': load succeeded.
Plugin 'OpenMesh': loading...
Plugin 'OpenMesh': load succeeded.
Plugin 'Qhull': loading...
Plugin 'Qhull': load succeeded.
Plugin 'RRS1': loading...
Plugin 'RRS1': load succeeded.
Plugin 'ReflexxesTypeII': loading...
Plugin 'ReflexxesTypeII': load succeeded.
Plugin 'RemoteApi': loading...
Starting a remote API server on port 19997
Plugin 'RemoteApi': load succeeded.
Plugin 'SDF': loading...
Plugin 'SDF': warning: replaced variable 'simSDF'
Plugin 'SDF': load succeeded.
Plugin 'SurfaceReconstruction': loading...
Plugin 'SurfaceReconstruction': warning: replaced variable 'simSurfRec'
Plugin 'SurfaceReconstruction': load succeeded.
Plugin 'Urdf': loading...
Plugin 'Urdf': load succeeded.
Plugin 'Vision': loading...
Plugin 'Vision': load succeeded.
Using the 'Geometric' plugin.
SSL: OpenSSL 1.1.1b  26 Feb 2019
Checking for an updated CoppeliaSim version...
Failed checking whether this CoppeliaSim version is up-to-date.
Please visit www.coppeliarobotics.com to verify
that you are running the last CoppeliaSim version.
 

但是从上面可以看到并没有其他人描述的rosinterface接口启动成功的提示。

4:下面安装rosinterface

RosInterface是V-rep官方推荐的用来跟ROS通信的插件

首先将compliedRosPlugins中的so文件复制到根目录下。

ubuntu16.04下安装v-rep_第6张图片

ubuntu16.04下安装v-rep_第7张图片

 

然后重启,发现有interface

Plugin 'ROSInterface': loading...
Plugin 'RosInterface': warning: replaced variable 'simROS'
Plugin 'ROSInterface': load succeeded.

 

开启一个新终端,输入rosnode list查看运行的ros节点。可以看到除了ros master以外sim_ros_interface也成功运行:

ubuntu16.04下安装v-rep_第8张图片

5:安装rosbridge

vrep_ros_bridge是ROS官方推荐的用来跟V-rep通信的插件,所有需要的文件与相关指引都可以查看github:https://github.com/lagadic/vrep_ros_bridge

首先从git拉取

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

暂时不知道怎么用,先不装了,用到的时候再说,否则又忘记了。可以参考git中的安装步骤进行。

 

你可能感兴趣的:(Robot)