stephane-caron/openrave_models

Importing and Creating your own model

Closed this issue · 1 comments

Hello, here is log, which I got, calling 'python load_model.py Robot.dae' on my simple ".dae" file:

2017-07-04 01:12:14,936 openrave [ERROR] [colladareader.cpp:3788 ColladaReader::handleError] COLLADA error: Trying to load an invalid COLLADA version for this DOM build!
2017-07-04 01:12:15,037 openrave [ERROR] [colladareader.cpp:3788 ColladaReader::handleError] COLLADA error: Failed to load file:/home/georgy/git/openrave_models/Robot.dae
2017-07-04 01:12:15,038 openrave [WARN] [xmlreaders-core.cpp:1527 JointXMLReader::endElement] Failed to find body FLYER_TX_LINK for joint FLYER_TX
2017-07-04 01:12:15,038 openrave [WARN] [xmlreaders-core.cpp:1527 JointXMLReader::endElement] Failed to find body FLYER_TY_LINK for joint FLYER_TX
2017-07-04 01:12:15,038 openrave [WARN] [xmlreaders-core.cpp:1465 JointXMLReader::endElement] parent kinbody has no links defined yet!
Traceback (most recent call last):
  File "load_model.py", line 123, in <module>
    robot = env.GetRobots()[0]
IndexError: list index out of range
[1]    5203 segmentation fault (core dumped)  python load_model.py Robot.dae

I assume, that I made some wrong ".dae" and maybe you can share some tips how to make right model, which I will be able to use with openrave.
Or I better make urdf/xml?

OpenRAVE reads COLLADA 1.5, but most 3D software out there will produce COLLADA 1.4. Your error message says the COLLADA version is invalid, so most likely your file is 1.4... (Note: ".dae" is the file extension for the COLLADA format.)

Some things that you can do:

  • If you can write your robot in OpenRAVE XML directly, that's the best.

  • Note that the Save() function of your openravepy.Environment object allows you to save your whole environment to a COLLADA 1.5 file. That's how I usually export my models from Blender to OpenRAVE:

    • Export your model to VRML
    • Load it with env.Load("model.wrl")
    • Save it with env.Save("model.dae")
  • If you prefer to use URDF, you may try out the or_urdf plugin. It didn't really work out when I tried a while ago, but maybe it can work for you.

Hope this helps!