KavrakiLab / tmkit

A Task-Motion Planning Framework
http://tmkit.kavrakilab.org
BSD 3-Clause "New" or "Revised" License
48 stars 12 forks source link

"Geometry Attributes" for stuff loaded via URDF #5

Open clemense opened 6 years ago

clemense commented 6 years ago

Is it possible to add "Geometry Attributes" (like "isa") to things loaded via URDF?

clemense commented 6 years ago

Alright, got it, sorry. Will just use "aarxc scene.urdf -s scene.robray" to convert to robray and then add things by hand. Unfortunately, this solution requires to redo these steps every time "scene.urdf" changes. If there's a more convenient solution I'm curious to know.

ndantam commented 6 years ago

Can you give a more specific example of what the URDF looks like and what attribute you want in the scene / robray file?

clemense commented 6 years ago

I have an articulated object as part of the scene and would like to tag certain parts like handles via the "isa" property. Do you think this is the wrong way to model this?

ndantam commented 6 years ago

Sounds reasonable... Is the "isa" property included in standard URDF?

clemense commented 6 years ago

No, URDF is very restricted.

clemense commented 6 years ago

Is there an API to maybe modify the scene graph after it is loaded? In order to add such (semantic) properties.

ndantam commented 6 years ago

Yes, you could do this with a short Lisp script to load the scene file, modify the scene graph data structure, and then output the result. The relevant functions should mostly be here: https://github.com/golems/amino/blob/master/lisp/rx/scenegraph.lisp.

It would be possible to bind these functions in (CL)Python, if that would make the process more accessible. What do you think?

clemense commented 6 years ago

Cool! Yes, I would prefer the python interface.

ndantam commented 6 years ago

OK, there is a partial CLPython binding already: https://github.com/golems/amino/blob/master/lisp/py/user.lisp

Just need to include the additional functions for scene graph I/O and manipulation. Please give me a couple days to look into this.