Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix examples and files with invalid extra diffuse values #419

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

PixnBits
Copy link
Contributor

🦟 Bug fix

Fixes #

Summary

Following the Building Your Own Robot tutorial I encountered an error when adding the caster wheel:

pixnbits@n2023ubu:~/my-robots$ gz sim tutorial.sdf 
Error [Param.cc:1288] Error Code 34: Msg: The value <diffuse>0.0 1 0.0 1 1</diffuse> is invalid.
[Err] [Server.cc:198] Error Code 9: [/sdf/world[@name="car_world"]/model[@name="vehicle_blue"]/link[@name="caster"]/visual[@name="visual"]/material/diffuse:/home/pixnbits/my-robots/tutorial.sdf:L263]: Msg: Error reading element <diffuse>

It appears an extra 1 is at the end, removing it allows Gazebo to run.
I used grep -rl "<diffuse>0.0 1 0.0 1 1</diffuse>" to find instances where this was present and removed the trailing 1 from them.

I've tested this by attempting to run Gazeebo with the SDF files, both after and before the changes of this PR (though citadel/tutorials/sensors/sensor_tutorial.sdf appears to be unusable either way). E.g.:

Error [Param.cc:1288] Error Code 34: Msg: The value <diffuse>0.0 1 0.0 1 1</diffuse> is invalid.
[Err] [Server.cc:198] Error Code 9: [/sdf/world[@name="sensor_world"]/model[@name="vehicle_blue"]/link[@name="caster"]/visual[@name="visual"]/material/diffuse:/home/pixnbits/projects/docs-1/dome/tutorials/sensors/sensor_tutorial.sdf:L320]: Msg: Error reading element <diffuse>

It might be useful to add a test to use gz to parse the SDF files, but I'm not sure where the test setup is for this repository (I don't want to ignore it and cause unintended maintenance issues 😅)

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@PixnBits PixnBits requested a review from mabelzhang as a code owner December 29, 2023 23:18
@github-actions github-actions bot added 🏰 citadel Ignition Citadel 🔮 dome Ignition Dome labels Dec 29, 2023
@PixnBits
Copy link
Contributor Author

Ah! FWIW it appears this was fixed in newer documentation via #161

@iche033
Copy link
Contributor

iche033 commented Jan 2, 2024

thanks for the fix

@iche033 iche033 merged commit d4c935a into gazebosim:master Jan 2, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏰 citadel Ignition Citadel 🔮 dome Ignition Dome
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants