gazebosim / gazebosim/sdformat
gz sdf segmentation fault 11 due to conflict between <sensor> and <collision> tags
- 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/164)) by Nuno Guedelha (Bitbucket: [gnuno](https://bitbucket.org/%7B5e1f6c72-9509-4dd5-93dc-91cc9fdc8c20%7D/)).**
The original report had attachments: [singleLinkModel_V1.sdf](https://osrf-migration.github.io/sdformat-gh-pages/data/repositories/osrf/sdformat/issues/164/attachments/singleLinkModel_V1.sdf), [singleLinkModel_V1.urdf](https://osrf-migration.github.io/sdformat-gh-pages/data/repositories/osrf/sdformat/issues/164/attachments/singleLinkModel_V1.urdf), [singleLinkModel_V2.urdf](https://osrf-migration.github.io/sdformat-gh-pages/data/repositories/osrf/sdformat/issues/164/attachments/singleLinkModel_V2.urdf)
----------------------------------------
The issue can be reproduced on a simple URDF model defined by:
* a single link "r_foot" with and tags
* an IMU sensor "r_foot_acc" embedded in a tag
* stiffness, contact parameters, along with a blob, all embedded in a tag
We run the urdf->sdf conversion as follows:
```
#!shell
gz sdf -p .urdf > .sdf
```
If the sensor is defined after the stiffness and bounce parameters (singleLinkModel_V1.urdf), the convertion runs successfully.
If we invert the order, i.e. the sensor is defined before the collision/bounce parameters (singleLinkModel_V2.urdf), the commnd `gz` fails with a **"segmentation fault 11"**.
Contributor guide
Research direction
Start with the attached singleLinkModel_V1.urdf and singleLinkModel_V2.urdf files and reproduce the conversion using `gz sdf -p`. Compare the sensor and collision/bounce ordering during URDF-to-SDF conversion; done means both models convert without a segmentation fault.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- robotics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100