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

Failed to Compile Model #11

Open
dhruvthanki opened this issue Sep 9, 2022 · 1 comment
Open

Failed to Compile Model #11

dhruvthanki opened this issue Sep 9, 2022 · 1 comment

Comments

@dhruvthanki
Copy link

Hello Kevin! Great tool!

I have the whole model of the robot in the blender, which I exported as .obj with the corresponding .mtl.
Once I convert using the obj2mjcf using the following command:

obj2mjcf --obj-dir "/home/dhruv/Documents/Model" --save-mjcf --compile-model --verbose

I get following error:

Error compiling model: File or filename expected, got 'PosixPath'
INFO:root:Saved MJCF to /home/dhruv/Documents/Model/robot/robot.xml

and when I compile the model using mujoco, I get following error:

Traceback (most recent call last):
  File "/home/dhruv/Documents/Model/test.py", line 4, in <module>
    model = mj.MjModel.from_xml_path(xml_path)
ValueError: Error: faces have inconsistent orientation: robot-v3_6
Object name = robot-v3_6, id = 6, line = 26, column = -1

I am not sure what I am doing wrong. Would appreciate all the help!
Thank you!

@kevinzakka
Copy link
Owner

Hi @dhruvthanki, apologies for the late reply!

There are 2 separate issues here.

  1. "Error compiling model: File or filename expected, got 'PosixPath'" -- could you attach a zip file with your model so I can reproduce locally?

  2. ValueError: Error: faces have inconsistent orientation: robot-v3_6 -- this is something I can't control unfortunately. Sometimes, the output of trimesh splitting results in meshes that are a) flat in one dimension or b) have faces with inconsistent orientation. I think the MuJoCo devs recently pushed a fix that stops the compiler from complaining (see commit).

In any case, attaching a zip file would be very helpful so that I can improve obj2mjcf!

Cheers

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

No branches or pull requests

2 participants