《视觉SLAM十四讲》报错信息和解决方案

这篇具有很好参考价值的文章主要介绍了《视觉SLAM十四讲》报错信息和解决方案。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

ch4-Sophus编译报错

  • 报错信息:
error: lvalue required as left operand of assignment
   unit_complex_.real() = 1.;
                          ^~
error: lvalue required as left operand of assignment
   unit_complex_.imag() = 0.;
                          ^~
CMakeFiles/Sophus.dir/build.make:65: recipe for target 'CMakeFiles/Sophus.dir/sophus/so2.cpp.o' failed
  • 解决方法:修改Sophus下的so2.cpp文件
    • 将下面这个修改一下:

      unit_complex_.real() = 1.;
      unit_complex_.imag() = 0.;
      
    • 修改为:

      unit_complex_.real(1.);
      unit_complex_.imag(0.);
      

ch5/imageBasics安装opencv4.x报错

  • 环境:Unbuntu22.04,安装opencv4.x
  • 报错信息:
libgtk2.0-dev : 依赖: libgdk-pixbuf-2.0-dev (>= 2.21.0) 但无法安装它 或 libgdk-pixbuf2.0-dev (>= 2.21.0) 但无法安装它
  • 解决方案:参照https://blog.csdn.net/qq_51022848/article/details/128095476

ch5/joinMap/CMakeLists.txt编译报错

  • 报错信息:
error: #error PCL requires C++14 or above
  • 我的解决方案:注释掉关于 c++11特性的设置
# set( CMAKE_CXX_FLAGS "-std=c++11 -O3")

ch5/joinMap-pcl_viewer map.pcd报错

  • 环境:Mac中的Ubuntu22.04虚拟机

  • 报错信息:在生成map.pcd地图之后执行pcl_viewer map.pcd报错:

    $ ch5/joinMap$ pcl_viewer map.pcd 
    2023-07-31 21:33:35.519 (   0.006s) [        C7314880] vtkContextDevice2D.cxx:32    WARN| Error: no override found for 'vtkContextDevice2D'.
    The viewer window provides interactive commands; for help, press 'h' or 'H' from within the window.
    > Loading map.pcd 2023-07-31 21:33:35.647 (   0.134s) [        C7314880]vtkOpenGLRenderWindow.c:499    ERR| vtkXOpenGLRenderWindow (0x563c2ae6cf10): Unable to find a valid OpenGL 3.2 or later implementation. Please update your video card driver to the latest version. If you are using Mesa please make sure you have version 11.2 or later and make sure your driver in Mesa supports OpenGL 3.2 such as llvmpipe or openswr. If you are on windows and using Microsoft remote desktop note that it only supports OpenGL 3.2 with nvidia quadro cards. You can use other remoting software such as nomachine to avoid this issue.
    2023-07-31 21:33:35.647 (   0.134s) [        C7314880]     vtkOpenGLState.cxx:1795  WARN| Hardware does not support the number of textures defined.
    2023-07-31 21:33:35.647 (   0.134s) [        C7314880]     vtkOpenGLState.cxx:1795  WARN| Hardware does not support the number of textures defined.
    2023-07-31 21:33:35.648 (   0.134s) [        C7314880]     vtkOpenGLState.cxx:1795  WARN| Hardware does not support the number of textures defined.
    2023-07-31 21:33:35.648 (   0.135s) [        C7314880]     vtkOpenGLState.cxx:1795  WARN| Hardware does not support the number of textures defined.
    2023-07-31 21:33:35.648 (   0.135s) [        C7314880]     vtkOpenGLState.cxx:1795  WARN| Hardware does not support the number of textures defined.
    2023-07-31 21:33:35.648 (   0.135s) [        C7314880]     vtkOpenGLState.cxx:1795  WARN| Hardware does not support the number of textures defined.
    2023-07-31 21:33:35.648 (   0.135s) [        C7314880]     vtkOpenGLState.cxx:1795  WARN| Hardware does not support the number of textures defined.
    [PCLVisualizer::setUseVbos] Has no effect when OpenGL version is ≥ 2
    2023-07-31 21:33:35.655 (   0.141s) [        C7314880]   vtkTextureObject.cxx:1463   ERR| vtkTextureObject (0x563c2b3b8c90): Failed to determine texture parameters. IF=0 F=6408 T=5121
    2023-07-31 21:33:35.655 (   0.141s) [        C7314880]     vtkOpenGLState.cxx:1795  WARN| Hardware does not support the number of textures defined.
    2023-07-31 21:33:35.655 (   0.142s) [        C7314880]     vtkOpenGLState.cxx:1795  WARN| Hardware does not support the number of textures defined.
    2023-07-31 21:33:35.665 (   0.152s) [        C7314880]   vtkShaderProgram.cxx:437    ERR| vtkShaderProgram (0x563c2b250fb0): 1: #version 150
    2: #ifndef GL_ES
    3: #define highp
    4: #define mediump
    5: #define lowp
    6: #endif // GL_ES
    7: #define attribute in
    8: #define varying out
    9: 
    10: 
    11: /*=========================================================================
    12: 
    13:   Program:   Visualization Toolkit
    14:   Module:    vtkPolyData2DVS.glsl
    15: 
    16:   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
    17:   All rights reserved.
    18:   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    19: 
    20:      This software is distributed WITHOUT ANY WARRANTY; without even
    21:      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    22:      PURPOSE.  See the above copyright notice for more information.
    23: 
    24: =========================================================================*/
    25: 
    26: // all variables that represent positions or directions have a suffix
    27: // indicating the coordinate system they are in. The possible values are
    28: // MC - Model Coordinates
    29: // WC - WC world coordinates
    30: // VC - View Coordinates
    31: // DC - Display Coordinates
    32: 
    33: in vec4 vertexWC;
    34: 
    35: // material property values
    36: //VTK::Color::Dec
    37: 
    38: // Texture coordinates
    39: in vec2 tcoordMC; out vec2 tcoordVCVSOutput;
    40: 
    41: // Apple Bug
    42: //VTK::PrimID::Dec
    43: 
    44: uniform mat4 WCVCMatrix;  // World to view matrix
    45: 
    46: void main()
    47: {
    48:   // Apple Bug
    49:   //VTK::PrimID::Impl
    50: 
    51:   gl_Position = WCVCMatrix*vertexWC;
    52:   tcoordVCVSOutput = tcoordMC;
    53:   //VTK::Color::Impl
    54: }
    
    2023-07-31 21:33:35.665 (   0.152s) [        C7314880]   vtkShaderProgram.cxx:438    ERR| vtkShaderProgram (0x563c2b250fb0): 0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, and 1.00 ES
    
    2023-07-31 21:33:35.665 (   0.152s) [        C7314880]   vtkShaderProgram.cxx:437    ERR| vtkShaderProgram (0x563c2b246170): 1: #version 150
    2: #ifndef GL_ES
    3: #define highp
    4: #define mediump
    5: #define lowp
    6: #endif // GL_ES
    7: #define attribute in
    8: #define varying out
    9: 
    10: in vec4 ndCoordIn;
    11: in vec2 texCoordIn;
    12: out vec2 texCoord;
    13: void main()
    14: {
    15:   gl_Position = ndCoordIn;
    16:   texCoord = texCoordIn;
    17: }
    
    2023-07-31 21:33:35.665 (   0.152s) [        C7314880]   vtkShaderProgram.cxx:438    ERR| vtkShaderProgram (0x563c2b246170): 0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, and 1.00 ES
    
    2023-07-31 21:33:35.665 (   0.152s) [        C7314880]vtkOpenGLVertexArrayObj:265    ERR| vtkOpenGLVertexArrayObject (0x563c2b7bf8b0): attempt to add attribute without a program for attribute ndCoordIn
    2023-07-31 21:33:35.665 (   0.152s) [        C7314880]vtkOpenGLQuadHelper.cxx:62    WARN| Error binding ndCoords to VAO.
    2023-07-31 21:33:35.665 (   0.152s) [        C7314880]vtkOpenGLRenderWindow.c:932    ERR| vtkXOpenGLRenderWindow (0x563c2ae6cf10): Couldn't build the shader program for depth blits
    段错误 (核心已转储)
    
  • 核心报错信息:vtkShaderProgram (0x563c2b246170): 0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, and 1.00 ES

  • 可能的解决方案:在Ubuntu虚拟机中运行OpenGL程序时,可能会遇到一些限制,因为虚拟机可能无法直接访问主机系统的显卡硬件。这可能导致OpenGL实现不支持较高版本的GLSL。要解决这个问题,您可以尝试以下方法:

    • 启用3D加速:确保您的虚拟机软件(如VirtualBox、VMware等)已启用3D加速。这通常可以在虚拟机设置的显示或图形部分找到。启用3D加速后,虚拟机将尝试使用主机系统的显卡来提供更好的OpenGL支持。
    • 安装虚拟机工具:确保您已安装了虚拟机软件提供的增强工具(如VirtualBox Guest Additions、VMware Tools等)。这些工具通常包含了针对虚拟机优化的图形驱动程序,可以提高OpenGL性能和兼容性。

    • 使用软件渲染(我是通过这个解决的):如果您无法启用3D加速或安装虚拟机工具,您可以尝试使用软件渲染。这将使用CPU而不是GPU来渲染OpenGL图形,性能可能较差,但可以提供更广泛的GLSL支持。在Ubuntu中,您可以安装Mesa的软件渲染器,例如llvmpipe。要安装llvmpipe,请运行以下命令:

      sudo apt-get install libgl1-mesa-swx11
      
    • 安装完成后,您可以通过设置LIBGL_ALWAYS_SOFTWARE=1环境变量来强制使用软件渲染:文章来源地址https://www.toymoban.com/news/detail-621762.html

      export LIBGL_ALWAYS_SOFTWARE=1 
      

到了这里,关于《视觉SLAM十四讲》报错信息和解决方案的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 《视觉 SLAM 十四讲》V2 第 5 讲 相机与图像

    空间点 投影到 相机成像平面 前面内容总结: 1、机器人如何表示自身位姿 视觉SLAM: 观测 主要是指 相机成像 的过程 。 投影过程描述: 针孔 + 畸变 相机 内参 外参 像素坐标系 与 成像平面之间,相差了一个缩放 和一个原点的平移。 像素坐标系: 原点 o ′ o^{prime} o ′ 位

    2024年02月07日
    浏览(30)
  • 视觉SLAM十四讲|【五】相机与IMU时间戳同步

    Z [ u v 1 ] = [ f x 0 c x 0 f y c y 0 0 1 ] [ X Y Z ] = K P Z begin{bmatrix} u \\\\ v \\\\ 1 end{bmatrix}= begin{bmatrix} f_x 0 c_x \\\\ 0 f_y c_y \\\\ 0 0 1 end{bmatrix} begin{bmatrix} X \\\\ Y \\\\ Z end{bmatrix}= KP Z ​ u v 1 ​ ​ = ​ f x ​ 0 0 ​ 0 f y ​ 0 ​ c x ​ c y ​ 1 ​ ​ ​ X Y Z ​ ​ = K P 其中, K = [ f x 0 c x 0 f y c y 0 0

    2024年01月20日
    浏览(35)
  • 踩坑 Sophus 模板库安装及编译(视觉SLAM 十四讲第二版 ch4 )

    在《视觉slam十四讲》第二版中,第4、7、8、9、10讲都需要Sophus库,因此我们需要安装Sophus库,并且需要的是Sophus模板库,因此很多人因为安装了非模板版本导致报错,下面提供Sophus模板版本安装方式,以及对应不报错版本。 只要是 3.3以上的版本即可 官网进入,然后下载T

    2024年01月22日
    浏览(45)
  • 《视觉 SLAM 十四讲》V2 第 4 讲 李群与李代数 【什么样的相机位姿 最符合 当前观测数据】

    P71 什么样的相机位姿 最符合 当前观测数据。 求解最优的 R , t bm{R, t} R , t , 使得误差最小化。 群 : 只有一个(良好的)运算的集合。 封结幺逆 、 丰俭由你 李群 : 具有连续(光滑)性质的群。 在 t = 0 附近,旋转矩阵可以由 e x p ( ϕ 0 ∧ t ) exp(phi_0^{land}t) e x p ( ϕ 0 ∧ ​ t

    2024年02月07日
    浏览(34)
  • slam十四讲~环境安装以及问题记录

    参考资料: https://zhuanlan.zhihu.com/p/452256687 https://blog.csdn.net/qq_38629044/article/details/95355859 https://blog.csdn.net/Bonaventure/article/details/122835996 https://blog.csdn.net/weixin_44986556/article/details/108962861 https://blog.csdn.net/qq_38364548/article/details/122055690 https://blog.csdn.net/rong11417/article/details/103905794 http

    2023年04月15日
    浏览(25)
  • 机器人学|手机玻璃加工全自动化——AGV+机器人+视觉解决方案(含双目三维视觉SLAM建图、MATLAB的AGV路径规划导航避障、六轴机械手臂建模与路径规划仿真,附带源代码)

    文章目录 前言 一、国内外移动操作机器人现状 二、方案概述 三、主要部件BOM清单 1.差动轮式AGV: 2.UR5系列机械臂 3.Cognex智能相机 4.加工台 5.控制系统 6.电源和电缆 四、技术点及工作流程 五、计算自动化方案与人工方案成本收回时间 1.自动化方案成本分析: 2.人工方案成本

    2024年01月22日
    浏览(35)
  • jenkin构建报错信息及解决方案

    报错信息1:Exception when publishing, exception message 最近一直在做Jenkins项目,也经常会出现一些报错信息,今天在测试的时候出现了下面的报错信息,所以现在记录一下我的报错过程及解决方案。 原因及解决办法 : 在我思考并查找后发现原因是我的连接的后端服务器IP地址改变了

    2024年02月11日
    浏览(43)
  • 记报错信息:java.lang.IllegalArgumentException: MALFORMED解决方案

    在调用JDK自带的zipfile读取压缩包文件的时候,出现了以下错误: SjXcmcFeignClient:124 - BaseFeignClient 拦截到【未知系统异常】Exception异常: java.lang.IllegalArgumentException: MALFORMED[1] at java.util.zip.ZipCoder.toString(ZipCoder.java:65) at java.util.zip.ZipFile.getZipEntry(ZipFile.java:583) at java.util.zip.ZipFile.ac

    2024年02月05日
    浏览(36)
  • 自学SLAM(8)《第四讲:相机模型与非线性优化》作业

    小编研究生的研究方向是视觉SLAM,目前在自学,本篇文章为初学高翔老师课的第四次作业。 现实⽣活中的图像总存在畸变。原则上来说,针孔透视相机应该将三维世界中的直线投影成直线,但是当我们使⽤⼴⾓和鱼眼镜头时,由于畸变的原因,直线在图像⾥看起来是扭曲的

    2024年02月05日
    浏览(33)
  • Git第十四讲 Git标签管理

    Git标签是用于标记项目中的特定版本的重要工具。它们通常用于标识发布版本或里程碑。本文将介绍如何在Git中创建、查看和管理标签。 要在Git中创建一个标签,可以使用 git tag 命令。有两种类型的标签:轻量标签和附注标签。 轻量标签 轻量标签是指向特定提交的静态引用

    2024年02月09日
    浏览(76)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包