Sophus的安裝包我放在了我的百度雲盤,需要的可以自行下載(我發現用命令下載好像很慢)
鏈接:Sophus.tar.gz安裝包
提取碼:hmpi
- 下載完成後,放在相應目錄下,解壓,依次執行命令:
cd Sophus
git checkout a621ff
mkdir build
cd build
cmake ..
make
- 編譯過程遇到的問題
/Sophus/sophus/so2.cpp:32:26: error: lvalue required as left operand of assignment
unit_complex_.real() = 1.;
/Sophus/sophus/so2.cpp:33:26: error: lvalue required as left operand of assignment
unit_complex_.imag() = 0.; - 解決辦法
將Sophs/sophs/so2.cpp中的
SO2::SO2()
{
unit_complex_.real() = 1.;
unit_complex_.imag() = 0.;
}
修改爲
SO2::SO2()
{
unit_complex_.real(1.);
unit_complex_.imag(0.);
}
如圖所示
就這樣重新編譯make就會通過,有警告好像不用管。