-
Notifications
You must be signed in to change notification settings - Fork 486
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
Support resource files with spaces #2877
Conversation
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. Also tested adding a sensor and light with space in the name and the model loads fine.
A few issues I noticed that can be addressed later if needed:
- I see a few error msgs from ign-transport - looks like it does not allow spaces in the topic name:
Topic [/included model/joint_cmd] is not valid.
[Err] [JointController.cc:66] Error subscribing to topic [/included model/joint_cmd]
- the plotting tool may not be working with spaces yet. It prints out a bunch of URI warnings, e.g.:
[Wrn] [URI.cc:327] Unable to parse URI [data://world/world with spaces/model/included model/joint/joint between links nested at different depths?p=axis/0/double/position]. Ignoring.
- A couple of factory test failures that look related on homebrew:
FactoryTest.ActorSpaces
FactoryTest.FilenameFuelURL
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Yeah that's #2056. As I mentioned on the description above, this is out of scope for this PR. The focus here are spaces on the filenames. I took the opportunity to also test spaces in entity names wherever it was already working, but I'm not planning to fix the remaining issues in this PR.
I also noticed that was flaky for me locally. The changes in f8fe4a3 seem to have fixed it.
That looks flaky from before: https://build.osrfoundation.org/job/gazebo-ci-pr_any-homebrew-amd64/2206/testReport/(root)/FactoryTest/FilenameFuelURL/history/ |
ah it's the SSL certificate issue. This fixes the test for me:
I had to include the version number in the URL otherwise the gazebo complains about not being able to find file in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, just one minor style issue. We can address the FactoryTest.FilenameFuelURL
issue here or separately. Either way is fine.
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Mainly adds tests to make sure we continue to support files with spaces. Support encoded file names inside COLLADA files. Signed-off-by: Louise Poubel <louise@openrobotics.org>
Mainly adds tests to make sure we continue to support files with spaces. Support encoded file names inside COLLADA files. Signed-off-by: Louise Poubel <louise@openrobotics.org>
Addresses #2870 .
Most file types were already working with whitespaces without issues. I added tests anyway to make sure they keep working. I've also only tested locally on Ubuntu, so I'm curious to see whether the new tests pass for all platforms.
Changes:
ServerFixture
to support world names with spaces by artificially injecting%20
into it internally.I also took the opportunity to add tests for entity names with spaces wherever I could. There are known issues with spaces in entity names that I didn't address though, such as creating transport topics or URIs (#2056).
The only file types that are not getting support for spaces are MTL files. See this comment: #2870 (comment). Technically we could update our fork of
tinyobjloader
, but it's not a good idea to diverge from upstream.Manual testing
From a clone of this branch, try the following.
Load a world with spaces:
or
Load a model with spaces in various resources:
Then insert
Model with spaces
from the Insert menu.