本文主要是介绍cartographer问题处理,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
问题1 :
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GMOCK_LIBRARY (ADVANCED)linked by target "time_conversion_test" in directory /home/a/carto/src/cartographer_ros/cartographer_roslinked by target "configuration_files_test" in directory /home/a/carto/src/cartographer_ros/cartographer_roslinked by target "msg_conversion_test" in directory /home/a/carto/src/cartographer_ros/cartographer_roslinked by target "metrics_test" in directory /home/a/carto/src/cartographer_ros/cartographer_ros-- Configuring incomplete, errors occurred!
See also "/home/a/carto/build_isolated/cartographer_ros/CMakeFiles/CMakeOutput.log".
See also "/home/a/carto/build_isolated/cartographer_ros/CMakeFiles/CMakeError.log".
<== Failed to process package 'cartographer_ros': Command '['/home/a/carto/install_isolated/env.sh', 'cmake', '/home/a/carto/src/cartographer_ros/cartographer_ros', '-DCATKIN_DEVEL_PREFIX=/home/a/carto/devel_isolated/cartographer_ros', '-DCMAKE_INSTALL_PREFIX=/home/a/carto/install_isolated', '-G', 'Ninja']' returned non-zero exit status 1.Reproduce this error by running:
==> cd /home/a/carto/build_isolated/cartographer_ros && /home/a/carto/install_isolated/env.sh cmake /home/a/carto/src/cartographer_ros/cartographer_ros -DCATKIN_DEVEL_PREFIX=/home/a/carto/devel_isolated/cartographer_ros -DCMAKE_INSTALL_PREFIX=/home/a/carto/install_isolated -G Ninja
解决方案:
sudo apt install libgmock-dev
问题2 :
代码运行时
[FATAL] [1713248900.406892955]: F0416 14:28:20.000000 7921 lua_parameter_dictionary.cc:83] Check failed: status == 0 (2 vs. 0) [string "include "map_builder.lua"..."]:35: attempt to index field 'pure_localization_trimmer' (a nil value)
在lua中pure_localization_trimmer的设置可能找不到,需要对比一下出处是否有定义或则定义内容更改等。经对比发现TRAJECTORY_BUILDER中对该内容进行注释。所以找不到。
TRAJECTORY_BUILDER = {trajectory_builder_2d = TRAJECTORY_BUILDER_2D,trajectory_builder_3d = TRAJECTORY_BUILDER_3D,-- pure_localization_trimmer = {-- max_submaps_to_keep = 3,-- },collate_fixed_frame = true,collate_landmarks = false,
}
问题3
编译过程找不到
FAILED: docs/CMakeFiles/build_doc /work/ws/carto/build_isolated/cartographer/install/docs/CMakeFiles/build_doc
cd /work/ws/carto/build_isolated/cartographer/install/docs && /usr/bin/sphinx-build -b html /work/ws/carto/src/cartographer/docs/source /work/ws/carto/build_isolated/cartographer/install/docs/html
Traceback (most recent call last):File "/usr/bin/sphinx-build", line 11, in <module>load_entry_point('Sphinx==1.8.5', 'console_scripts', 'sphinx-build')()File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 490, in load_entry_pointreturn get_distribution(dist).load_entry_point(group, name)File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2854, in load_entry_pointreturn ep.load()File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2445, in loadreturn self.resolve()File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2451, in resolvemodule = __import__(self.module_name, fromlist=['__name__'], level=0)File "/usr/lib/python3/dist-packages/sphinx/cmd/build.py", line 25, in <module>from sphinx.application import SphinxFile "/usr/lib/python3/dist-packages/sphinx/application.py", line 48, in <module>from sphinx.util.tags import TagsFile "/usr/lib/python3/dist-packages/sphinx/util/tags.py", line 11, in <module>from jinja2 import nodesFile "/usr/lib/python3/dist-packages/jinja2/__init__.py", line 33, in <module>from jinja2.environment import Environment, TemplateFile "/usr/lib/python3/dist-packages/jinja2/environment.py", line 15, in <module>from jinja2 import nodesFile "/usr/lib/python3/dist-packages/jinja2/nodes.py", line 23, in <module>from jinja2.utils import MarkupFile "/usr/lib/python3/dist-packages/jinja2/utils.py", line 676, in <module>from markupsafe import Markup, escape, soft_unicodeImportError: cannot import name 'soft_unicode' from 'markupsafe' (/usr/local/lib/
python3.8/dist-packages/markupsafe/__init__.py)
ninja: build stopped: subcommand failed.
<== Failed to process package 'cartographer': Command '['ninja', '-j8', '-l8']' returned non-zero exit status 1.Reproduce this error by running:
==> cd /work/ws/carto/build_isolated/cartographer && ninja -j8 -l8
解决方案:
pip3 install markupsafe==2.0.1
问题 4
FAILED: docs/CMakeFiles/build_doc /work/ws/carto/build_isolated/cartographer/install/docs/CMakeFiles/build_doc
cd /work/ws/carto/build_isolated/cartographer/install/docs && /usr/bin/sphinx-build -b html /work/ws/carto/src/cartographer/docs/source /work/ws/carto/build_isolated/cartographer/install/docs/html
Running Sphinx v1.8.5Extension error:
Could not import extension sphinx.builders.latex (exception: cannot import name 'contextfunction' from 'jinja2' (/usr/local/lib/python3.8/dist-packages/jinja2/__init__.py))
[50/387] Building CXX object googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
ninja: build stopped: subcommand failed.
<== Failed to process package 'cartographer': Command '['ninja', '-j8', '-l8']' returned non-zero exit status 1.
原因:
sphinx和jinja2版本不匹配
解决方案:
重新安装sphinx
pip3 uninstall Sphinx
pip3 uninstall jinja2
pip3 install Sphinx
这篇关于cartographer问题处理的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!