Ubuntu安装Sophus报错:so2.cpp:error: lvalue required as left operand of assignment. unit_complex_.real() = 1.;

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.);
    }

 

 

 

 

posted @ 2020-08-15 11:30  Yu_tiann  阅读(3103)  评论(0编辑  收藏  举报