ros2
build_error
ai_generated
true
xacro: error: XML parsing error: not well-formed (invalid token)
ID: ros2/urdf-xacro-parse-error
90%Fix Rate
88%Confidence
3Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 2 | active | — | — | — |
Root Cause
XACRO/URDF file has XML syntax errors or undefined xacro macros/properties.
genericWorkarounds
-
92% success Run xacro standalone to get a clear error with line numbers
xacro my_robot.urdf.xacro > /dev/null
-
88% success Check all xacro:property and xacro:macro definitions are included
Verify all <xacro:include filename='...' /> paths are correct
-
85% success Use check_urdf to validate the generated URDF
xacro my_robot.urdf.xacro | check_urdf /dev/stdin
Dead Ends
Common approaches that don't work:
-
Edit the URDF file that xacro generates instead of the .xacro source
90% fail
Generated URDF is overwritten on each build; edits are lost
-
Ignore xacro and write raw URDF for complex robots
80% fail
Raw URDF is unmaintainable at scale; loses parameterization, macros, and math expressions