gaoxiang12 / slambook

MIT License
6.86k stars 3.26k forks source link

ch4 sophus编译出错 #56

Open wangcaimeng opened 6 years ago

wangcaimeng commented 6 years ago

按照书上的要求获取了非模板类的Sophus 编译时出现错误 /Users/wangcaimeng/Sophus/sophus/so2.cpp:32:24: error: expression is not assignable unitcomplex.real() = 1.;


/Users/wangcaimeng/Sophus/sophus/so2.cpp:33:24: error: expression is not
      assignable
  unit_complex_.imag() = 0.;
  ~~~~~~~~~~~~~~~~~~~~ ^
2 errors generated.
make[2]: *** [CMakeFiles/Sophus.dir/sophus/so2.cpp.o] Error 1
make[1]: *** [CMakeFiles/Sophus.dir/all] Error 2
make: *** [all] Error 2

求指点
wangcaimeng commented 6 years ago

刚刚找到了解决方案。。Note: if you encounter some lvalue errors for unitcomplex.imag() = 0.;, you may change that code to unitcomplex.imag(0.);