Ubuntu 自动安装openrave (Ubuntu 14 / 16 / 18 /20 .04)

目录

安装过程

解决问题

1.OpenSceneGraph:  conversion of ‘-1’ from ‘int’ to ‘char’

2.OpenRAVE:  SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Sympy requires Python 2.5 or newer. Python %d.%d detected" % \)?

​​​​​​​​​​​​​​3.OpenRAVE:  rapidjson library not found

4.OpenRAVE:  Should have installed pybind11; CMake will exit.

5.OpenRAVE:  install DIRECTORY given no DESTINATION!,  install FILES given no DESTINATION!

6.OpenRAVE:  candidate expects 2 argments, 3 provided

7. OpenRAVE:  无解,我不会。。。。。。搜不到 

安装结果

1     ./install-dependencies.sh

2.    ./install-osg.sh

3    ./install-fcl.sh


首先声明:Ubuntu 20.04还是有些问题,在最终编译O怕呢RAVE时无法解决

发现git clone 不好用时可以Ctri + C 退出后重新下载,也可以想办法走非常规途径从github中,直接下载对应的zip压缩包,并解压至    ~/git/   中。

下载OpenSceneGraph和FCL的指令如下所示(分别从install-osg.sh 和 install-fcl.sh 中摘出来的,便于不使用git自己下载zip)

git clone https://github.com/openscenegraph/OpenSceneGraph.git
git clone https://github.com/flexible-collision-library/fcl

Ubuntu 14.04 和 16.04 下载的OpenRAVE是这个

git clone https://github.com/rdiankov/openrave.git

而 Ubuntu 18.04 和 20.04 下载的OpenRAVE为

git clone -b production https://github.com/rdiankov/openrave.git

下载好后,可以放在 ~/git文件夹中并改名


安装过程

点击下面的链接,下载自动安装脚本     openrave-installation

https://github.com/crigroup/openrave-installation

下载zip并在Ubuntu中解压,在终端进入解压后的文件夹,依次输入下面的指令进行安装

./install-dependencies.sh
./install-osg.sh
./install-fcl.sh
./install-openrave.sh

在自动安装fcl最后的编译过程中,可能会报非常非常多的错误,然后在表面上卡在某处。不用管这些,等一会应该就编译好了。


解决问题

1.OpenSceneGraph:  conversion of ‘-1’ from ‘int’ to ‘char’

​​​​​​​
这是一个编译错误,发生在 ConvertBase64.cpp 文件中的 base64_decode_value 函数中,原因是尝试将 int 类型的 -1 和 -2 值转换为 char 类型导致的范围收缩(narrowing conversion)问题。

所以将这些值从 int 类型转换为 signed char 可以避免这种范围收缩问题。有3个文件需要把数组从char类型转变为unsigned char类型

根据上图的报错位置,打开对应的文件,我这里使用的是vim,也可以gedit、nano或在文件app中用文本编辑器打开,看自己习惯

vim ~/git/OpenSceneGraph/src/osgDB/ConvertBase64.cpp

出现问题的数组在第31行,在 char 前加上 signed,保存并退出

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值