Catkin Build 的问题
Posted
技术标签:
【中文标题】Catkin Build 的问题【英文标题】:Issues with Catkin Build 【发布时间】:2019-02-07 15:28:27 【问题描述】:以前从未发生过,但是如果我创建一个目录mkdir -p catkin_ws/src
然后输入catkin build
我会出现以下错误:
emeric@emeric-desktop:~/catkin_plan_ws$ catkin build
------------------------------------------------------
Profile: default
Extending: [env] /opt/ros/kinetic
Workspace: /home/emeric
------------------------------------------------------
Source Space: [exists] /home/emeric/src
Log Space: [missing] /home/emeric/logs
Build Space: [exists] /home/emeric/build
Devel Space: [exists] /home/emeric/devel
Install Space: [unused] /home/emeric/install
DESTDIR: [unused] None
------------------------------------------------------
Devel Space Layout: linked
Install Space Layout: None
------------------------------------------------------
Additional CMake Args: DCMAKE_BUILT_TYPE=Release
Additional Make Args: None
Additional catkin Make Args: None
Internal Make Job Server: True
Cache Job Environments: False
------------------------------------------------------
Whitelisted Packages: None
Blacklisted Packages: None
------------------------------------------------------
Workspace configuration appears valid.
NOTE: Forcing CMake to run for each package.
------------------------------------------------------
Traceback (most recent call last):
File "/usr/bin/catkin", line 9, in <module>
load_entry_point('catkin-tools==0.4.4', 'console_scripts', 'catkin')()
File "/usr/lib/python2.7/dist-packages/catkin_tools/commands/catkin.py", line 267, in main
catkin_main(sysargs)
File "/usr/lib/python2.7/dist-packages/catkin_tools/commands/catkin.py", line 262, in catkin_main
sys.exit(args.main(args) or 0)
File "/usr/lib/python2.7/dist-packages/catkin_tools/verbs/catkin_build/cli.py", line 420, in main
summarize_build=opts.summarize # Can be True, False, or None
File "/usr/lib/python2.7/dist-packages/catkin_tools/verbs/catkin_build/build.py", line 283, in build_isolated_workspace
workspace_packages = find_packages(context.source_space_abs, exclude_subspaces=True, warnings=[])
File "/usr/lib/python2.7/dist-packages/catkin_pkg/packages.py", line 86, in find_packages
packages = find_packages_allowing_duplicates(basepath, exclude_paths=exclude_paths, exclude_subspaces=exclude_subspaces, warnings=warnings)
File "/usr/lib/python2.7/dist-packages/catkin_pkg/packages.py", line 146, in find_packages_allowing_duplicates
xml, filename=filename, warnings=warnings)
File "/usr/lib/python2.7/dist-packages/catkin_pkg/package.py", line 509, in parse_package_string
raise InvalidPackage('The manifest must contain a single "package" root tag')
catkin_pkg.package.InvalidPackage: The manifest must contain a single "package" root tag
除了 build 和 devel 文件夹是在我的主目录中创建的,而不是在 catkin 目录中。
我想我搞砸了一些东西,但我没有做什么,因此如何解决它。
感谢您的帮助
【问题讨论】:
【参考方案1】:build、install、log、devel 和 src 空间的根文件夹应该是你的 catkin 根目录,你可以在其中调用catkin build
(在你的情况下是~/catkin_ws
)。
简而言之,您不能使用 catkin 在启动的 catkin 文件夹之外执行任务
【讨论】:
以上是关于Catkin Build 的问题的主要内容,如果未能解决你的问题,请参考以下文章
CMake 错误:catkin_make :::Running 命令运行命令:“/ws/build”中的“make -j4 -l4”
ROS Melodic笔记:catkin_make报错Invoking "make cmake_check_build_system" failed