gpt4 book ai didi

ubuntu - 进行ROS2 colcon build时出现Python错误

转载 作者:行者123 更新时间:2023-12-04 18:48:02 25 4
gpt4 key购买 nike

我正在研究 ROS2 foxy,我对 colcon 构建没有什么问题。
我刚刚制作了没有包的 colcon_ws。当我尝试构建时,会显示一些错误消息。这就是我所做的。

$ mkdir colcon_ws
$ cd colcon_ws
$ colcon build
错误信息在这里。另外,奇怪的是出现了错误消息,但构建成功。
ERROR:colcon.colcon_core.package_selection:Exception in package selection extension 'override_check': argument --allow-overriding: conflicting option string: --allow-overriding
Traceback (most recent call last):
File "/home/msjun-ubuntu/.local/lib/python3.8/site-packages/colcon_core/package_selection/__init__.py", line 109, in _add_package_selection_arguments
retval = extension.add_arguments(parser=group)
File "/usr/lib/python3/dist-packages/colcon_override_check/package_selection/override_check.py", line 52, in add_arguments
parser.add_argument(
File "/home/msjun-ubuntu/.local/lib/python3.8/site-packages/colcon_defaults/argument_parser/defaults.py", line 78, in add_argument
argument = super().add_argument(*args, **kwargs)
File "/home/msjun-ubuntu/.local/lib/python3.8/site-packages/colcon_core/argument_parser/destination_collector.py", line 46, in add_argument
argument = super().add_argument(*args, **kwargs)
File "/home/msjun-ubuntu/.local/lib/python3.8/site-packages/colcon_core/argument_parser/type_collector.py", line 34, in add_argument
ret = super().add_argument(*args, **kwargs)
File "/home/msjun-ubuntu/.local/lib/python3.8/site-packages/colcon_core/argument_parser/__init__.py", line 171, in add_argument
return self._parser.add_argument(*args, **kwargs)
File "/home/msjun-ubuntu/.local/lib/python3.8/site-packages/colcon_argcomplete/argument_parser/argcomplete/__init__.py", line 49, in add_argument
argument = self._parser.add_argument(*args, **kwargs)
File "/usr/lib/python3.8/argparse.py", line 1398, in add_argument
return self._add_action(action)
File "/usr/lib/python3.8/argparse.py", line 1602, in _add_action
action = super(_ArgumentGroup, self)._add_action(action)
File "/usr/lib/python3.8/argparse.py", line 1412, in _add_action
self._check_conflict(action)
File "/usr/lib/python3.8/argparse.py", line 1551, in _check_conflict
conflict_handler(action, confl_optionals)
File "/usr/lib/python3.8/argparse.py", line 1560, in _handle_conflict_error
raise ArgumentError(action, message % conflict_string)
argparse.ArgumentError: argument --allow-overriding: conflicting option string: --allow-overriding


Summary: 0 packages finished [0.31s]

我该如何解决?

最佳答案

查看 colcon-core版本:colcon version-check查看 colcon-core 是否是最新的。
如果它不是最新的,请通过以下方式更新:

sudo apt update
sudo apt install python3-colcon-common-extensions
sudo apt install python3-colcon-core

关于ubuntu - 进行ROS2 colcon build时出现Python错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72061062/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com