我正在学习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