This is an old revision of the document!
Reasoning about geometric object models
This module is currently under development and not publicly available. A publication describing this module has been presented at IROS 2013.
<iframe src=“player.vimeo.com/video/83977706” width=“700” height=“281” frameborder=“0” webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href=“http://vimeo.com/83977706”>Decomposing CAD Models into their Functional Parts</a> from <a href=“http://vimeo.com/knowrob”>knowrob</a> on <a href=“https://vimeo.com”>Vimeo</a>.</p> ===== Usage ===== Start knowrob_mesh_reasoning <code> roscd knowrob_mesh_reasoning rosrun rosprolog rosprolog knowrob_mesh_reasoning </code> Analyze a model by its direct path or a KnowRob identifier (you first have to load an OWL file with the object) <code> ?- mesh_annotator_path('package:knowrob_mesh_reasoning/models/cup2.dae',Mr). ?- mesh_annotator(knowrob:'DrinkingBottle', Mr). </code>
Retrieve a list of found annotation types:
?- mesh_element_types($Mr, TypeList). TypeList = ['Plane','Cone','Sphere','Container'].
Sample call for highlighting all sphere annotations:
?- mesh_annotator_path('package://knowrob_mesh_reasoning/models/cup2.dae',Mr). PeasyCam v105 [INFO 14:28:17,955] root - MeshReasoning started. Parsing model ... [DEBUG 14:28:18,748] root - Model parsed. Took: 00:00:00.781 (Vertices: 3196, Lines: 0, Triangles: 6332) [DEBUG 14:28:18,754] root - Calculating curvature ... [DEBUG 14:28:19,271] NeighborAnalyzer - Started [DEBUG 14:28:23,860] NeighborAnalyzer - Ended. Took: 00:00:04.588 [DEBUG 14:28:23,860] PrimitiveAnalyzer - Started [DEBUG 14:28:27,788] PrimitiveAnalyzer - Ended. Took: 00:00:03.928 [DEBUG 14:28:27,788] ContainerAnalyzer - Started [DEBUG 14:28:27,791] ContainerAnalyzer - Ended. Took: 00:00:00.002 Mr = @'J#00000140259203508552'. ?- mesh_find_annotations($Mr,'Sphere',Found). Found = @'J#00000140260210192312'. ?- mesh_annotator_highlight($Mr,$Found). FoundList = [@'J#00000140144111974832', @'J#00000140144111974824', @'J#00000140144111974816', @'J#00000140144111974808']. false.
Clear highlight with
mesh_annotator_clear_highlight($Mr).
Finding handles (default or by specifying minimum and maximum radius of a handle (unit in meters) or min/max radius and min/max length):
mesh_find_handle($Mr, Li), listsplit(Li,Lh,Lt), mesh_annotator_highlight($Mr,Lh). mesh_find_handle($Mr, Li, 0.1, 0.8), listsplit(Li,Lh,Lt), mesh_annotator_highlight($Mr,Lh). mesh_find_handle($Mr, Li, 0.1, 0.8, 0.05, 0.20), listsplit(Li,Lh,Lt), mesh_annotator_highlight($Mr,Lh).
Finding all supporting planes:
mesh_find_supporting_planes($Mr,Planes), mesh_annotator_highlight($Mr,Planes).
Computables
These computables are still work in progress, but they already build up the OWL datastructures of the object and its parts including their properties and relative poses.
Start knowrob_mesh_reasoning
$ roscd knowrob_mesh_reasoning $ rosrun rosprolog rosprolog knowrob_mesh_reasoning
Load example file
?- owl_parse('owl/test_objects.owl', false, false, true).
Ask for properPhysicalParts (loads mesh, segments it and creates the parts on the fly)
?- rdf_triple(knowrob:properPhysicalParts, knowrob:cabinet1, Parts).
Ask for properties of these parts
?- rdf_triple(knowrob:areaOfObject, $Parts, Area).
Currently implemented computables
- Planar surfaces
- normalDirection (vector)
- objectLongSide (vector)
- objectShortSide (vector)
- areaOfObject (float)
- areaCoverage (float)
- supporting planes (computable class for SupportingPlane)
- Spheres
- radius (float)
- volumeOfObject (float)
- areaOfObject (float)
- areaCoverage (float)
- concavity (computable class for ConcaveTangibleObject)
- Cones/cylinders
- radius (as average radius, float)
- maxRadius (float)
- minRadius (float)
- volumeOfObject (float)
- lengthOfObject (float)
- longitudinalDirection (vector)
- areaOfObject (float)
- areaCoverage (float)
- Containers
- longitudinalDirection (opening direction, vector)
- volumeOfObject (float)
- Handles (computable class for cylindrical handles, class 'Handle')