Closed flferretti closed 10 months ago
Thanks for reporting the problem! The URDF to SDF conversion is not handled internally by rod
. We pass through gazebosim/sdformat
by calling process_model_description_with_sdformat
that in turn tries to call the system's executable gz sdf -p </path/to/model.urdf>
.
If the conversion fails, we should understand what's the problem on the sdformat side. This is relevant because the same logic is called when the model is imported in a generic Gazebo simulation. In other words, if the conversion fails, likely the URDF model cannot be imported neither in Gazebo.
Can you please call manually the following command and paste the produced error?
gz sdf -p /path/to/ergocub.urdf
For me with gz-sim7 and latest release of ergocub-software
gz sdf -p `resolve-robotics-uri-py package://ergoCub/robots/ergoCubGazeboV1_minContacts/model.urdf`
prints just at the beginnining a warning:
[1;33mWarning [Utils.cc:130][0m [/sdf/model[@name="ergoCub"]/link[@name="head"]/sensor[@name="lasersensor_head"]/ray[@name="head_laser_sensor"][@name="head_laser_sensor"]:/home/traversaro/miniforge3/envs/testergocub/share/ergoCub/robots/ergoCubGazeboV1_minContacts/model.urdf:L0]: XML Attribute[name] in element[ray] not defined in SDF.
While this may be something in ergocub-software, rod perhaps is getting confused by the warning?
Thanks for your response @diegoferigo. Actually, the command does not fail with gz-11.10.2
, but it produces the SDF file as expected with the warning:
Warning [parser.cc:833] XML Attribute[name] in element[ray] not defined in SDF, ignoring.
gz sdf -p /home/flferretti/mambaforge/envs/test101/share/ergoCub/robots/ergoCubGazeboV1_minContacts/model.urdf > ergocub.sdf
The problem on the ergocub models should be fixed by https://github.com/icub-tech-iit/ergocub-software/pull/164 . As a local modification, one can manually change <ray name="head_laser_sensor">
to <ray>
.
The warning is not produced anymore by rod
with the most recent version. The issue strictly related to rod
has been solved
C.C. @diegoferigo
The warning is not produced anymore by
rod
with the most recent version. The issue strictly related torod
has been solved
With the most recent version of rod
or the most recent version of something else? If it is solved with rod
, probably we can close the issue?
I was referring to most recent version of rod
. Closing as solved
I've encountered an issue while trying to parse the URDF model using the
ergoCubGazeboV1_minContacts
model from theergocub-software
repository. Specifically, the problem arises whenrod
tries to convert the model from URDF to SDF format.Interestingly, removing the
<gazebo>
tags from the URDF resolves the problem. As a expected behaviour, I believe that if therod
tool doesn't recognize these tags, it should ideally ignore them and possibly log a warning message.Here's the traceback I'm encountering:
C.C. @diegoferigo @traversaro