如何修复 Ubuntu 上 ROS2 Could not find the resource 'joint_state_publisher_gui'
问题
运行或启动你的 ROS 包时,你看到以下错误消息:
ament-index-error.txt
File "/opt/ros/jazzy/lib/python3.12/site-packages/ament_index_python/packages.py", line 60, in get_package_prefix
content, package_prefix = get_resource('packages', package_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/ros/jazzy/lib/python3.12/site-packages/ament_index_python/resources.py", line 93, in get_resource
raise LookupError(
LookupError: Could not find the resource 'joint_state_publisher_gui' of type 'packages'解决方案
你需要使用 apt 安装 joint-state-publisher-gui 包:
install-joint-state-publisher.sh
sudo apt -y install ros-jazzy-joint-state-publisher-guiCheck out similar posts by category:
ROS
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow