Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
doc:reasoning_about_logged_experiences [2014/02/19 08:21] admindoc:reasoning_about_logged_experiences [2014/06/05 17:44] – [Reasoning over logged data using knowrob_mongo] admin
Line 1: Line 1:
 ====== Reasoning about logged robot experiences ====== ====== Reasoning about logged robot experiences ======
  
 +This page lists methods and tools for reasoning about log data of robot tasks created using the [[http://www.cram-system.org/doc#logging_infrastructure|CRAM logging infrastructure]]. These logs consist of two parts: High-level plan events are stored as action instances in an OWL file, while lower-level high-volume data is logged separately into a MongoDB database. This allows efficient recording and storage of data like tf poses, perception results etc. Special Prolog predicates allow to access the information stored in the database.
  
-====== Symbolic reasoning about logged data ======+===== Installation =====
  
-This page lists different queries related to the sybolic inference about logged data stored in a MongoDB database.+Usually, the log files are created using the [[http://www.cram-system.org/doc/logging/roslog|CRAM logging infrastructure]] that also includes the installation of a MongoDB database. If you would like to use the system on another computer, make sure to have a MongoDB database installed (the Ubuntu default version should work). 
 +  sudo apt-get install mongodb-dev
  
-===== Startup =====+The logged data is stored in a database called 'roslog'; the collections in this database correspond to the respective topic names, for example 'tf'. From the KnowRob side, you will need the "Complete system including add-on packages" installation of KnowRob from source and compile mod_execution_trace using  
 +  rosmake mod_execution_trace 
 +   
 +We have prepared an archive with test data logged during a pick-and-place task with the PR2 robot. You can download the file from [[http://knowrob.org/files/pick-and-place.tar.bz2|here]] and insert it into your MongoDB using the following commands: 
 +  tar -xvjf pick-and-place.tar.bz2 
 +  cd pick-and-place 
 +  mongoimport --db roslog --collection tf tf.json 
 +  mongoimport --db roslog --collection logged_designators logged_designators.json 
 +  mongoimport --db roslog --collection logged_metadata logged_metadata 
 + 
 + 
 +===== Reasoning about logged data using knowrob_mongo ===== 
 +The knowrob_mongo package contains methods for accessing information in the MongoDB database via KnowRob predicates, for example the logged tf pose data or perception results. 
 + 
 +==== Startup ====
  
   $ rosrun rosprolog rosprolog knowrob_mongo   $ rosrun rosprolog rosprolog knowrob_mongo
Line 12: Line 28:
   ?- owl_parse('owl/perceive-no-details.owl', false, false, true).   ?- owl_parse('owl/perceive-no-details.owl', false, false, true).
  
-===== Queries =====+==== Queries ====
   # read pose of cameras in /map coordinates at the beginning of event_dInF6Fvz   # read pose of cameras in /map coordinates at the beginning of event_dInF6Fvz
   ?- owl_individual_of(A, srdl2comp:'Camera'),    ?- owl_individual_of(A, srdl2comp:'Camera'), 
Line 62: Line 78:
  
  
-====== Reasoning over plan logs using mod_execution_trace ======+===== Reasoning over plan logs using mod_execution_trace =====
  
-===== Prerequisites =====+==== Prerequisites ====
 1) Get latest version of knowrob and knowrob_addons from [[https://github.com/knowrob/knowrob | Link 1]] [[https://github.com/knowrob/knowrob_addons | Link 2]] respectively. Put these ROS stacks into your ROS workspace. 1) Get latest version of knowrob and knowrob_addons from [[https://github.com/knowrob/knowrob | Link 1]] [[https://github.com/knowrob/knowrob_addons | Link 2]] respectively. Put these ROS stacks into your ROS workspace.
  
 2) Get the dataset from [[https://www.dropbox.com/s/9w4wsl2u6h9j694/packaging2.zip | Link]] (Note that dataset is slightly modified version of Jan's. Namely, some modifications were done in namespaces and class namings). Extract it somewhere you choose. 2) Get the dataset from [[https://www.dropbox.com/s/9w4wsl2u6h9j694/packaging2.zip | Link]] (Note that dataset is slightly modified version of Jan's. Namely, some modifications were done in namespaces and class namings). Extract it somewhere you choose.
  
-===== Starting up the Software =====+==== Starting up the Software ====
  
   $ rosrun rosprolog rosprolog mod_vis   $ rosrun rosprolog rosprolog mod_vis
Line 75: Line 91:
   ?- owl_parse('path_of_dataset_should_be_here/perceive-no-details.owl', false, false, true).   ?- owl_parse('path_of_dataset_should_be_here/perceive-no-details.owl', false, false, true).
      
-===== Example Query =====+==== Example Query ====
 "What is the probability of a certain task was failed during the execution of a plan?" is shown as an example. It is also one of the use-cases what we want to show in our ACS'13 paper. "What is the probability of a certain task was failed during the execution of a plan?" is shown as an example. It is also one of the use-cases what we want to show in our ACS'13 paper.