Fix ray-related warning printed by sdformat while parsing #164
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While parsing the SDF generated out of the URDF files of ergoCub in Gazebo via sdformat, a warning is printed:
See ami-iit/rod#26 .
It turns out that we are adding a
name
attribute to theray
element of the sdf, but this attribute is not supported, nor parsed (see http://sdformat.org/spec?ver=1.10&elem=sensor#sensor_ray). Thesensor
element (parent ofray
) has already aname
attribute, and that can be used to identify the sensor. I guess this happened as a copy&paste error due to thefact the camera element instead supports an optional name element (see http://sdformat.org/spec?ver=1.10&elem=sensor#sensor_camera), even if to be honest I find it a bit confusing, and probably we can omit it there as well.To fix the warning, we can just drop the name attribute, that anyhow was not parsed.