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

mismatch between visual and collision #28

Open
robotlearning123 opened this issue Feb 20, 2024 · 7 comments
Open

mismatch between visual and collision #28

robotlearning123 opened this issue Feb 20, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@robotlearning123
Copy link

Hi, thank you for your nice tool! I tried the new version to generate a better obj model. It works well, but there is mismatch between visual obj and collision obj. The command is like this:

obj2mjcf --obj-dir . --save-mjcf --compile-model --verbose --decompose --overwrite --add-free-joint --coacd-args.pca

Is there any problems? Thank you for your help!
image

@kevinzakka
Copy link
Owner

Hi @wangcongrobot, can you attach the model so I can debug locally? I can't really tell what's going on in the picture you sent!

@robotlearning123
Copy link
Author

t200-with-bracket_obj.zip
Hi @kevinzakka, thank you for your reply. the attachments include the original obj model with mtl, commands, and generated model (with/no decompose). The decomposed model has a mismatch between the collision and visual model, but another is fine.

@robotlearning123
Copy link
Author

By the way, is there any way to generate separate .mtl files for each .obj file? Currently, the generated model only includes one .mtl file, which does not correspond to the .obj files. Thank you.

@kevinzakka
Copy link
Owner

Hi @wangcongrobot, I ran the following command on my machine in the directory unzipped from the file you attached:

obj2mjcf --obj-dir . --save-mjcf --compile-model --decompose

I got what seems to be a correct looking decomposition, overlayed over the visual geoms.

ezgif com-animated-gif-maker

@robotlearning123
Copy link
Author

Yes, I got the same results. It seems that the problem is caused by --coacd-args.pca. When adding this param, there is a mismatch as shown above.

@kevinzakka kevinzakka self-assigned this Feb 21, 2024
@kevinzakka kevinzakka added the bug Something isn't working label Feb 21, 2024
@kevinzakka
Copy link
Owner

@wangcongrobot Looks like a bug with PCA indeed, I'll try to push a fix soon. In the meantime, can you not use the PCA flag?

@robotlearning123
Copy link
Author

Yes, the default config without PCA works well for me. Thank you!
BTW, the save_mtl seems not available since v0.0.24?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants