目录
1.OpenSceneGraph: conversion of ‘-1’ from ‘int’ to ‘char’
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
首先声明: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,保存并退出