gazebosim / gazebosim/sdformat
URDF parser fails if two consecutive fixed joints are present in the model.
- Dominant language
- C++
- Stars
- 216
- Forks
- 125
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 14
Description
**Original report ([archived issue](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/issues/105)) by Silvio Traversaro (Bitbucket: [traversaro](https://bitbucket.org/%7B34f404cb-5642-4f27-a032-e04c7143d776%7D/)).**
The original report had attachments: [singleFixed.urdf](https://osrf-migration.github.io/sdformat-gh-pages/data/repositories/osrf/sdformat/issues/105/attachments/singleFixed.urdf), [doubleFixed.urdf](https://osrf-migration.github.io/sdformat-gh-pages/data/repositories/osrf/sdformat/issues/105/attachments/doubleFixed.urdf)
----------------------------------------
If two consecutive fixed joints are present in a URDF model, and both joints have a massless child, the conversion to SDF is broken. In particular the COM of the resulting link is reset to zero (observed in Linux) or set to NaN (observed on OS X).
To reproduce the issue, call the `gz sdf -p` program in the attached urdf files:
Working model, with a single fixed joint:
~~~
pegua@pareto:~$ cat singleFixed.urdf
pegua@pareto:~$ gz sdf -p singleFixed.urdf
0 0 0 0 -0 0
10 20 30 0 -0 0
25.49
0.50297
0
0
0.332368
0
0.479884
~~~
Broken model, with two fixed joints (note the COM pose):
~~~
pegua@pareto:~$ cat doubleFixed.urdf
pegua@pareto:~$ gz sdf -p doubleFixed.urdf
Error [Param.cc:462] Unable to set value [-nan -nan -nan 0 -0 0] for key[pose]
0 0 0 0 -0 0
0 0 0 0 -0 0
25.49
nan
nan
nan
nan
nan
nan
~~~
Contributor guide
Assessment
This issue has not been assessed yet.