URDF with compile.cpp

Discussion in 'Modeling' started by ASJK, Apr 19, 2018.

  1. Hi, i was trying to use the compile.cpp to get a coverted file (urdf-mjb or txt) but it gives me this error
    URDF body has multiple parents.

    how could i solve this issue the best?
    im not that into urdf and roboter modeling., so i would appreciate your hints!

    thnx
     

    Attached Files:

  2. How to use urdf files in mujoco?
    How to convert the urdf files into mjcf?
     
  3. Emo Todorov

    Emo Todorov Administrator Staff Member

    The error message suggests that the same body/link in the URDF is defined as having two parents. This is not allowed, since the model has to be a tree. URDFs are not easy to read and edit by hand, but in this case the only solution is to read the file carefully and find out where that body is. There is additional documentation re URDF here:

    http://www.mujoco.org/book/modeling.html#CURDF

    Of course you can also read the documentation of URDF itself.
     
  4. @inksci Its from URDF to mjcf or txt
     
  5. Hi @Emo Todorov ,
    i guess it is the part of the leg CD part to the main body AND leg BC part (as you can see on the canvas.png). This is tricky given the fact the robot uses this motion model (see canvas2.png) where the CD part is linked to both main and BC to convert the rotation into a translation.
    is there any way around?
     
  6. Emo Todorov

    Emo Todorov Administrator Staff Member

    The joints in MuJoCo define a kinematic tree. If you want to have loop joints, you should add them as equality constraints. So in order to import such a URDF, you have to make it a tree, import, and then add constraints manually to the MJCF.