问题标签 [g2o]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
227 浏览

c++ - 尝试执行 .exe 文件 c++ 项目 g2o 时没有任何反应

在此处输入图像描述我通过为 c++ 项目 g2o 运行“make”来生成 .exe 文件。但是,当我尝试执行它们时,会在短时间内出现一个黑色窗口,但没有其他任何反应。这是否意味着创建它们时出现问题?我使用来自https://github.com/RainerKuemmerle/g2o的源代码再次生成了它们,这导致了同样的问题。

0 投票
0 回答
1392 浏览

c++ - 如何使用 g2o 进行捆绑调整

我正在尝试使用 g2o 来细化通过多视图系统获得的 3D 点。我通过三角测量获得了 3D 点,并且对于每次采集,我都有相对姿势和 2D 特征。

我会使用 g2o 优化 3D 点以进行图形优化,以减少重投影误差。

有人有这方面的经验吗?我看到有很多类型的顶点和边,但我不明白哪一种更适合我的应用程序。

我试图按照 g2o 的示例文件夹中的“sba_demo.cpp”,但它似乎没有使用 2D 对应。

0 投票
2 回答
1288 浏览

point-clouds - 循环闭合 3d 点云

我希望了解如何实现一个简单的闭环算法。

这是我的情况:我有 x 个点云,并且我在 3d 中使用了配准算法,它给了我所有这些点云的姿势。

最后,我或多或少地在我的地图上的同一点结束,但有漂移。我可以使用我的配准算法来查看我的实际最终点云相对于我的初始点云的位置。

知道了这一点,我想根据我计算的“漂移”对我的其余点云进行全局优化,一直到我的初始点云。

我已经设法快速编写了一些关于翻译的代码,这似乎是正确的,但是旋转是有问题的,因为特征(墙壁等)的准确性/叠加降低了。

我一直在看:g2o、GTSAM、ISAM 库,都在寻求优化,但我觉得实现这些有很大的开销,它们都需要多个约束,设置大量参数等。

我什至不希望自动检测循环(我稍后会这样做),我只想这样做:这两个点云代表一个循环,在它们之间传播(正确)平移和旋转的漂移(我计算)到两者之间的所有点云。

提前致谢,

0 投票
1 回答
436 浏览

macos - OS X 上的 libg2o 链接器错误

我收到以下链接器错误:

与 g2o 链接时。

该库列在它所链接的库中,并且 nm 显示符号在那里。

要重现此问题,请按照以下步骤操作:

现在,要获取链接器错误:

这应该会产生上面记录的链接器错误。

0 投票
0 回答
137 浏览

opencv - g2o 与 /g2o-master/g2o/examples/ba/ba_demo.cpp 上的 opencv 冲突?

当我在 /g2o-master/g2o/examples/ba/ba_demo.cpp 上测试 g2o 时,CMakeList.txt 如下所示:

注意最后一行的 ${OpenCV_LIBS}。

运行 ba_demo,出现错误:“ * `../bin/ba_demo' 中的错误:malloc():内存损坏:0x00000000007b9320 * 中止(核心转储)”。

我的代码有什么问题吗?

0 投票
0 回答
1031 浏览

c++ - 使用 g2o 执行捆绑调整时出现分段错误

我已经定义了一个函数来使用 g2o 执行捆绑调整,但是当我运行可执行文件时终端断言了分段错误。我确信问题来自这个函数,因为注释掉这个函数后整个程序可以正常运行。

我的平台是 Ubuntu16.04 LTS。

EDIT1:我尝试添加set( CMAKE_BUILD_TYPE "Release" ) 我的 CMakeLists.txt。然后终端在运行可执行文件后断言双重释放或损坏(out) 。但是,在我注释掉以下代码块后它运行正常:

EDIT2:一旦我使用了CameraParameter的默认构造函数,整个程序就可以正常运行:

但是,分段错误仍然存​​在。

EDIT3:注释掉以下代码后不再出现分段错误:

0 投票
0 回答
735 浏览

c++ - 错误:使用 g2o 执行捆绑调整时来自 Eigen 的“数据未对齐”

我用 g2o 定义了一个派生类:

我重写了computerError() 和linearizeOplus():

通过以下代码优化姿势(变量Tcr_estimated_内联器的输出结果cv::solvePnPRansac()):

在运行整个系统时,终端给出以下错误信息:

我确认问题来自优化部分。谁能帮忙?

0 投票
0 回答
1077 浏览

linux - Ubuntu如何使用cmake /usr/bin/ld链接g2o:找不到-lg2o_core_d

当我运行时,make我得到了这个输出。如何使用 cmake 链接 g2o 库。CMake 在编写构建文件时没有问题。

这是我的 CMakeLists.txt 文件

0 投票
1 回答
71 浏览

g2o - g2o_viewer 无法启动 (0xc000007b)

我在 Windows 7 上构建了 g2o 库

  • Qt 5.6
  • 特征 3.3.4
  • libQGLViewer-2.7.1。

一切编译正常,但在 g2o_viewer 的第一次运行时,程序抱怨缺少 QGLViewer2.dll。因此,我将其添加到目录中。

第二次启动后,我从标题中得到应用程序错误......

0 投票
1 回答
205 浏览

c++11 - G2O BlockSolver Initialization Crash on Unix System

I have a project which possesses and uses G2O library, it runs on both platforms(win/Unix).

(WINDOW PASSED / UNIX CRASHED)

We can see in both platforms, these lines:

Next steps, in window os we have this:

But Unix system can't compile those lines because it says

my_file_G2o.cpp: *In member function 'int Refiner_G2O::refinePose(cv::Mat&, const std::vector >&, const std::vector&, const cv::Mat&, float, std::vector&)': my_file_G2o.cpp --> no matching function for call to 'g2o::BlockSolver::BlockSolver(g2o::BlockSolver::LinearSolverType&)'* ^ In file included from G2o/include/g2o/core/block_solver.h:199:0, G2o/include/g2o/core/block_solver.hpp:40:1: note: candidate: g2o::BlockSolver::BlockSolver(std::unique_ptr) [with Traits = g2o::BlockSolverTraits<6, 3>; typename Traits::LinearSolverType = g2o::LinearSolver >] BlockSolver::BlockSolver(std::unique_ptr linearSolver)

When I see these errors, I complete my Unix code with this new block

So now, I can build/run but I meet a segfault on the line with [SEGFAULT LINE] tag.

EDIT: After step to step debug with debug build I have a few news pieces of information:

// DEBUG --> And here, with "step into" he go to this "/usr/include/c++/6/bits/move.h" and in the ligne 48 we can see this function:

And he segfault because she have a bad args.

I don't understand, why? if someone has an idea I want to understand how in Window it works and not in Unix system, will feel wonderful if you help.

LINUX Version: Ubuntu 16.04
CMAKE Version: 3.11.4

Best regards,