我是靠谱客的博主 甜美斑马,这篇文章主要介绍Ubuntu18.04 安装Sophus并配置/[解决问题]so2.cpp:error: lvalue required as left…unit_complex_.real() = 1/0,现在分享给大家,希望可以做个参考。

本博客的环境为Ubuntu18.04.

安装教程

使用下列命令来下载sophus。

git clone https://github.com/strasdat/Sophus.git

进入Sophus文件夹。

cd Sophus

如果使用下列命令会提示错误,可使用git checkout -b a621ff 试试。

git checkout a621ff

创建编译文件夹,命名为build。

mkdir build

进入编译文件夹。

cd build

cmake一下。

cmake ..

这里也可以使用make -j等命令速度会稍快一些,但如果电脑性能不佳,还是使用make命令较好。

make

编译安装。

sudo make install

遇到的问题:

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

最后

以上就是甜美斑马最近收集整理的关于Ubuntu18.04 安装Sophus并配置/[解决问题]so2.cpp:error: lvalue required as left…unit_complex_.real() = 1/0的全部内容,更多相关Ubuntu18.04内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(114)

评论列表共有 0 条评论

立即
投稿
返回
顶部