no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revisionLast revision | |||
— | doc:logging:beliefstate [2015/04/22 07:09] – [Running the belief state software] bbrieber | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Belief State Logging ====== | ||
+ | In order to create extensive logs of CRAM plan executions, a software package for symbolic logging was created. It records data based on symbolic contexts started and ended by external entities (such as CRAM). | ||
+ | |||
+ | |||
+ | ===== Context-driven, | ||
+ | |||
+ | The logs generated using the belief state log mechanism are represented by a tree of contexts and subcontexts. Each context can be annotated by additional data. Exemplary context annotation can take a form similar to the following (shown in pseudo-code): | ||
+ | |||
+ | <code pseudo> | ||
+ | begin context: fetch object | ||
+ | annotation: start-time = 0 | ||
+ | annotation: object-description = ... | ||
+ | | ||
+ | begin context: perceive | ||
+ | annotation: start-time = 0 | ||
+ | annotation: detected-object(s) = ... | ||
+ | annotation: end-time = 2 | ||
+ | annotation: success = true | ||
+ | end context | ||
+ | | ||
+ | begin context: navigate-to-object | ||
+ | annotation: start-time = 2 | ||
+ | annotation: goal-position = ... | ||
+ | annotation: end-time = 7 | ||
+ | annotation: success = true | ||
+ | end context | ||
+ | | ||
+ | begin context: grasp | ||
+ | annotation: start-time = 7 | ||
+ | annotation: gripper-side = left | ||
+ | annotation: end-time = 10 | ||
+ | annotation: success = true | ||
+ | end context | ||
+ | | ||
+ | annotation: end-time = 10 | ||
+ | annotation: success = true | ||
+ | end context | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Installation ===== | ||
+ | |||
+ | The logging mechanism consists of two parts: | ||
+ | * **The belief state logging software:** A ROS node that records all symbolic events that are sent to a specific set of ROS services. This node keeps track of the symbolic event tree, all of its annotations, | ||
+ | * **The CRAM belief state interface**: | ||
+ | |||
+ | In order to install the belief state logging software, you need the following entries in your '' | ||
+ | < | ||
+ | - git: {local-name: | ||
+ | - git: {local-name: | ||
+ | - git: {local-name: | ||
+ | </ | ||
+ | |||
+ | In order to install the belief state interface for CRAM, you need these entries in your '' | ||
+ | < | ||
+ | - git: {local-name: | ||
+ | - git: {local-name: | ||
+ | - git: {local-name: | ||
+ | </ | ||
+ | |||
+ | For compiling the package beliefstate with catkin you need the package libconfig++8-dev installed. | ||
+ | < | ||
+ | sudo apt-get install libconfig++8-dev | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Running the belief state software ===== | ||
+ | When installed and compiled through '' | ||
+ | <code bash> | ||
+ | $ rosrun semrec semrec | ||
+ | </ | ||
+ | The software automatically looks for plugins in your '' | ||
+ | |||
+ | So, pratically, you don't need to configure anything. If you want a configuration different from the default one, look into the file '' | ||
+ | |||
+ | Log files are by default saved into the directory structure in '' | ||
+ | |||
+ | Typical startup messages look like this: | ||
+ | < | ||
+ | [ core ] Starting beliefstate system. | ||
+ | [ plugin-instance ] Loaded plugin ' | ||
+ | [ plugin-instance ] Initialized plugin ' | ||
+ | [ plugin-instance ] Loaded plugin ' | ||
+ | [ros/1] Starting ROS node ' | ||
+ | [ros/1] ROS node started. Starting to spin (4 threads). | ||
+ | [ plugin-instance ] Initialized plugin ' | ||
+ | [ plugin-instance ] Loaded plugin ' | ||
+ | [ plugin-instance ] Initialized plugin ' | ||
+ | [ plugin-instance ] Loaded plugin ' | ||
+ | [ plugin-instance ] Initialized plugin ' | ||
+ | [ plugin-instance ] Loaded plugin ' | ||
+ | [ plugin-instance ] Initialized plugin ' | ||
+ | [ plugin-instance ] Loaded plugin ' | ||
+ | [ plugin-instance ] Initialized plugin ' | ||
+ | [ plugin-instance ] Loaded plugin ' | ||
+ | [ plugins ] Not loading development plugin: ' | ||
+ | [ plugin-instance ] Unloaded plugin ' | ||
+ | [ plugins ] Failed to load plugin ' | ||
+ | [ plugin-instance ] Loaded plugin ' | ||
+ | [ plugin-instance ] Initialized plugin ' | ||
+ | [ plugin-instance ] Loaded plugin ' | ||
+ | [ plugins ] Not loading development plugin: ' | ||
+ | [ plugin-instance ] Unloaded plugin ' | ||
+ | [ plugins ] Failed to load plugin ' | ||
+ | [ plugin-instance ] Loaded plugin ' | ||
+ | [ plugin-instance ] Initialized plugin ' | ||
+ | [supervisor/ | ||
+ | [supervisor/ | ||
+ | </ | ||
+ | |||
+ | Messages like '' | ||
+ | |||
+ | After startup, the '' | ||
+ | ===== Running the belief state CRAM interface ===== | ||
+ | In order to get log support in your CRAM applications, | ||
+ | |||
+ | To set metadata about the plan you are executing (to correctly identify your experiment), | ||
+ | <code lisp> | ||
+ | > (beliefstate: | ||
+ | :robot "My robot' | ||
+ | :creator "The experimenter" | ||
+ | :experiment "Pick and Place" | ||
+ | : | ||
+ | </ | ||
+ | The data is then sent to the belief state software and will be extracted as '' | ||
+ | |||
+ | If you want to extract the current state of the experiment (after collecting experiment data from plan execution), do this: | ||
+ | <code lisp> | ||
+ | > (beliefstate: | ||
+ | </ | ||
+ | This effectively extracts the collected information into files preceeded with '' | ||
+ | |||
+ | ===== Capabilities ===== | ||
+ | The belief state logging software itself has no abilities itself except for message transportation and plugin loading. The capabilities available for logging are introduced by plugins, described in more detail [[doc: | ||
+ | |||
+ | ===== Tutorials ===== | ||
+ | In order to interface with the logging infrastructure, | ||
+ | |||
+ | * [[doc: |