gazebosim / gazebosim/sdformat
URDF->SDF conversion: surface properties are only retained for nameless collisions and collisions named `$LINKNAME_collision`
- Dominant language
- C++
- Stars
- 216
- Forks
- 125
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 14
Description
test.urdf:
```XML
5.0
```
If I convert this URDF to SDF (using sdformat 8), I end up with:
```XML
0 0 0 0 -0 0
0 0 0 0 -0 0
1e-05
0.001
1e-06
1e-06
0.001
1e-06
0.001
0 0 0 0 -0 0
1
1
5
1
```
That is correct. The same result is achieved when the collision in URDF has no name. However, If I set the collision name to anything else, the surface tags are left out (even though there is only a single collision):
```XML
0 0 0 0 -0 0
0 0 0 0 -0 0
1e-05
0.001
1e-06
1e-06
0.001
1e-06
0.001
0 0 0 0 -0 0
1
1
1
```
I get it that if there are multiple collisions, the gazebo tag has to reference them exactly by their name. But when there is a single collision, It'd make sense to me if the conversion script applied the collision tag contents to it.
And what would be the correct name to reference in the gazebo tag? For collision named `asd`, I tried `root_fixed_joint_lump__asd`, `root_fixed_joint_lump__asd_collision` and `root_fixed_joint_lump__asd_collision_collision`, but none works.
Contributor guide
Research direction
Start by tracing the URDF-to-SDF conversion path in sdformat 8 and how the collision is matched to named collisions. Compare the nameless, *_collision, and other collision-name cases shown here. Done means surface properties are retained for the single named collision and the correct reference name is established with coverage for these cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100