gazebosim / gazebosim/sdformat
Different error checks for repeated sibling elements names using SDF6 spec with the 6.2.0 version of the library and 9.0.0 or greater
- Dominant language
- C++
- Stars
- 216
- Forks
- 125
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 14
Description
## Environment
* OS Version: Ubuntu 18.04
* Source build of sdf6 branch (since packages are affected by #585 to use ign)
* Binaries for sdformat9 9.2.0
## Description
With the following example:
```xml
1
0 0 1 0 0 1
-2.5 0 0 0 0 0
5 0.2 2
-2.5 0 0 0 0 0
5 0.2 2
-2.5 0 0 0 0 0
5 0.2 2
-2.5 0 0 0 0 0
5 0.2 2
```
* Expected behavior: same behavior when using the SDF 1.6 spec independently of the libsdformat implementation version
* Actual behavior: when using `libsdformat6` the check says the example is valid. When using `libsdformat9` the check says the example is not valid.
## Steps to reproduce
1. Install libsdformat9-dev packages
2. Install a from source copy of sdf6 branch
3. Install ignition-tools
4. Download the example in this description
5. Run ign as detailed in the output section
## Output
```
~ ❯ ign sdf --check -d 1.6 --force-version 6.2.0 --check /home/jrivero/code/gazebo/test/worlds/test_sdf16_err_sibling_different_type.world
Valid.
~ ❯ ign sdf --check -d 1.6 --force-version 9.5.0 --check /home/jrivero/code/gazebo/test/worlds/test_sdf16_err_sibling_different_type.world
Error: Non-unique names detected in
-2.5 0 0 0 -0 0
5 0.2 2
-2.5 0 0 0 -0 0
5 0.2 2
-2.5 0 0 0 -0 0
5 0.2 2
-2.5 0 0 0 -0 0
5 0.2 2
```
Looking into the specification: naming [rules for 1.4-1.6](http://sdformat.org/tutorials?tut=pose_frame_semantics&ver=1.5&cat=specification&#element-naming-rules-in-sdf-1-4), it says:
```
Sibling elements of different types are not mandated to have unique names, so the following is valid, though it is confusing and not recommended.
```
So I believe that the issue could be a bug in sdformat9 (probably above) when forcing to use the 1.6 spec.
Contributor guide
Assessment
This issue has not been assessed yet.