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

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