ubuntu環境下Sophus的安裝方式(有現成安裝包)

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就會通過,有警告好像不用管。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章