gazebosim / gazebosim/sdformat
URDF gazebo material tags incorrectly translated
- Dominant language
- C++
- Stars
- 216
- Forks
- 125
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 14
Description
## Environment
* OS Version: Ubuntu 20.04
* Source or binary build? Binary, apt, 9.4.0-1
## Description
* Expected behavior:
Gazebo material tags in the URDF that are already valid SDF material tags should be translated unchanged.
* Actual behavior:
The translation process breaks the material tag by attempting to convert it to a reference to a Gazebo material script.
## Steps to reproduce
1. Create a URDF including a gazebo material tag. Example:
```
0 0 1 1
0 0 1 1
0 0 1 1
```
2. Convert the URDF file to SDF
```
ign sdf -p example.urdf
```
## Output
The generated SDF with the now broken material tag.
```
0 0 0 0 -0 0
1
1
0
0
1
0
1
0 0 0 0 -0 0
1 1 1
0 0 0 0 -0 0
1 1 1
<name>ambient</name>
<uri>file://media/materials/scripts/gazebo.material</uri>
1
```
Contributor guide
Research direction
Reproduce the issue with the inline URDF example and run `ign sdf -p example.urdf` to inspect the URDF-to-SDF material translation. Trace the handling of the `` tags and verify that valid SDF ambient, diffuse, and specular elements remain unchanged instead of becoming a script reference.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, xml
- Domain
- robotics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100