# ROS2 Humble中RVIZ提示无法检索STL文件错误

> 原文链接：https://robotics.hellobike.com/pitfalls/2025-03-17-robotics-se-115028
> 频道：pitfalls | 更新日期：2025-03-17 | 标签：auto, stackexchange, urdf
> 核心摘要：用户启动ROS2时RVIZ报错无法打开STL文件，最终通过修改CMakeLists.txt变量引用解决问题

# ROS2 Humble中RVIZ提示无法检索STL文件错误

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[ROS2 Humble: Error retrieving STL file in RVIZ](https://robotics.stackexchange.com/questions/115028/ros2-humble-error-retrieving-stl-file-in-rviz)（Robotics Stack Exchange #115028）

**状态**：已解决

## 问题

在ROS2 Humble环境下启动相关节点后，RVIZ报错无法检索路径`/home/raj/dev_ws/install/arduinobot_description/share/arduinobot_description/meshes/basement.STL`的STL文件，无法加载机器人网格模型，用户已执行colcon build和source操作，且install目录下可见STL文件。

## 环境

系统为Gnome桌面的Linux环境，ROS2版本为Humble，使用RVIZ2、robot_state_publisher、joint_state_publisher_gui节点。

## 解决办法

1. 找到arduinobot_description功能包的CMakeLists.txt文件
2. 将文件中配置安装路径时使用的`$(PROJECT_NAME)`修改为`${PROJECT_NAME}`
3. 重新执行colcon build构建工作区，source setup文件后重新启动即可。

原问题作者：Raj Rajeshwer Gupta；采纳答案作者：Raj Rajeshwer Gupta。原内容依 CC BY-SA 4.0 授权，本页摘要同样依 CC BY-SA 4.0 授权。
:::

## 原始参考来源 (Sources)

- [Robotics Stack Exchange #115028：ROS2 Humble: Error retrieving STL file in RVIZ](https://robotics.stackexchange.com/questions/115028/ros2-humble-error-retrieving-stl-file-in-rviz)