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

Fixed usd2sdf when import from model:// #1023

Closed
wants to merge 1 commit into from

Conversation

ahcorde
Copy link
Collaborator

@ahcorde ahcorde commented May 18, 2022

Signed-off-by: ahcorde [email protected]

🦟 Bug fix

Summary

Added the model:// path to the set of folder where sdf should look for models and textures

FYI @rbonghi

SDF_PATH="models" IGN_FILE_PATH="models" sdf2usd worlds/office.sdf office.usda

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.

@ahcorde ahcorde self-assigned this May 18, 2022
@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label May 18, 2022
@codecov
Copy link

codecov bot commented May 18, 2022

Codecov Report

Merging #1023 (6ba4030) into sdf12 (a51a76e) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##            sdf12    #1023   +/-   ##
=======================================
  Coverage   65.38%   65.38%           
=======================================
  Files           2        2           
  Lines          26       26           
=======================================
  Hits           17       17           
  Misses          9        9           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a51a76e...6ba4030. Read the comment docs.

fullName =
ignition::common::findFile(_geometry.MeshShape()->Uri());

std::function<void(const std::string)> addSubFolders =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you comment why this is adding the subfolders?

{
auto systemPaths = ignition::common::systemPaths();
systemPaths->AddFilePaths(current);
addSubFolders(current);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get why this needs to be recursive. My understanding was that you add the directories that are siblings of the model directory so that a model can reference meshes in other models, but this shouldn't require recursing to subdirectories of the model.

@rbonghi
Copy link

rbonghi commented May 24, 2022

Hi @ahcorde,

I add an extra detail running from nanosaur_simulations/nanosaur_worlds from nanosaur_simulations

SDF_PATH="models" IGN_FILE_PATH="models" sdf2usd worlds/office.sdf office.usda

I have an error:

[Err] [SystemPaths.cc:467] Could not resolve file [AdjTable_Diffuse.png]
...
[Err] [SystemPaths.cc:467] Could not resolve file [Books_1_35.jpg]
[Err] [SystemPaths.cc:467] Could not resolve file [meshes/model.obj]
[Err] [MeshManager.cc:119] Invalid mesh filename extension[]
The following errors occurred when parsing world [office]:
Error Code 2: Msg: Error parsing model [toy]
Error Code 2: Msg: Error parsing link [link_0]
Error Code 6: Msg: Unable to load mesh named []
Error Code 2: Msg: Error parsing geometry attached to visual [visual]
Error Code 2: Msg: Error parsing visual [visual]

but I have a new folder with all textures called: material/textures

Does this PR fix this bug?

@rbonghi
Copy link

rbonghi commented Jul 14, 2022

Follow up

@chapulina chapulina added the bug Something isn't working label Jul 23, 2022
@scpeters
Copy link
Member

this should be retargeted to https://github.com/gazebosim/gz-usd

@chapulina
Copy link
Contributor

gazebosim/gz-usd#5

@chapulina chapulina closed this Aug 1, 2022
@chapulina chapulina deleted the ahcorde/fix/usd2sdf_model branch August 1, 2022 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🏯 fortress Ignition Fortress usd
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants