Skip to content

踩坑GitHub universalrobots/universal_robots_ros2_description11 个月前

UR ROS2 Description中ur_macro. ​

本文由 AI 根据公开内容整理,可能有误,请以原文为准:Property undefined(GitHub universalrobots/universal_robots_ros2_description #354)

状态:已解决

问题 ​

在humble分支的./urdf/ur_macro.xacro文件中,调用ur_ros2_control宏时传入参数hash_kinematics="${kinematics_hash}",构建时报错提示kinematics_hash属性未定义。

环境 ​

ROS2 Humble分支,universalrobots/universal_robots_ros2_description仓库,涉及urdf/ur_macro.xacro与urdf/inc/ur_common.xacro文件。

解决办法 ​

  1. 确认kinematics_hash属性由read_model_data宏在urdf/inc/ur_common.xacro第241行通过<xacro:property name="kinematics_hash" value="${sec_kinematics['hash']}" scope="parent"/>正确定义并导出至父作用域。
  2. 检查本地代码是否为完整官方版本,避免仅复制部分代码片段导致宏定义缺失或上下文断裂。
  3. 若使用自定义修改版xacro,需确保在调用ur_ros2_control前已包含或显式调用read_model_data宏以初始化该属性。

讨论原作者:@TDC-TangChaoBanLi 等,版权归原作者所有。

来源

本页事实对应的公开页面,以原文为准。

  1. GitHub universalrobots/universal_robots_ros2_description #354:Property undefined访问 2026-10-26