How to load *.msh file with texture?

Discussion in 'Modeling' started by SunInKim, Oct 19, 2019.

  1. I want to use ycb dataset in mujoco with texture. And I already saw the person who is achieved to convert original obj file to msh file and load them in mujoco

    So I convert textured.obj to textured.msh file using gmsh program. Then I put that file instead of stl location in xml file ( <mesh file="/textured.msh" ......></mesh>)

    but it didn't work with this issue

    Traceback (most recent call last):
    File "", line 141, in <module>
    File "", line 15, in main
    model = load_model_from_path("/home/sunin/.mujoco/mujoco-py/xmls/UR5+gripper/UR5gripper.xml")
    File "mujoco_py/cymj.pyx", line 175, in mujoco_py.cymj.load_model_from_path
    Exception: Failed to load XML file: /home/sunin/.mujoco/mujoco-py/xmls/UR5+gripper/UR5gripper.xml. mj_loadXML error: b"Error: invalid sizes in MSH file '/home/sunin/.mujoco/mujoco-py/xmls/ycb_dataset_mujoco/011_banana/google_16k/banana2sized.msh'\nObject name = banana, id = 0, line = 54, column = 9"

    I'm looking for several methods but I can't deal with it. Please help me to load this model with texture.

    And I also want to know how to generate texture.png to apply texture on model(direction or size etc.)

    Attached Files: