Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ray-related warning printed by sdformat while parsing #164

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

traversaro
Copy link
Member

@traversaro traversaro commented Aug 31, 2023

While parsing the SDF generated out of the URDF files of ergoCub in Gazebo via sdformat, a warning is printed:

Warning [parser.cc:833] XML Attribute[name] in element[ray] not defined in SDF, ignoring.

See ami-iit/rod#26 .

It turns out that we are adding a name attribute to the ray element of the sdf, but this attribute is not supported, nor parsed (see http://sdformat.org/spec?ver=1.10&elem=sensor#sensor_ray). The sensor element (parent of ray) has already a name 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.

@Nicogene Nicogene merged commit 6d018da into master Sep 4, 2023
3 checks passed
@Nicogene Nicogene deleted the fixgazebowarning branch September 4, 2023 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants