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

Check if model is skeleton and use first csys if CSYS does not exist + small refactor of joints csv configuration #114

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

mfussi66
Copy link
Member

Fixes #112 .

@mfussi66 mfussi66 self-assigned this Nov 12, 2024
@mfussi66 mfussi66 changed the title Check if model is skeleton and use first csys if CSYS does not exist + small refactor of joints csv Check if model is skeleton and use first csys if CSYS does not exist + small refactor of joints csv configuration Nov 12, 2024
Copy link
Member

@Nicogene Nicogene left a comment

Choose a reason for hiding this comment

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

LGTM, nice refactoring!
Have you tried to export a URDF from an assembly that has CSYS instead of linkFrames (e.g. icub)?

@mfussi66
Copy link
Member Author

LGTM, nice refactoring! Have you tried to export a URDF from an assembly that has CSYS instead of linkFrames (e.g. icub)?

I did it only with the example assembly, I'll check with icub as well.

@mfussi66
Copy link
Member Author

I can confirm that iCub2.7 seems to work just fine:
Screenshot 2024-11-13 105234

@traversaro
Copy link
Member

Just a curiosity, how are you testing the model with MuJoCo? Are you running some script or command? Xref: robotology/icub-models#155 .

@mfussi66
Copy link
Member Author

Just a curiosity, how are you testing the model with MuJoCo? Are you running some script or command? Xref: robotology/icub-models#155 .

Super simply by drag and drop using the simulate executable.

@traversaro
Copy link
Member

Just a curiosity, how are you testing the model with MuJoCo? Are you running some script or command? Xref: robotology/icub-models#155 .

Super simply by drag and drop using the simulate executable.

Wow, I have no idea how this can work, as the package:// URIs are not interpreted by mujoco (see google-deepmind/mujoco#1432).

@mfussi66
Copy link
Member Author

Wow, I have no idea how this can work, as the package:// URIs are not interpreted by mujoco (see google-deepmind/mujoco#1432).

Actually on this test on iCub, I changed the paths of the meshes in the urdf so it could be loaded with no problems on my windows environment without any ros/gazebo machinery.

Nonetheless, I noticed that if the .stl are all in the same folder as the urdf, they are correctly loaded regardless of the package:// URI. Maybe a fallback logic is involved?

@traversaro
Copy link
Member

Wow, I have no idea how this can work, as the package:// URIs are not interpreted by mujoco (see google-deepmind/mujoco#1432).

Actually on this test on iCub, I changed the paths of the meshes in the urdf so it could be loaded with no problems on my windows environment without any ros/gazebo machinery.

Ahhh ok, so not simply by dragging and drop the model, also by modifying the path to the meshes. Are there other workarounds necessary?

Nonetheless, I noticed that if the .stl are all in the same folder as the urdf, they are correctly loaded regardless of the package:// URI. Maybe a fallback logic is involved?

Yes, mujoco basically throw away everything in the mesh uri beside the file name if I recall correctly, see google-deepmind/mujoco#1432 .

@Nicogene
Copy link
Member

Wow, I have no idea how this can work, as the package:// URIs are not interpreted by mujoco (see google-deepmind/mujoco#1432).

Actually on this test on iCub, I changed the paths of the meshes in the urdf so it could be loaded with no problems on my windows environment without any ros/gazebo machinery.

Nonetheless, I noticed that if the .stl are all in the same folder as the urdf, they are correctly loaded regardless of the package:// URI. Maybe a fallback logic is involved?

This problem should be fixed by:

@mfussi66
Copy link
Member Author

Are there other workarounds necessary?

AFAIK that's only it @traversaro

@Nicogene Nicogene merged commit 9afd08f into icub-tech-iit:master Nov 13, 2024
1 of 2 checks passed
@mfussi66 mfussi66 deleted the skeleton branch November 13, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unhandled exception when an assembly contains skeleton parts
3 participants