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