no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


Previous revision
Next revision
mesh_reasoning [2013/03/31 17:07] – [Usage] Min/max handle length profanter
Line 1: Line 1:
 +====== Reasoning about geometric object models ======
 +~~NOTOC~~
 +This module is currently under development and not publicly available.
 +
 +===== 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:
 +<code>
 + ?- mesh_element_types($Mr, TypeList).
 + TypeList = ['Plane','Cone','Sphere','Container'].
 +</code>
 +
 +Sample call for highlighting all sphere annotations:
 +<code>
 + ?- 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.
 +</code>
 +
 +Clear highlight with
 +<code>
 + mesh_annotator_clear_highlight($Mr).
 +</code>
 +
 +Finding handles (default or by specifying minimum and maximum radius of a handle (unit in meters) or min/max radius and min/max length):
 +<code>
 + 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).
 +</code>
 +
 +Finding all supporting planes:
 +<code>
 + mesh_find_supporting_planes($Mr,Planes), mesh_annotator_highlight($Mr,Planes).
 +</code>
 +
 +
 +===== 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
 +<code>
 + $ roscd knowrob_mesh_reasoning
 + $ rosrun rosprolog rosprolog knowrob_mesh_reasoning
 +</code>
 +
 +Load example file
 +<code>
 + ?- owl_parse('owl/test_objects.owl', false, false, true).
 +</code>
 +
 +Ask for properPhysicalParts (loads mesh, segments it and creates the parts on the fly)
 +<code>
 + ?- rdf_triple(knowrob:properPhysicalParts, knowrob:cabinet1, Parts).
 +</code>
 +
 +Ask for properties of these parts
 +<code>
 + ?- rdf_triple(knowrob:areaOfObject, $Parts, Area).
 +</code>
 +
 +
 +==== 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')
 +