編譯大型項(xiàng)目記錄
基本以下面這種模板形式來記錄
1.直接報(bào)的錯(cuò)誤
2.分析錯(cuò)誤原因
3.嘗試的解決方法
4.最終解決的方法
Python.h: 沒有那個(gè)文件或目錄
RVS python 依賴python3
sudo apt-get install python3-dev
/usr/include/c++/5/bits/list.tcc:348:20: error: no match for ‘operator<’ (operand types are ‘RVS::Robotics::LieGroup::SO2<double>’ and ‘RVS::Robotics::LieGroup::SO2<double>’)
可能是需要C++14
是eigen 出問題了昨寞,使用不是我自己在 RVS/install 的eigen 削咆,而是之前install 在系統(tǒng)里面的eigen
from /usr/include/eigen3/Eigen/
cmake 尋找路徑可能先從user/include, 如何在cmake 里面強(qiáng)制指定eigen路徑\
卸載eigen :
sudo rm -rf /usr/include/eigen3 /usr/lib/cmake/eigen3 /usr/share/doc/libeigen3-dev /usr/share/pkgconfig/eigen3.pc /var/lib/dpkg/info/libeigen3-dev.list /var/lib/dpkg/info/libeigen3-dev.md5sums
安裝eigen3.2
error: ‘using MatXd = RVS::Common::Mat<double, -1, -1> {aka class Eigen::Matrix<double, -1, -1, 3, -1, -1>}’ has no member named ‘bdcSvd’
又是eigen 問題,svd 庫沒有編譯,找不到svd
temp solution :
注釋掉通過svd分解部分(這個(gè)解決方法有點(diǎn)敷衍萌衬,但是他們提供了兩種方法來求署咽,應(yīng)該也是有同樣的問題)
// dthetalist = jacobian.BDCSVD(Eigen::ComputeThinU | Eigen::ComputeThinV).solve(pose_error);
dthetalist = jacobian.colPivHouseholderQr().solve(pose_error);
MatXd pinvJb = (jacobian.transpose() * jacobian).inverse() * jacobian.transpose();
dthetalist = pinvJb * pose_error;
4. /home/deng/ros/RVS/Source/RVS/Include/RVS/Robotics/RobotController/GenericRobotController.h:13:26: fatal error: ReflexxesAPI.h: 沒有那個(gè)文件或目錄
沒有安裝RML,直接從github找到的有些問題,按照readme里面的編譯不成功,后來是在其他地方找到的源碼,但還是有一個(gè)問題罚斗,原來的CMakeLists
里面鏈接的是libTypeIIRML.a
,我在RML編譯之后的靜態(tài)庫里面只看到了libReflexxesTypeII.a
,并且還需要在rml的makefile 里面修改 g++ ,添加-fPIC
生成地址無關(guān)的代碼.
TO-DO 以后在fix
5./home/deng/ros/RVS/Source/RVS/Modules/Robotics/Kinematics/OpswKinematics.cpp:225:23: error: ‘isnan’ was not declared in this scope
參考描述
解決:添加作用域搀愧,std::isnan()
/home/deng/ros/RVS/Install/FCL/include/fcl/math/constants.h:131:1: error: expected primary-expression before ‘typedef’
出問題的代碼:typedef typename detail::ScalarTrait<S>::type Real;
參考鏈接:
https://github.com/flexible-collision-library/fcl/issues/339
fcl版本問題惰聂,ubuntu ros-kinetic安裝的fcl
與我自己源碼安裝的版本不一致(detail explainhttps://github.com/flexible-collision-library/fcl/issues/330#issuecomment-426004155``)`
于是我源碼安裝fcl-0.5
與ros 里面保持一致(后期要是換了新的環(huán)境,沒有ros 應(yīng)該就不會(huì)有這個(gè)問題)
7./home/deng/ros/RVS/Source/RVS/Include/RVS/Robotics/LieGroup/SO2Tangent.h:413:23: error: call of overloaded ‘Matrix(int)’ is ambiguous
初步發(fā)現(xiàn)可能是gazebo
里面的類型與之沖突
卸載gazebo
解決:
直接注釋掉所有 CHECK(t1.Coeffs() == Vec(0));
,這個(gè)不是解決問題的方法咱筛,只是為了能夠通過編譯
TO-DO
[ 58%] Linking CXX shared module ../../../../Lib/Python/RVS/Robotics/PyRobotics.cpython-35m-x86_64-linux-gnu.so lto-wrapper: fatal error: /usr/bin/c++ returned 1 exit status
編譯pybind 鏈接出現(xiàn)問題,lto-wrapper
嘗試關(guān)閉杆故,或者換成高版本編譯器
未解決
心得
no need to build all project ,is too big ,even if I found solution ,it have no benefit for I learning code ,besides ,if I fast complie all project ,I will not spend time in this project ,this is human’s weakness.
For now I can learn some already build bin , like ompl and SE3.