ubuntu安裝Sophus報錯(系統版本:18.04)
遇到的問題:
/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.;
解決辦法:
找到/Sophus/sophus目錄下so2.cpp文件,如下代碼:
SO2::SO2()
{
unit_complex_.real() = 1.;
unit_complex_.imag() = 0.;
}
將其修改為:
SO2::SO2()
{
unit_complex_.real(1.);
unit_complex_.imag(0.);
}