obj2mjcf
obj2mjcf copied to clipboard
mismatch between visual and collision
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!
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!
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.
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.
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.
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.
@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?
Yes, the default config without PCA works well for me. Thank you!
BTW, the save_mtl seems not available since v0.0.24?