Multiple mesh folders

Discussion in 'Modeling' started by Giusebar, May 23, 2018.

  1. Hi,

    I'm trying to load a URDF model in Mujoco. I'm trying to load a robot arm and a gripper and I have the meshes in different folders.

    From the documentation I saw that to visualize the meshes those have to be specified in the mujoco sub-element compiler. Is there a way to specify multiple directories for the meshes?

    Thanks,
    Giuseppe
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    Not on the level of the entire document. However each mesh file name has its own path (relative to the document-level meshdir) so you can do it that way.
     
  3. Hello,

    I'm having trouble compiling urdf to mjcf when I have some meshes in subfolders. In the urdf file, I've specified compiler parameter "meshdir", however, some of the meshes are contained in subfolder of "meshdir". For some reason, this subfolder is not picked up, and compiler tries to load the file from "meshdir" directly, where it doesn't exist.

    I've tried:
    • <mesh filename="subfolder/my_mesh.stl"/>
    • <mesh filename="./subfolder/my_mesh.stl"/>
    • <mesh filename="package://subfolder/my_mesh.stl"/>
    • <mesh filename="package://./subfolder/my_mesh.stl"/>
    • <mesh filename="package://my_package/meshes/subfolder/my_mesh.stl"/>
    None of these patterns worked. Do you have any suggestions?

    Thanks,
    Ilija