Xacro evaluating comments while running robot urdf
nksas opened this issue · comments
I have been working on a particular robotic model/urdf, It was working fine so far.
Recently, after "sudo apt upgrade", my xacro package got updated with the latest changes.
Soon, I realize that now when i am trying to launch any urdf model that has some big comments in it's gazebo description file, It is throwing errors because somewhere the code is trying to evaluate those comments.
I thought of working out with the error and i figured out that after deleting those comments the model is able to spawn on gazebo/rviz.
So, I saw the latest commit of xacro git repository and figured that there is some minor bug in the latest code.
I am trying to fix that but also i am submitting this issue so that if anyone else figures that our , pls submit a PR.
Following is the error that I am getting
UPDATE: I came across previous issues in the discussion forum, where evaluation of comment was being discussed, I want to know that how to explicitly turn off the comment evaluation ?
" xacro:eval-comments:off" Where to put this comment ??
Looks like the property name
is not defined. You could check with very verbose mode, whether/where it gets defined:
xacro -vvv gps.xacro
I want to know how to explicitly turn off the comment evaluation?
Using the latest version of xacro, i.e. 1.14.13 (Noetic) / 1.13.17 (Melodic), comment evaluation is turned off by default again.
Please stop posting images - they are not searchable! Cut-and-paste your screen output instead.
Unfortunately, xacro (or the underlying xml parser) doesn't provide line numbers. So, are you sure you are looking at the correct line? Try to narrow down the error location and eventually provide a minimal failing example. Thanks.
By the way, what's the result of dpkg -l | grep xacro
on your machine?
Output of dpkg -l | grep xacro
ii ros-noetic-hector-sensors-description 0.5.2-1focal.20220122.022243 amd64 hector_sensors_description contains URDF xacro macros for sensors, so they are easily attachable to robot models and usable in gazebo.
ii ros-noetic-xacro 1.14.11-1focal.20220122.020912 amd64 Xacro (XML Macros) Xacro is an XML macro language.
I will try to follow up after narrowing down the problem and provide minimal failing example.
ii ros-noetic-xacro 1.14.11-1focal.20220122.020912 amd64 Xacro
As expected: you are using an old version of xacro. Please update to 1.14.13 as pointed out in #312 (comment).
Thank you
I think i missed some latest upgrades on packages.
I just upgraded my xacro and it worked.