Differences

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

Link to this comparison view

Next revision
Previous revision
doc:faq [2013/04/22 08:32] – created admindoc:faq [2022/02/17 13:38] (current) – First FAQ entry yay. gkazhoya
Line 1: Line 1:
 ====== FAQ ====== ====== FAQ ======
  
-===== How can I debug Prolog programs? ===== +**Q: How can I add mesh in bullet having the full mesh path and not using the mesh folder?**
-There is [[http://www.swi-prolog.org/pldoc/doc_for?object=section%282,%273.5%27,swi%28%27/doc/Manual/guitracer.html%27%29%29|graphical debugger in SWI Prolog]] that is very useful to go through your program step by step, inspect the variable bindings and the open choice points.+
  
 +A: The mesh paths are stored here: https://github.com/cram2/cram/blob/boxy-melodic/cram_3d_world/cram_bullet_reasoning/src/items.lisp#L36
  
-===== Which programming language should I use for what purpose? ===== +To add new entries into the variable you use this functionhttps://github.com/cram2/cram/blob/boxy-melodic/cram_3d_world/cram_bullet_reasoning/src/items.lisp#L62
-KnowRob is implemented in a combination of OWL, Prolog and Java. When creating extensions, it is worth considering which language to implement them in:+
  
-== OWL== +Here is an example. These are two meshes that we use for the shopping scenariohttps://github.com/cram2/cram/tree/boxy-melodic/cram_demos/cram_donbot_retail_demo/resource
-  * Description language, no programming language +
-  * Class taxonomy of objects, actions, events,... +
-  * Instances of these classes (e.g. environment models, experiences) +
-  * Robot capabilities/action requirements+
  
-== Prolog: == +In order to register themwe call the add-objects-to-mesh-list function in the init-projection functionwhich is called upon ROS node startup: https://github.com/cram2/cram/blob/boxy-melodic/cram_demos/cram_donbot_retail_demo/src/setup.lisp#L45
-  * Logical programming language: conceptually close to the knowledge representationgood at searching and pattern matching +
-  * Useful for functionality interacting closely with the internal representation (OWL gets parsed into Prolog triples) +
-  * Wrapper predicates to simplify commonly used queriesinference predicates (DL inference, computables,...) +
-  * Functionality involving (recursive) search, graph matching, reasoning about ontological structure, ...+
  
-== Java: == +To register any function as a callback upon node startup we use this macro https://github.com/cram2/cram/blob/boxy-melodic/cram_demos/cram_donbot_retail_demo/src/setup.lisp#L47
-  * Object-oriented programming language that can interact with Prolog via the [[http://www.swi-prolog.org/packages/jpl/|JPL interface]] +
-  * Conceptually further away from the internal knowledge representation +
-  * Good library support, therefore useful for external interfaces (WWW, ROS,...) and for integrating libraries (ProbCog, Weka, Visualization...)+
  
 +Once you have the paths stored in the btr::mesh-files variable, you can spawn an object of the same type as the filename, e.g., for the retail scenario one can spawn an object of type :balea-bottle or :dish-washer-tabs.
 +
 +You can, of course, just populate the mesh variable manually to hack something quickly, but I'd suggest using the add-objects-to-mesh list function.
 +
 +Important: the meshes should be located in a ROS package that the system is able to find with ''roscd $THE_PACKAGE''.
 +
 +------------------