[Fawkes Git] branch/fzwilling/robot-memory: 313 revs updated. (0.5.0-3394-g69195c3)

Frederik Zwilling zwilling at kbsg.rwth-aachen.de
Wed Sep 21 19:57:36 CEST 2016


Changes have been pushed for the project "Fawkes Robotics Software Framework".

Gitweb: http://git.fawkesrobotics.org/fawkes.git
Trac:   http://trac.fawkesrobotics.org

The branch, fzwilling/robot-memory has been updated
  discards  8a5b8026678bdc94d20f319705fafcf023c10368 (commit)
  discards  b35f714869f8ce8161e7021dce03aa2a133f824e (commit)
  discards  c87c3afb891e14315d47b0815a7a6f70af626f7e (commit)
  discards  ff3303de647e0d78566794be4ffb90899dd0929d (commit)
  discards  0e4f76c33d71402aaf71764d1d6baed0fad5f968 (commit)
  discards  b5a15aed242fabf348b6afc85b370240f422a4f3 (commit)
  discards  b7c0f54f638b28e485729f3460b0678e45905195 (commit)
  discards  9b95b13198e94447548ac95ca82e6a7fed5dbd96 (commit)
  discards  e1c90eeaf19de473dc33bc7f5f365daf4668f82c (commit)
  discards  adeb72b19f66db0c542457bec914552260dd004c (commit)
  discards  b8f723a3d70ad7ff4cfe3360ebbbf0d7dff3ef0c (commit)
  discards  0103dae0e20e1f554ecbb8084422157c94f7976f (commit)
  discards  d12243ddb9a7d991e4661c464ba4c20a82b9d32d (commit)
  discards  f6f4c0569cfa901c555a4d5177bd1387092dd238 (commit)
  discards  e1ca80b64149553b3e4b45393b7af50d3b3ff3e9 (commit)
  discards  19166057c87f28c0f8b1fc55572f20cb371ab13c (commit)
  discards  2d4b77e55d659fe25cc04c546f6e18d5e9efcf62 (commit)
  discards  dd8aa99ca6506fd0cc134470fa02a80977d5f2ac (commit)
  discards  8bc2ab5189aa6849d6ca33d0ea691711db8d5cdf (commit)
  discards  182922651a00e647f5d8eb519d60b3fdbc064572 (commit)
  discards  ef0a9cb4996993358bf7d041cfb796781c97228f (commit)
  discards  64407f17bae074c03ca98179bab823056421f42d (commit)
  discards  d7432e57f12e81bca648e61ecdcf080d2c25d907 (commit)
  discards  9ef52de1feebc7ed4657da10774c1d579fef2275 (commit)
  discards  08f87a1aef07d3ca8c20b2f46b5c795896e24733 (commit)
  discards  2f7c32a12fec511562ab416ad08f1447e3303708 (commit)
  discards  bdafaece38bb98bd359cf392b42dc02c02fae4da (commit)
        to  69195c38a75ac601772b9cabd4dad09040d421eb (commit)
       via  54478d8068bd92d09e339929974a5ce260b54089 (commit)
       via  c0357cb0cb7d0e11834b83ccdd3edfb6f1f3ac5a (commit)
       via  de73a7db12983440d1d4de7f5103f13660f4b24f (commit)
       via  3af7d94677205381ecd336b048dc8c33c7dcf9a5 (commit)
       via  b9f7287e9839760b67c07f4365d0034c34276a5c (commit)
       via  9cf08148999af9ae0f74eb3a719fa56d1e4c7864 (commit)
       via  cdecfb075141a21d62f4ef1ac0590403fd5c34fc (commit)
       via  e47565a0598910e69d3e397856afd2c91d0270bc (commit)
       via  5bf7f961a90888869504f86b926602ad9ac2e766 (commit)
       via  d8a0684480e717cd1b12178067cbe4a1e1b10806 (commit)
       via  6b6a1772bf007d4b0be9e9d75f8870c16bd4fa04 (commit)
       via  a184dc8ad586101023be35bca4c8cb577ba45e42 (commit)
       via  aedae1b4e6c33806c65789fe094d22c5c5e528ea (commit)
       via  0121b82476f370d33e5cd1c58cc5a55d2aa083a1 (commit)
       via  fd1d110a8cb83eb931efce4056f47e1ca531cc26 (commit)
       via  43c0ff74262a4175f7ef4311440e09b2d3fb979f (commit)
       via  24573f491e916ea4fe2dd1948c4f091566401c6a (commit)
       via  7d86c6fc167acc2d6ff0f95fc7692dee31d2c463 (commit)
       via  b2a5231a1ba736c9114a903556300e3c61da6fcb (commit)
       via  4bb5f4709e414612659dbedeb42384d5661b6530 (commit)
       via  63d7186f6cdd37d715aeb7b57c953049f2e33673 (commit)
       via  15fad015e6794700d1da6ebd09cbb1ddee61efb4 (commit)
       via  6bbf4ea6838a733dcf3f8e8c9603f0a9bbf265d6 (commit)
       via  caec699dd3e4fdc46781bc6104c4ca052f688009 (commit)
       via  7138569cfccbbf9efc8ee18131cdf03c21f410da (commit)
       via  8806eb005879a2e879217f00cad88fb8f7cdaa15 (commit)
       via  588071131dcb023b3018c54958aea5a54561deb4 (commit)
       via  9ba190d1be45e1bb69b664105b02e7ee8ec41230 (commit)
       via  245dd89efc241749c3d84269eb1dd0a06878de56 (commit)
       via  d6dbef50be74a35de2f6f88e5c54959435640847 (commit)
       via  10cd5ba5d9f369e108e49cbe0be06966e30f5fc0 (commit)
       via  8393838cd2fd202b389ca3d8402d293952de9e58 (commit)
       via  e294066c83ddbbc8c001b08865e18aee43ca81b1 (commit)
       via  6dd1f3070423f077b44d2354eeb9e58638c34214 (commit)
       via  5ad698cdca3c961c591fd64b0c8d5cb87d266ba3 (commit)
       via  8264cbf5b340cfbb83553cd5b2f79764b11515a4 (commit)
       via  51afc9e414c0aa2814a0592dc3438ecd1c36b77e (commit)
       via  4fc34bc1a2b2db584ebb8ff0fbe9d773a6240fc5 (commit)
       via  a8fb3e63389da0bef604d8e0b8b393c9e2d2c29e (commit)
       via  44a73a504ccd2eeb5cf53e3a8eed86813e8b6722 (commit)
       via  0b071737a417c4948f828ef855499fbf2a3a0dc5 (commit)
       via  1c86ddf733c4e7448e9c65adb4f33736e88d1782 (commit)
       via  83ed87d9f7580f66abb30130e67dce9a1fe07004 (commit)
       via  d56f7eb82ed76c6ae728dca96f2249c1ef93017b (commit)
       via  784243be581f00c3e9682c39b212b2e26583fd67 (commit)
       via  f5da9780a8ef4841e649e337bbad01d83569c702 (commit)
       via  b73935a418d4cd7186aa4cce010a48c234093463 (commit)
       via  bda907baa2a12aed7c19f70be7e6cd21e6cd8dd6 (commit)
       via  9f5d435494a0ee921119f8d59f84dedac119dca8 (commit)
       via  96c8a83311dad370563beb57fa9c117cb7954771 (commit)
       via  513b7351e8a023877aacd2f127b029951a20da45 (commit)
       via  079b9159311610930ffb448f1270fc1e1595e108 (commit)
       via  3a1dd4f00b96e3ffe6b76fb5e680de56df7d13a7 (commit)
       via  0b3ab2fb5d833c6bf4763485ab4095d79385a8b8 (commit)
       via  10e1d9b87355e32164209c81765c21859f703671 (commit)
       via  7fe8b669b417a68cf3666c13f24e8c0adcfc8bda (commit)
       via  2e746e17bf864d230d32f34fd1d502698cc96568 (commit)
       via  6170084e6c6b155fff6077adbc16ebc5b8fa64a8 (commit)
       via  56bf8cb8badb5416469c9f9ddbcdbd11f2bf2d56 (commit)
       via  b5f3644ae15ff0364b927e07e7bead4ceec3aaab (commit)
       via  3da37cd0815daba98244642c1381d2fe183cfb6c (commit)
       via  c9764cc0c6bcbe29457b23667154cad5c6d7a73f (commit)
       via  2581b85ee15a5d0a05d3ec307c41f3ef04074e69 (commit)
       via  7ea3b871c38e8cfac781949bc360c202f76b1654 (commit)
       via  45f4b5efa1b09aa04aa725486c08425169e9c807 (commit)
       via  f857fcdcea63e64bad1263e14abbc6e388f7a82d (commit)
       via  0e5132c91f0a4ab7f2dc62fa152bb18d1b32ad81 (commit)
       via  fd22b12cedc5d29e58ab7d7b87b2cf4d295ea309 (commit)
       via  080f081dfc524e3f9744a57f62fb5739c85c7226 (commit)
       via  665fb630a025a19fb154c7e01a1ff47b971b4951 (commit)
       via  466450556bcb0fd0b3afad2f3eeb5d0594f0d454 (commit)
       via  98f4922131adc6fb2382926f17588f35b7bc2a8c (commit)
       via  d9443bfc535e26a131e27fd2fabab814955f7abd (commit)
       via  48694d6cad38295716ef71a03e400a378b7ca60c (commit)
       via  7e9a365e38b61dd2755087d3ff26e87411d1a9e8 (commit)
       via  5d5625ebbc86bfccec620ca2f8d0c4140f9048b0 (commit)
       via  58daf18a23a6de6c877dce365223dac294634bf2 (commit)
       via  f6ac6707628d4b541fe89d33b9ab66ff9c109252 (commit)
       via  f98b59fa5fe4aab0674380d0f0611f330ad969b8 (commit)
       via  e6515f4ed2e534c6a690eb865314f18046ba22f0 (commit)
       via  da6306dd5cd6492f9c97372828b779ed50b78346 (commit)
       via  49fcc3195a197aac7529fe724a55274e6a0900a0 (commit)
       via  f20b5469a4652f85dd4c38e3ed4c91602bac8f99 (commit)
       via  ec6f7b5dfb49226c4240cca7831303344b7f0a9d (commit)
       via  0c18a8648beb91c172d16e7826a009cf6e80eb5b (commit)
       via  11788535f562606748af966643dfb85bb8adcdfa (commit)
       via  6d1d5bb34393de9a3b82fc617b91b702bcf14f0b (commit)
       via  9b2f6e62526e96a56d6f755720eb123e44cb78ce (commit)
       via  eeb575b8282067b64a7bf73d171b208fcfc03909 (commit)
       via  4e8206be7f9bc504ee45d265e7248253d73520d1 (commit)
       via  0e29c04013678ddd2b8b880504213482db773cc2 (commit)
       via  3f9c34504025ec4d65565f7ab7399aebcb5849aa (commit)
       via  a499d79289aac8080cba4c888f9a68def953cbd9 (commit)
       via  0f07c689aaee14ef9e963b4c8977caf026945639 (commit)
       via  98b00c217b98d54e2d72d7b25fa605c26397b3b2 (commit)
       via  430e024ab285d3468d33ec2d27b580f160a44814 (commit)
       via  d99cf4d0ce53d1e5e43cb6d51d89c3b51dff5943 (commit)
       via  cce9990493f14f2737702c92b8f954c6ccdda85b (commit)
       via  11bab182b4b1f827a5d81593fc294a1d3db88187 (commit)
       via  cccd37c6fe2e6551b5672569b15f4dd2bfb06d01 (commit)
       via  b5a08f86909c04a9e064ec401434c56a630f9ff6 (commit)
       via  719b73418b66a30c5078d2fc099d27c68e06f101 (commit)
       via  f54c6b4bf01f4d5c926500e9217a3abc27b3de07 (commit)
       via  0aae62787a2df4dd2e207091ada38bb5f0f3d3ce (commit)
       via  03523ac3a19016c99edc39eac71cbd88d45ab865 (commit)
       via  e5ea7294da4275561aca720557a96f673d6551f2 (commit)
       via  50f7ce96692e1ccec0681f038900171ea8a7275e (commit)
       via  1a0192d280d74f3e5219ed9432d6c81b77a9f13f (commit)
       via  6c66698e2f67ff202784dccab693b87c9a71aaf7 (commit)
       via  37f96c1ccc6c2394d544f398a52ecf90a094eb7e (commit)
       via  16c22d373e0c38f703b069690d3373384f38a2d7 (commit)
       via  07f47e4409ad926a17a20c76e9fb36a8a9361f67 (commit)
       via  a9e8065d1c86997e7f95ceedac577a7386590775 (commit)
       via  afaf1d6a86df77edae3e3e696f794caf19e13490 (commit)
       via  bee920638ebf969916e3550b8b5bff8fc949a9cd (commit)
       via  da18ec480de8fe06589bf2c549932758adf1c6b8 (commit)
       via  1ab622e3c92b9b4923c1dc4876363b0e3ba2677a (commit)
       via  2ed1d57dd56f496fadd6f9f58c48a889d6778373 (commit)
       via  cbe35a04a620ee8647a034d421a74384e08ec544 (commit)
       via  e321e6c49f8a2d4e02955c1180af2b1349e2402d (commit)
       via  58ed958df78fca0f30619021741ad8c7e6e5e090 (commit)
       via  88ebc52f0d7a634bf2f11915f4a58465e011fa22 (commit)
       via  f9006042ffd611987ecbd0be2957ceb74f2cd809 (commit)
       via  fbd017e6d951add369a328bc70254f3a2e6cbef7 (commit)
       via  be0d51841964dac7712c800c5d3c5ec736b87aa4 (commit)
       via  f20bb944e9378c8c80b55dc808644efc59474f8e (commit)
       via  c0628c938cfb3e5b124d051ce8b95e812b301d75 (commit)
       via  6c5fb4ccb10e7e812c2e1484bb5d159a456129e8 (commit)
       via  178d47a21e8a73f5d088f625d6683f0b9819aba6 (commit)
       via  4d304d55c22701c72156e7217e72d1693ba0fd93 (commit)
       via  4c89e43dc5f52e04c2407fa051810f9d8223e32b (commit)
       via  290aca7087bc4abe31fac9b3cd5f4da565ccd4e3 (commit)
       via  f176683092190d1bece9d3807f64524e4a695132 (commit)
       via  2ce3913f102bb83183249ea820a5c14d95225017 (commit)
       via  29065d07336dce0b47efd0a149b3923d069f1b0e (commit)
       via  915487019aca3ce434cb05f70c4b47c7385d8822 (commit)
       via  65366915d16be30268c75994aa359b249258b19b (commit)
       via  e0ef2c5584b51dbd0c91c5c054a3f579da01b21f (commit)
       via  f65f948b2e3f0d8abdd6df04aa26c9012573713f (commit)
       via  b9fcd71f0b42de5057fac513b4feda0887bf3f5d (commit)
       via  bbf38b5f75f982320fc5375f99bc4836e34797d0 (commit)
       via  2557ab7f599814e63bdb9eb6980077e5d192cd14 (commit)
       via  64b629ba3d52bcd0e65c90eb60b46778d7de18fa (commit)
       via  e4fe9b6e90bdb61332f860c3a18a977f5933a138 (commit)
       via  4b78bb5dfd243cede563e16837da260cf7e57e1a (commit)
       via  b2cdee485f55b6b8148665fca594ae599a2f8375 (commit)
       via  0685876efce394c6c5aef7bd0894e1e5833e2546 (commit)
       via  f04ba7040ef729cb60bca29c00ad0344e25f699e (commit)
       via  64eb9ea985d93855bd99e6178d96d111adeb21ae (commit)
       via  f139c25c46fa7331138c06e3f03c98d26e54fddd (commit)
       via  8203b8aa0f8fc75e8fdc95930a3472e3edb551e6 (commit)
       via  b94e86a36146a18e3472180c914b96df5ac63093 (commit)
       via  77fd7c78d8c1b37f8a30fb09ece662dd9daa9b33 (commit)
       via  17980ea5995aef126974c28f776fb956cdda92f1 (commit)
       via  bbef99de75a74cbe43d0338aca417e333fdbfa32 (commit)
       via  fceb82c6b91cfb6cf3372c14c9cf2fa1a02f46b2 (commit)
       via  f8cfee16cf6496b4fcbe29f8a11777a87b528b9f (commit)
       via  2c837e8d52635eefa0fa98906a4eca9b327def06 (commit)
       via  e182a2406c23746d5e02f7048898f191ec98945f (commit)
       via  07d84690843a1c94dda1fe82ab7bcb8cc8760da5 (commit)
       via  1e4d10050d29c9f2e623f67647dff45cbf786392 (commit)
       via  e2e80d65f3cc22a5be4a4d85467bc62a4b5ce174 (commit)
       via  54347c9a93e9feeef086b146c1ecf37322b8c4bf (commit)
       via  23c2811f98f3c7475eca5d52f4c0b31bed78e8ae (commit)
       via  13dbf1a89d55e14ff425e85bee5bbb6f322c5db4 (commit)
       via  d8dd277be5d6bf9c3c7273ebd0f3b02ccff12b6b (commit)
       via  fe212150494dade7ed8d98259d1e0ddb23358b88 (commit)
       via  fcee6f49c05bc46ecc06e6dd69ef0b50fa5895bf (commit)
       via  cd9130fa47d2d138c105850b4fa2cdabe0c937d7 (commit)
       via  8d11e44c56035791a22709e4baf503e9c4ef4c8b (commit)
       via  79b90f431b0a5953d45103016a0c26b2d5306c2f (commit)
       via  d1c49d53a80317d260e44af077ca782b522645f4 (commit)
       via  645221903bbb898a89606061af2a5820dca3fde2 (commit)
       via  83f3c3b44738f42d04f38639cd8e0059780743f9 (commit)
       via  9ca67ee723f8c47886377f23163c6a6fcbe986a5 (commit)
       via  478d4ab8cd88bf9eb6bfe39d65fbd692ffca9d99 (commit)
       via  50ece8964d871ebc27c0eddc0fe9eb2af5b356d0 (commit)
       via  0114a00db996072fefd4a94dfb8b9df601f3fa94 (commit)
       via  0fc8e4150162a60ae8211f9238db6f5f770fe22b (commit)
       via  c9d50b6de5255b7e7eb4774bf3d423a2cc457593 (commit)
       via  b16e59cb9dff9d0017fbdc08b25eb6fc64caaf7d (commit)
       via  d951b71774f982b3fb9236a7b60da79069c8e476 (commit)
       via  1cf25d91f000f59dd856378b71a2e7ea8e44a15f (commit)
       via  a2c35e25b99f48d1be673f5dc1743bebaa839d0a (commit)
       via  b05502ff124197d8a71289e62f5c03fbb223586a (commit)
       via  f47342e4b45958fafe492c087bbdb50fa989f638 (commit)
       via  2bc87d58113921bc60bfd3647035827774190e41 (commit)
       via  d022bd332531762b28e5a25eaa5b1f2763c7e495 (commit)
       via  a7368717c6becd8e146261a2143d04c6eff14ddf (commit)
       via  11850b75b65468ccae033b9a1768fe43f3d113f3 (commit)
       via  7aae7cfbde27ae218844cd12e6f0e0555c0dfa5c (commit)
       via  597113280001a367f8c37ed2bbeaf6a31bade944 (commit)
       via  0077f5559dd4586de654b551a1678f4b2c725f48 (commit)
       via  19970f50261fb8052a832d0a95a0ec37afd6d1e4 (commit)
       via  5af954f00da96369d08f7d5ae78222abba444518 (commit)
       via  434c889532a428d8b0a04c4a31fac19a229c8aea (commit)
       via  f28132bc865310b78ce0ea20bc4dc69ce9c3a07d (commit)
       via  f653c1b5cdcd4e3012829b7ff90c1e81f8572be3 (commit)
       via  bf9d5b332ac92881dfec35e22e849667638aea8a (commit)
       via  199ca4372349001105634f8d08e62622c882a4c4 (commit)
       via  64ee60bc7513ab1bba700775c72921ad81aa078e (commit)
       via  4627edbafd3ae7e31335a90680688d7060aedbae (commit)
       via  02fbcd8f2a846fc4a84416774290cb98849f7cf4 (commit)
       via  d80479bf70741fa8b9a4652e6962df492f68d6d7 (commit)
       via  fd10f4d510501845070428938976598605d481e8 (commit)
       via  ca9855de93f78fbe23ea36b65c12100a095090dd (commit)
       via  f9473faa9cdde4b2526a0500b727209406c6283b (commit)
       via  d40e1ccd54d9252791bd3a64ce4efa3928564cf3 (commit)
       via  d94736fb56c2df748be1662c225c285b854a565a (commit)
       via  e15601925acd43248c062a533b189b956383692b (commit)
       via  f258cb6ef63cac1855c35d51f4f1c16b0d5453b8 (commit)
       via  b93909cd299e6adc64df5ac11ba46f34b759f6b9 (commit)
       via  1429d7f404b4ee2a6e3a2ac1a6c6db1712bf1d81 (commit)
       via  4c9c84966731aeb578613cd12951cfc05f208ccd (commit)
       via  7d9de92414f9268b847db72a06a8493ef47ab148 (commit)
       via  e413a9902aa836811103134e6a6f1c159465f33b (commit)
       via  e4e6cce12c35a39477095701036e1e1982d92a17 (commit)
       via  1187f710720064dc2ed5759cc5927d2d02fb3b72 (commit)
       via  24540b8ba412220f6675146115e8417957270d5b (commit)
       via  f5a95e9a498db4c4230084d0555de7a20bbb1d82 (commit)
       via  ce7348c9d08c158f39bf42d988e9c4024739e1fb (commit)
       via  df4248deb5ec8edd349b1b642c03cbcd28e45c82 (commit)
       via  0aabc3cbcc30f5f6bbde1a92feb28fb3e8473d7c (commit)
       via  accf06d19be740868434eda2b1f74c5183d728be (commit)
       via  fa019abc62abce6e43c43b2848d3fe930abee732 (commit)
       via  96798a48ac8376ceb2c4840325c0d8ed76515197 (commit)
       via  599b51a644df68d4347316df55bdbd4270f41e98 (commit)
       via  0e758a742bf54eb4e85479bb5282c30229c9efd1 (commit)
       via  30810b68a4aca5d0f31f6c3e3ed5ba73614bcb6a (commit)
       via  aa26d1ea265fb1fea6f2c722289c59a21ce5506d (commit)
       via  d290644ddb63e89611eb1c0a18d137d10462ae32 (commit)
       via  cdbc1a08699bebaf2d841cb9d2107fd755cc1846 (commit)
       via  a54ce07c37f27024b1f8b8b2386e62dac1171a78 (commit)
       via  852d27ad5ea40d106c296f7b1565cdc79fe503f1 (commit)
       via  cceb762465160de2af9eee56d351663e88852e82 (commit)
       via  8d9312fa6a0da7d7b50b4783fac6fa2a8a79f2db (commit)
       via  55cd4f0b2311993341f1723b98b6d85cda524d06 (commit)
       via  c5d50752f402d871f34eeca552e1e127084053c1 (commit)
       via  48a251843f99b59fb62612b55341e26b12a5faa9 (commit)
       via  6de356b670b4820025601297c07fd5181f0e7451 (commit)
       via  25cb4fc4bf22a28bb78cf0b5a64cee0e5b98dd3e (commit)
       via  1bcb9f08a375c4b148c5a474d55ebb36ae6407e2 (commit)
       via  3968030a9cd0427c4ef26377dec10ad337d871f4 (commit)
       via  ce0a8fcdb3b7ba739e619287bb23064724c179eb (commit)
       via  aade921abb532f9d447855b69bdb0d1d15a3d761 (commit)
       via  2ae9c2b9ff361f8906c09e3f27342c66acb2967a (commit)
       via  173d02e3ff6460d92909f0ee093dab11467d4d68 (commit)
       via  caca8c7357a982124ee614400290e33af2be3d97 (commit)
       via  d766cc12e65515991b3142578a7f7f69193306c6 (commit)
       via  514564c0606f7286975e801db07066f78bdbdb80 (commit)
       via  b469c1ce3ea76c2ef00d57e795fe1f87d27f9086 (commit)
       via  279836c58d9f9425942a78122fbde3807c525cc2 (commit)
       via  b2276899d3eb8c41106ad2c052db011533eaa494 (commit)
       via  ed00e5db94ec36fd5e2f046e649bca57c3cf4e3d (commit)
       via  2f00cc914647b8dc9689ca44d2c52c23f4df4417 (commit)
       via  0e8e3e2b717320526c870c678a053ed0227569a7 (commit)
       via  b4ded1bc9721981dc7793e0e067be96f88290ba2 (commit)
       via  8fd786fda1c049957a467b91dc675dae2cab54da (commit)
       via  c4a99d154657d9a7284be18813f6c0a330578fa9 (commit)
       via  636d76b2640a90582006efe163e47c08ed5cc919 (commit)
       via  f057b95c53f6652033d74df50b0ac453cc6bc4f1 (commit)
       via  fcaa24b7368abb1fa9f0389f1be995f6075e6b3f (commit)
       via  19e65a99f415740d5b06ef8d3229845fa36341be (commit)
       via  24d074dda025b423416f8552f790748e595c6d6f (commit)
       via  5904ca521c1ea4be9d0a1eab893c7169a49efa25 (commit)
       via  a5279a19b989430d6c57b9d15175796564bcd106 (commit)
       via  c1043b7bd19c354e17da7a2fc696ab64cd723bba (commit)
       via  ece8ea28533a9c66ccea41dee1ad11d877b6515e (commit)
       via  4efd0a781bf34e908bfcd6cf3753fea174ca2b4c (commit)
       via  e2abb6cddf6bc4c5afcddf86f4439f6ca604f005 (commit)
       via  4edbd1315b79cbfb2a0f4a43e0b896f849f25ac6 (commit)
       via  70b8a87ba5f994c22bc624d5dd99f611ba317f60 (commit)
       via  1bd585a4325d13674d9338da493d8848885cb273 (commit)
       via  d8a31299cc630023462d46c70f898e7251841089 (commit)
       via  fd0d822429e46791c8d813a052b36ab93686ddfb (commit)
       via  e2f2ec9b5b4abbd1a52eb333f52d422b3eb73ef3 (commit)
       via  39a801bb75b3d117ab7682f14d6292cf3a6c00a4 (commit)
       via  653e9da1728f5de542c86df1854ab88c39951ce8 (commit)
       via  92ba576c50aeb3ccd3ff610d045a1c78613596aa (commit)
       via  93a6c61ea2d72bde7e2d9a4167e093542a3f5827 (commit)
       via  6114f9107c3747ad6d223a97df10ecd6dd00712b (commit)
       via  ad29da79068fedcaa8cfb7192c4d73156022189a (commit)
       via  03b21cd4758d52d6d6aff2eb16d55dd368257d8d (commit)
       via  018256b91d12da67f70eef339fc46950e137742c (commit)
       via  a9d8e7c18c5d473f833b8586859c1db57d3535b7 (commit)
       via  e107ae1b8d1b5b3dff753aa67d8e4c1e0586da83 (commit)
       via  df7e554407e74309289a9cb002c3ff2587417615 (commit)
       via  5807fb7db8d2026e17dc4b87d9c8c19996288c34 (commit)
       via  1461082897c75ec22028282124480419e3f68ccc (commit)
       via  1aa57a4e4693c823a5c3a3bf6c69ce7bc1515451 (commit)
       via  6a6d2f0334daa69dde5f121605ad5ae0602293bc (commit)
       via  0f9cd36734d1b1a257c785ce97bfa50ab90ab7ee (commit)
       via  b5390a24257b8f4bdfd8f03d244b12b0efec2e81 (commit)
       via  ae82ab53b9f68e704d64ad08110cf74e304e5f11 (commit)
       via  279841b904f8d494e2bee2c78f6dbf2c870d21f3 (commit)
       via  13391ca51aad4cfa29c51a3559b32870f833c492 (commit)
       via  173a2d8497e4d5a5bbad4b4b5c701036d41ebbeb (commit)
       via  90bb6e55bbd89221a1bfbc9d802665f8beff608b (commit)
       via  149ecaa0c38aec33ce985bb6be2d3c85d1fa0177 (commit)
       via  7ba6d1c1054638d9a585e423e5d28f56f9ba429f (commit)
       via  50684a488d6e6aeb89be21d3785167bd86146e84 (commit)
       via  8294e05093da52dce553b664e2a3f1c42541d57e (commit)
       via  258df8714f0ea2f95d705887e2d46647a142971c (commit)
       via  2e93025c436627116c2e4a2b0e000cbad739baed (commit)
       via  410db207d876623ad320015c321c1935bbbc20af (commit)
       via  1145eb2b0027e711e321cc6bd4891c921de7ad00 (commit)
       via  7d2a1951eb0eff20de57b38abcdccf8759999a40 (commit)
       via  d2d8bf5fa324c6ed7b887e78b46569f7668d7635 (commit)
       via  db9a5fd51570896f9fd88f1ae2f0beecb748fe5f (commit)
       via  6636bc7d3b1655145c317a45c2cd1928d2f71fa1 (commit)
       via  23c909690f3afbdb45acd50403256bff43e47aed (commit)
       via  7c0eba1df1deadd4febafd3e43d514a3d3eaa429 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (8a5b8026678bdc94d20f319705fafcf023c10368)
            \
             N -- N -- N (69195c38a75ac601772b9cabd4dad09040d421eb)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

http://git.fawkesrobotics.org/fawkes.git/fzwilling/robot-memory

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- *Log* ---------------------------------------------------------------
commit 8806eb005879a2e879217f00cad88fb8f7cdaa15
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Sun May 1 20:14:11 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:02 2016 +0200

    robot-memory: skeleton for experimental plugin

http://git.fawkesrobotics.org/fawkes.git/commit/8806eb0
http://trac.fawkesrobotics.org/changeset/8806eb0

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 7138569cfccbbf9efc8ee18131cdf03c21f410da
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Sun May 1 22:33:08 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:02 2016 +0200

    robot-memory: execute queries from interface msg

http://git.fawkesrobotics.org/fawkes.git/commit/7138569
http://trac.fawkesrobotics.org/changeset/7138569

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit caec699dd3e4fdc46781bc6104c4ca052f688009
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Sun May 1 23:38:09 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:03 2016 +0200

    robot-memory: get info about parsed query

http://git.fawkesrobotics.org/fawkes.git/commit/caec699
http://trac.fawkesrobotics.org/changeset/caec699

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 6bbf4ea6838a733dcf3f8e8c9603f0a9bbf265d6
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Mon May 9 17:50:45 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:03 2016 +0200

    robot-memory: added insert, update, remove messages

http://git.fawkesrobotics.org/fawkes.git/commit/6bbf4ea
http://trac.fawkesrobotics.org/changeset/6bbf4ea

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 15fad015e6794700d1da6ebd09cbb1ddee61efb4
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Mon May 9 18:59:23 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:03 2016 +0200

    robot-memory: virtual knowledge base experiments

http://git.fawkesrobotics.org/fawkes.git/commit/15fad01
http://trac.fawkesrobotics.org/changeset/15fad01

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 63d7186f6cdd37d715aeb7b57c953049f2e33673
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Wed May 11 14:52:21 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:03 2016 +0200

    robot-memory: added missing config file

http://git.fawkesrobotics.org/fawkes.git/commit/63d7186
http://trac.fawkesrobotics.org/changeset/63d7186

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 4bb5f4709e414612659dbedeb42384d5661b6530
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Thu Aug 18 12:59:31 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:03 2016 +0200

    robot-memory: added gtest skeleton for unit testing

http://git.fawkesrobotics.org/fawkes.git/commit/4bb5f47
http://trac.fawkesrobotics.org/changeset/4bb5f47

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit b2a5231a1ba736c9114a903556300e3c61da6fcb
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Tue Aug 23 18:51:52 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:03 2016 +0200

    mongodb: hint in exception to start the mongod service

http://git.fawkesrobotics.org/fawkes.git/commit/b2a5231
http://trac.fawkesrobotics.org/changeset/b2a5231

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 7d86c6fc167acc2d6ff0f95fc7692dee31d2c463
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Tue Aug 23 18:55:19 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:03 2016 +0200

    robot-memory: provide aspect for using the RobotMemory

http://git.fawkesrobotics.org/fawkes.git/commit/7d86c6f
http://trac.fawkesrobotics.org/changeset/7d86c6f

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 24573f491e916ea4fe2dd1948c4f091566401c6a
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Wed Aug 24 11:36:35 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:03 2016 +0200

    robot-memory: clearer api functions

http://git.fawkesrobotics.org/fawkes.git/commit/24573f4
http://trac.fawkesrobotics.org/changeset/24573f4

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 43c0ff74262a4175f7ef4311440e09b2d3fb979f
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Wed Aug 24 14:03:51 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:03 2016 +0200

    gtest: tool for unit testing in a running fawkes environment
    
    This tool allows gtest unit tests depending on a running fawkes
    environmnet with aspects, plugins, blackboard, etc.
    You can execute tests with "make test" in src/tools/gtest. It then
    starts fawkes similar to the mainapp's main function with a set of
    plugins containing a test-plugin. This test plugin implements unit tests
    and calls the RUN_ALL_TESTS makro. Afterwards the plugins ends fawkes.

http://git.fawkesrobotics.org/fawkes.git/commit/43c0ff7
http://trac.fawkesrobotics.org/changeset/43c0ff7

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit fd1d110a8cb83eb931efce4056f47e1ca531cc26
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Wed Aug 24 14:59:22 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:03 2016 +0200

    robot-memory: created gtest plugin to run tests in fawkes

http://git.fawkesrobotics.org/fawkes.git/commit/fd1d110
http://trac.fawkesrobotics.org/changeset/fd1d110

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 0121b82476f370d33e5cd1c58cc5a55d2aa083a1
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Wed Aug 24 17:40:48 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:03 2016 +0200

    robot-memory-test: provide environment with access to the RobotMemory

http://git.fawkesrobotics.org/fawkes.git/commit/0121b82
http://trac.fawkesrobotics.org/changeset/0121b82

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit aedae1b4e6c33806c65789fe094d22c5c5e528ea
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Thu Aug 25 02:16:47 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:03 2016 +0200

    robot-memory: appropriate return values for query,insert,update,remove
    
    Added proper return values. 1/0 for successful/failed
    insert,update,remove. Cursor for query or NULL for invalid query.

http://git.fawkesrobotics.org/fawkes.git/commit/aedae1b
http://trac.fawkesrobotics.org/changeset/aedae1b

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit a184dc8ad586101023be35bca4c8cb577ba45e42
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Thu Aug 25 02:19:47 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:03 2016 +0200

    robot-memory-tests: added tests for query,insert,update,remove

http://git.fawkesrobotics.org/fawkes.git/commit/a184dc8
http://trac.fawkesrobotics.org/changeset/a184dc8

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 6b6a1772bf007d4b0be9e9d75f8870c16bd4fa04
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Thu Aug 25 21:57:23 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:03 2016 +0200

    robot-memory: configurable debug output

http://git.fawkesrobotics.org/fawkes.git/commit/6b6a177
http://trac.fawkesrobotics.org/changeset/6b6a177

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit d8a0684480e717cd1b12178067cbe4a1e1b10806
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Thu Aug 25 21:57:57 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:03 2016 +0200

    robot-memory-test: properly quit fawkes when tests finished

http://git.fawkesrobotics.org/fawkes.git/commit/d8a0684
http://trac.fawkesrobotics.org/changeset/d8a0684

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 5bf7f961a90888869504f86b926602ad9ac2e766
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Fri Aug 26 19:05:37 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:04 2016 +0200

    robot-memory: better logging functions

http://git.fawkesrobotics.org/fawkes.git/commit/5bf7f96
http://trac.fawkesrobotics.org/changeset/5bf7f96

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit e47565a0598910e69d3e397856afd2c91d0270bc
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Mon Aug 29 19:02:53 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:04 2016 +0200

    robot-memory: dump and restore collections
    
    You can now dump and restore collections. This allows setting the robot
    memory to an initial state or storing memory states (e.g. to repeat
    experiments on the same data).
    The implementation uses mongorestore and mongodump.

http://git.fawkesrobotics.org/fawkes.git/commit/e47565a
http://trac.fawkesrobotics.org/changeset/e47565a

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit cdecfb075141a21d62f4ef1ac0590403fd5c34fc
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Mon Aug 29 19:44:31 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:04 2016 +0200

    robot-memory: use BSONObj and Query in API
    
    This allows giving BSONObj and Queries to the robot memory's function as
    well as simple strings in the JSON format.

http://git.fawkesrobotics.org/fawkes.git/commit/cdecfb0
http://trac.fawkesrobotics.org/changeset/cdecfb0

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 9cf08148999af9ae0f74eb3a719fa56d1e4c7864
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Mon Aug 29 20:27:26 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:04 2016 +0200

    clips-robot-memory: start for CLIPS feature from refbox clips-mongodb

http://git.fawkesrobotics.org/fawkes.git/commit/9cf0814
http://trac.fawkesrobotics.org/changeset/9cf0814

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit b9f7287e9839760b67c07f4365d0034c34276a5c
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Thu Sep 1 15:00:10 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:04 2016 +0200

    robot-memory: add upsert option in update function
    
    When executing an update, the upsert option defines if the document
    should be inserted if it is not already in the database.

http://git.fawkesrobotics.org/fawkes.git/commit/b9f7287
http://trac.fawkesrobotics.org/changeset/b9f7287

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 3af7d94677205381ecd336b048dc8c33c7dcf9a5
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Thu Sep 1 16:25:04 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:04 2016 +0200

    robot-memory: removed setting type in document for testing

http://git.fawkesrobotics.org/fawkes.git/commit/3af7d94
http://trac.fawkesrobotics.org/changeset/3af7d94

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit de73a7db12983440d1d4de7f5103f13660f4b24f
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Thu Sep 1 17:42:09 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:04 2016 +0200

    clips-robot-memory: adjusted plugin to use the robot memory

http://git.fawkesrobotics.org/fawkes.git/commit/de73a7d
http://trac.fawkesrobotics.org/changeset/de73a7d

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit c0357cb0cb7d0e11834b83ccdd3edfb6f1f3ac5a
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Tue Sep 13 18:01:15 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:04 2016 +0200

    clips-robot-memory: function to create BSON doc from structured fact

http://git.fawkesrobotics.org/fawkes.git/commit/c0357cb
http://trac.fawkesrobotics.org/changeset/c0357cb

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 54478d8068bd92d09e339929974a5ce260b54089
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Tue Sep 13 18:19:27 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:04 2016 +0200

    clips-robot-memory: create BSON document from ordered fact

http://git.fawkesrobotics.org/fawkes.git/commit/54478d8
http://trac.fawkesrobotics.org/changeset/54478d8

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 69195c38a75ac601772b9cabd4dad09040d421eb
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Tue Sep 13 19:15:24 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Wed Sep 21 19:57:04 2016 +0200

    clips-robot-memory: assert facts from bson document

http://git.fawkesrobotics.org/fawkes.git/commit/69195c3
http://trac.fawkesrobotics.org/changeset/69195c3

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


- *Summary* -----------------------------------------------------------
 cfg/conf.d/gazsim.yaml                             |    9 +-
 cfg/conf.d/joystick.yaml                           |   57 +-
 cfg/conf.d/navgraph.yaml                           |   30 +-
 cfg/conf.d/robotino.yaml                           |  115 ++-
 cfg/conf.d/ros.yaml                                |    4 +
 cfg/conf.d/skiller.yaml                            |   37 +-
 cfg/firevision/fields/msl2007.field                |   25 -
 cfg/firevision/fields/rwth-foyer-half.field        |   12 -
 cfg/firevision/fields/rwth-foyer.field             |   17 -
 cfg/modules.d/80_readylogagent.yaml                |   10 -
 etc/bash/fawkes_completion.bash                    |   84 ++
 etc/buildsys/boost.mk                              |   16 +-
 etc/buildsys/btypes/config_sysinstall.mk           |   15 +-
 etc/buildsys/btypes/rules_sysinstall.mk            |   57 +-
 etc/buildsys/gcc.mk                                |    8 +-
 etc/buildsys/lua.mk                                |    4 +-
 src/libs/baseapp/init_options.cpp                  |   24 +-
 src/libs/baseapp/run.cpp                           |   68 +-
 src/libs/blackboard/Makefile                       |   22 +-
 src/libs/blackboard/blackboard.tolua               |   65 ++
 src/libs/blackboard/exceptions.h                   |   13 +-
 src/libs/blackboard/internal/interface_manager.cpp |   19 +-
 src/libs/blackboard/ownership.cpp                  |    6 +
 src/libs/config/config.cpp                         |    4 +-
 src/libs/config/net_handler.h                      |    4 +-
 src/libs/config/netconf.cpp                        |   14 +-
 src/libs/core/threading/thread.cpp                 |    2 +
 src/libs/core/threading/thread_list.cpp            |   18 +-
 src/libs/fvutils/ipc/shm_image.cpp                 |    7 +
 src/libs/fvwidgets/image_widget.cpp                |    5 -
 src/libs/gui_utils/plugin_tree_view.cpp            |   20 -
 src/libs/interface/interface.cpp                   |   17 +-
 src/libs/interface/interface.tolua                 |   24 +-
 src/libs/interface/message.tolua                   |    4 +-
 src/libs/interfaces/BatteryInterface.tolua         |   51 +-
 src/libs/interfaces/CameraControlInterface.tolua   |   68 ++-
 src/libs/interfaces/EclipseDebuggerInterface.tolua |   34 +-
 src/libs/interfaces/FacerInterface.tolua           |  136 +++-
 .../interfaces/FacialExpressionInterface.tolua     |   85 ++-
 src/libs/interfaces/GameStateInterface.tolua       |   68 ++-
 src/libs/interfaces/GripperInterface.tolua         |   51 +-
 src/libs/interfaces/HumanSkeletonInterface.tolua   |   17 +-
 src/libs/interfaces/HumanoidMotionInterface.tolua  |  204 +++++-
 src/libs/interfaces/IMUInterface.tolua             |   17 +-
 src/libs/interfaces/JointInterface.tolua           |   17 +-
 src/libs/interfaces/JoystickInterface.tolua        |   68 ++-
 src/libs/interfaces/KeyValueInterface.tolua        |   17 +-
 src/libs/interfaces/KickerInterface.tolua          |   68 ++-
 src/libs/interfaces/Laser1080Interface.tolua       |   17 +-
 src/libs/interfaces/Laser360Interface.tolua        |   17 +-
 src/libs/interfaces/Laser720Interface.tolua        |   17 +-
 src/libs/interfaces/LedInterface.tolua             |   68 ++-
 src/libs/interfaces/LocalizationInterface.tolua    |   34 +-
 src/libs/interfaces/MotorInterface.tolua           |  204 +++++-
 src/libs/interfaces/NavPathInterface.tolua         |   17 +-
 src/libs/interfaces/NavigatorInterface.tolua       |  289 ++++++-
 src/libs/interfaces/ObjectPositionInterface.tolua  |   17 +-
 src/libs/interfaces/Position2DTrackInterface.tolua |   17 +-
 src/libs/interfaces/Position3DInterface.tolua      |   17 +-
 src/libs/interfaces/SkillerInterface.tolua         |  102 ++-
 src/libs/interfaces/SoccerPenaltyInterface.tolua   |   34 +-
 .../interfaces/SpeechRecognitionInterface.tolua    |   51 +-
 src/libs/interfaces/SpeechSynthInterface.tolua     |   34 +-
 src/libs/interfaces/SwitchInterface.tolua          |   85 ++-
 src/libs/interfaces/TestInterface.tolua            |   68 ++-
 src/libs/interfaces/TransformInterface.tolua       |   17 +-
 src/libs/interfaces/VisualDisplay2DInterface.tolua |  119 +++-
 src/libs/interfaces/generator/tolua_generator.cpp  |   58 ++-
 src/libs/interfaces/generator/tolua_generator.h    |    2 +
 src/libs/kdl_parser/Makefile                       |    7 +-
 src/libs/logging/component.cpp                     |   19 +
 src/libs/logging/component.h                       |    2 +
 src/libs/lua/context.cpp                           |  211 ++++-
 src/libs/lua/context.h                             |   17 +-
 src/libs/plugin/manager.cpp                        |   84 +-
 src/libs/plugin/net/handler.cpp                    |    4 +-
 src/libs/protobuf_clips/communicator.cpp           |   31 +-
 src/libs/protobuf_clips/communicator.h             |    2 -
 src/libs/tf/time_cache.cpp                         |   10 +-
 src/libs/utils/math/angle.h                        |   16 +-
 src/libs/utils/system/dynamic_module/module.cpp    |    4 +-
 src/libs/utils/system/fam.cpp                      |    8 +-
 src/libs/utils/time/tracker.cpp                    |   20 +
 src/libs/utils/time/tracker.h                      |   11 +
 src/libs/utils/time/tracker_macros.h               |    4 +
 src/lua/fawkes/fsm/jumpstate.lua                   |   12 +-
 src/lua/fawkes/interface_initializer.lua           |  109 ++-
 src/lua/fawkes/laser-lines_utils.lua               |    9 +
 src/lua/fawkes/mathext.lua                         |    8 +-
 src/lua/fawkes/tfutils.lua                         |   98 ++-
 src/lua/fawkes/toluaext.lua                        |   42 +
 src/lua/skiller/fawkes/init.lua                    |  280 ++++++
 src/lua/skiller/fawkes/start.lua                   |   20 +-
 src/lua/skiller/skillenv.lua                       |  151 ++--
 src/lua/skills/generic/advanced/katana_grab.lua    |    2 +-
 .../skills/generic/advanced/katana_grab_any.lua    |    2 +-
 src/lua/skills/generic/advanced/katana_put.lua     |    2 +-
 src/lua/skills/generic/align_at_table.lua          |   18 +-
 src/lua/skills/generic/goto.lua                    |    4 +-
 src/lua/skills/generic/jaco.lua                    |    6 +-
 src/lua/skills/generic/jaco_bimanual.lua           |    2 +-
 src/lua/skills/generic/katana.lua                  |    2 +-
 src/lua/skills/generic/katana_approach.lua         |    2 +-
 src/lua/skills/generic/katana_rel.lua              |    2 +-
 src/lua/skills/generic/ppgoto.lua                  |    2 +-
 src/lua/skills/generic/relgoto.lua                 |    2 +-
 src/lua/skills/generic/say.lua                     |    2 +-
 src/lua/skills/generic/transrot.lua                |    2 +-
 src/lua/skills/generic/turn.lua                    |    2 +-
 src/lua/skills/nao/getup.lua                       |    2 +-
 src/lua/skills/nao/led.lua                         |    4 +-
 src/lua/skills/nao/naorelgoto.lua                  |    4 +-
 src/lua/skills/nao/naostrafe.lua                   |    2 +-
 src/lua/skills/nao/park.lua                        |    4 +-
 src/lua/skills/nao/servo.lua                       |    6 +-
 src/lua/skills/nao/soccer/kick.lua                 |    2 +-
 src/lua/skills/nao/standup.lua                     |    2 +-
 src/lua/skills/nao/stop.lua                        |    2 +-
 src/lua/skills/nao/walk.lua                        |    2 +-
 src/plugins/amcl/map/map_cspace.cpp                |   13 +-
 src/plugins/amcl/map_lasergen_thread.cpp           |    8 +-
 src/plugins/bblogger/bblogreplay_plugin.cpp        |    4 +
 .../interfaces/OpenCVStereoParamsInterface.tolua   |  204 +++++-
 src/plugins/clips-agent/Makefile                   |    6 +
 src/plugins/clips-navgraph/Makefile                |    6 +
 src/plugins/clips-protobuf/Makefile                |    6 +
 src/plugins/clips-ros/Makefile                     |    6 +
 src/plugins/clips/Makefile                         |    8 +-
 src/plugins/clips/feature_blackboard.cpp           |   11 +
 src/plugins/clips/feature_config.cpp               |    5 +
 .../colli/drive_modes/forward_omni_drive_mode.cpp  |    4 +-
 src/plugins/colli/search/obstacle.h                |   10 +-
 src/plugins/colli/search/og_laser.cpp              |    4 +-
 src/plugins/colli/utils/rob/roboshape.cpp          |   18 +-
 .../interfaces/DynamixelServoInterface.tolua       |  340 +++++++-
 src/plugins/gazebo/Makefile                        |    3 +-
 src/plugins/gazebo/gazebo.mk                       |    9 +
 src/plugins/gazebo/gazsim-depthcam/Makefile        |   71 ++
 .../gazsim-depthcam/gazsim_depthcam_plugin.cpp     |   48 +
 .../gazsim-depthcam/gazsim_depthcam_thread.cpp     |  105 +++
 .../gazsim-depthcam/gazsim_depthcam_thread.h       |   80 ++
 .../gazsim-localization/gazebo-plugin/Makefile     |    2 +
 .../gazsim-robotino/gazebo-plugin-gyro/Makefile    |    2 +
 .../gazsim-robotino/gazebo-plugin-motor/Makefile   |    2 +
 .../gazsim_vis_localization_thread.cpp             |    4 +-
 src/plugins/jaco/bimanual_goto_thread.cpp          |    4 +-
 src/plugins/jaco/goto_thread.cpp                   |   14 +-
 .../jaco/interfaces/JacoBimanualInterface.tolua    |   85 ++-
 src/plugins/jaco/interfaces/JacoInterface.tolua    |  170 ++++-
 src/plugins/joystick/Makefile                      |    6 +-
 src/plugins/joystick/acquisition_thread.cpp        |  308 ++++---
 src/plugins/joystick/acquisition_thread.h          |   56 +-
 src/plugins/joystick/joystick_teleop_thread.cpp    |  112 +++-
 src/plugins/joystick/joystick_teleop_thread.h      |   10 +-
 .../katana/interfaces/KatanaInterface.tolua        |  289 ++++++-
 .../interfaces/LaserClusterInterface.tolua         |   51 +-
 src/plugins/laser-cluster/laser-cluster-plugin.cpp |    4 +
 src/plugins/laser-filter/filter_thread.cpp         |  113 ++-
 src/plugins/laser-filter/filter_thread.h           |    9 +-
 src/plugins/laser-filter/filters/1080to360.cpp     |   10 +-
 src/plugins/laser-filter/filters/1080to360.h       |    5 +-
 src/plugins/laser-filter/filters/720to360.cpp      |   10 +-
 src/plugins/laser-filter/filters/720to360.h        |    3 +-
 src/plugins/laser-filter/filters/cascade.cpp       |    8 +-
 src/plugins/laser-filter/filters/cascade.h         |    3 +-
 src/plugins/laser-filter/filters/circle_sector.cpp |   12 +-
 src/plugins/laser-filter/filters/circle_sector.h   |    5 +-
 src/plugins/laser-filter/filters/deadspots.cpp     |   14 +-
 src/plugins/laser-filter/filters/deadspots.h       |    7 +-
 src/plugins/laser-filter/filters/filter.cpp        |   16 +-
 src/plugins/laser-filter/filters/filter.h          |    5 +-
 src/plugins/laser-filter/filters/map_filter.cpp    |   14 +-
 src/plugins/laser-filter/filters/map_filter.h      |   11 +-
 src/plugins/laser-filter/filters/max_circle.cpp    |   10 +-
 src/plugins/laser-filter/filters/max_circle.h      |    4 +-
 src/plugins/laser-filter/filters/min_circle.cpp    |   10 +-
 src/plugins/laser-filter/filters/min_circle.h      |    4 +-
 src/plugins/laser-filter/filters/min_merge.cpp     |   82 ++-
 src/plugins/laser-filter/filters/min_merge.h       |   26 +-
 src/plugins/laser-filter/filters/projection.cpp    |    4 +-
 src/plugins/laser-filter/filters/projection.h      |    3 +-
 src/plugins/laser-filter/filters/reverse_angle.cpp |    8 +-
 src/plugins/laser-filter/filters/reverse_angle.h   |    3 +-
 src/plugins/laser-filter/laser_filter_plugin.cpp   |   12 +
 src/plugins/laser-lines/Makefile                   |    2 +-
 .../interfaces/LaserLineInterface.tolua            |   17 +-
 src/plugins/laser-lines/laser-lines-thread.cpp     |  518 ++++++-----
 src/plugins/laser-lines/laser-lines-thread.h       |   26 +-
 src/plugins/laser-lines/line_info.cpp              |  140 +++
 src/plugins/laser-lines/line_info.h                |   33 +
 src/plugins/laser/acquisition_thread.cpp           |    5 +-
 src/plugins/laser/laser_plugin.cpp                 |    4 +
 src/plugins/laser/urg_aqt.cpp                      |    4 +
 src/plugins/laser/urg_gbx_aqt.cpp                  |    8 +
 src/plugins/mongodb/mongodb.mk                     |    4 +
 src/plugins/mongodb_log/tools/Makefile             |    4 +
 .../mongodb_log/tools/ffmongodb_save_imgs.cpp      |    3 +-
 .../nao/interfaces/NaoJointPositionInterface.tolua |   85 ++-
 .../interfaces/NaoJointStiffnessInterface.tolua    |   68 ++-
 .../nao/interfaces/NaoSensorInterface.tolua        |   68 ++-
 .../interfaces/NavGraphGeneratorInterface.cpp      |  194 ++--
 .../interfaces/NavGraphGeneratorInterface.h_ext    |   60 +-
 .../interfaces/NavGraphGeneratorInterface.tolua    |  320 ++++++-
 .../interfaces/NavGraphGeneratorInterface.xml      |   12 +-
 .../navgraph_generator_thread.cpp                  |   18 +-
 src/plugins/navgraph/Makefile                      |   36 +-
 src/plugins/navgraph/navgraph_plugin.cpp           |   12 +
 src/plugins/navgraph/navgraph_thread.cpp           |    4 +-
 src/plugins/navgraph/rospub_thread.cpp             |  129 +++
 src/plugins/navgraph/rospub_thread.h               |   66 ++
 src/plugins/navgraph/visualization_thread.cpp      |   63 +-
 src/plugins/openni/depth_thread.cpp                |    8 +-
 src/plugins/openni/handtracker_thread.cpp          |   19 +-
 src/plugins/openni/image_thread.cpp                |    8 +-
 .../HumanSkeletonProjectionInterface.tolua         |   17 +-
 src/plugins/openni/pointcloud_thread.cpp           |   14 +-
 src/plugins/openprs-agent/Makefile                 |   10 +
 src/plugins/openprs/Makefile                       |   12 +-
 .../openrave/interfaces/OpenRaveInterface.tolua    |  204 +++++-
 .../pantilt/interfaces/PanTiltInterface.tolua      |  170 ++++-
 src/plugins/perception/pcl-db/Makefile             |   11 +-
 .../interfaces/PclDatabaseMergeInterface.tolua     |   34 +-
 .../interfaces/PclDatabaseRetrieveInterface.tolua  |   34 +-
 .../interfaces/PclDatabaseStoreInterface.tolua     |   34 +-
 .../perception/pcl-db/mongodb_tf_transformer.cpp   |    4 +
 src/plugins/perception/pcl-db/pcl_db_pipeline.h    |    8 +
 src/plugins/robotino/Makefile                      |   85 ++-
 src/plugins/robotino/act_thread.cpp                |  680 +++++++-------
 src/plugins/robotino/act_thread.h                  |  156 ++--
 src/plugins/robotino/com_thread.cpp                |  863 +++++++------------
 src/plugins/robotino/com_thread.h                  |  225 +++---
 src/plugins/robotino/direct_com_message.cpp        |  900 ++++++++++++++++++
 src/plugins/robotino/direct_com_message.h          |  232 +++++
 src/plugins/robotino/direct_com_thread.cpp         |  951 ++++++++++++++++++++
 src/plugins/robotino/direct_com_thread.h           |  136 +++
 .../interfaces/RobotinoSensorInterface.cpp         |  204 +++++-
 .../interfaces/RobotinoSensorInterface.h_ext       |   43 +-
 .../interfaces/RobotinoSensorInterface.tolua       |   68 ++-
 .../interfaces/RobotinoSensorInterface.xml         |   13 +-
 src/plugins/robotino/openrobotino_com_thread.cpp   |  545 +++++++++++
 src/plugins/robotino/openrobotino_com_thread.h     |  149 +++
 src/plugins/robotino/robotino.mk                   |   22 +
 src/plugins/robotino/robotino_plugin.cpp           |   49 +-
 src/plugins/robotino/sensor_thread.cpp             |  137 +++-
 src/plugins/robotino/sensor_thread.h               |   44 +-
 src/plugins/roomba/Roomba500Interface.tolua        |  119 +++-
 src/plugins/ros/Makefile                           |   13 +-
 src/plugins/ros/pcl_thread.cpp                     |  217 +++++-
 src/plugins/ros/pcl_thread.h                       |   36 +-
 src/plugins/ros/skiller_thread.cpp                 |   15 +-
 src/plugins/ros/skiller_thread.h                   |    4 +-
 src/plugins/ros/webview_reqproc.cpp                |   12 +-
 src/plugins/ros/webview_thread.cpp                 |   36 +-
 src/plugins/ros/webview_thread.h                   |   20 +-
 src/plugins/skiller/SkillerDebugInterface.tolua    |   68 ++-
 src/plugins/skiller/exec_thread.cpp                |  503 +----------
 src/plugins/skiller/exec_thread.h                  |   43 +-
 src/tools/eclipse_debugger/Makefile                |    8 +-
 src/tools/lasergui/Makefile                        |   16 +-
 src/tools/lasergui/fflasergui.txt                  |   38 +
 src/tools/lasergui/lasergui.txt                    |   38 -
 src/tools/lasergui/lasergui_hildon.cpp             |    4 +
 src/tools/netloggui/main.cpp                       |    6 -
 src/tools/plugin_generator/Makefile                |   44 +
 src/tools/plugin_generator/ffgenplugin.txt         |   63 ++
 src/tools/plugin_generator/main.cpp                |   96 ++
 src/tools/plugin_generator/plugin_generator.cpp    |  397 ++++++++
 src/tools/plugin_generator/plugin_generator.h      |   70 ++
 src/tools/plugin_gui/main.cpp                      |   10 -
 src/tools/skillgui/skillgui.cpp                    |    9 +-
 src/tools/vision/firestation/main.cpp              |    6 -
 src/tools/vision/fuse_viewer/main.cpp              |    9 -
 src/tools/vision/yuv_viewer/main.cpp               |    9 -
 273 files changed, 13406 insertions(+), 3276 deletions(-)
 delete mode 100644 cfg/firevision/fields/msl2007.field
 delete mode 100644 cfg/firevision/fields/rwth-foyer-half.field
 delete mode 100644 cfg/firevision/fields/rwth-foyer.field
 delete mode 100644 cfg/modules.d/80_readylogagent.yaml
 create mode 100644 etc/bash/fawkes_completion.bash
 create mode 100644 src/libs/blackboard/blackboard.tolua
 create mode 100644 src/lua/fawkes/toluaext.lua
 create mode 100644 src/lua/skiller/fawkes/init.lua
 create mode 100644 src/plugins/gazebo/gazsim-depthcam/Makefile
 create mode 100644 src/plugins/gazebo/gazsim-depthcam/gazsim_depthcam_plugin.cpp
 create mode 100644 src/plugins/gazebo/gazsim-depthcam/gazsim_depthcam_thread.cpp
 create mode 100644 src/plugins/gazebo/gazsim-depthcam/gazsim_depthcam_thread.h
 create mode 100644 src/plugins/laser-lines/line_info.cpp
 create mode 100644 src/plugins/navgraph/rospub_thread.cpp
 create mode 100644 src/plugins/navgraph/rospub_thread.h
 create mode 100644 src/plugins/robotino/direct_com_message.cpp
 create mode 100644 src/plugins/robotino/direct_com_message.h
 create mode 100644 src/plugins/robotino/direct_com_thread.cpp
 create mode 100644 src/plugins/robotino/direct_com_thread.h
 create mode 100644 src/plugins/robotino/openrobotino_com_thread.cpp
 create mode 100644 src/plugins/robotino/openrobotino_com_thread.h
 create mode 100644 src/tools/lasergui/fflasergui.txt
 delete mode 100644 src/tools/lasergui/lasergui.txt
 create mode 100644 src/tools/plugin_generator/Makefile
 create mode 100644 src/tools/plugin_generator/ffgenplugin.txt
 create mode 100644 src/tools/plugin_generator/main.cpp
 create mode 100644 src/tools/plugin_generator/plugin_generator.cpp
 create mode 100644 src/tools/plugin_generator/plugin_generator.h


- *Diffs* -------------------------------------------------------------

- *commit* 8806eb005879a2e879217f00cad88fb8f7cdaa15 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Sun May 1 20:14:11 2016 +0200
Subject: robot-memory: skeleton for experimental plugin

 src/plugins/Makefile                               |    2 +-
 src/plugins/{mongodb_log => robot-memory}/Makefile |   32 +++----
 .../robot_memory_plugin.cpp}                       |   33 ++++---
 src/plugins/robot-memory/robot_memory_thread.cpp   |  105 ++++++++++++++++++++
 .../robot_memory_thread.h}                         |   32 +++---
 5 files changed, 152 insertions(+), 52 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/Makefile b/src/plugins/Makefile
index caee20b..bfad9d7 100644
--- a/src/plugins/Makefile
+++ b/src/plugins/Makefile
@@ -26,7 +26,7 @@ SUBDIRS	= bbsync bblogger webview ttmainloop rrd rrdweb \
 	  static_transforms navgraph navgraph-clusters navgraph-generator colli \
 	  clips clips-agent clips-protobuf clips-webview clips-navgraph clips-ros \
 	  clips-tf openprs openprs-agent eclipse-clp \
-	  mongodb mongodb_log \
+	  mongodb mongodb_log robot-memory\
 	  openni refboxcomm ros player xmlrpc gossip \
 	  robot_state_publisher gazebo dynamixel navgraph-interactive
 

- *commit* 7138569cfccbbf9efc8ee18131cdf03c21f410da - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Sun May 1 22:33:08 2016 +0200
Subject: robot-memory: execute queries from interface msg

 src/plugins/robot-memory/Makefile                  |    4 +-
 .../{pantilt => robot-memory}/interfaces/Makefile  |    6 +-
 .../interfaces/RobotMemoryInterface.cpp            |  271 ++++++++++++++++++++
 .../interfaces/RobotMemoryInterface.h_ext}         |   53 ++--
 .../interfaces/RobotMemoryInterface.tolua}         |   32 ++-
 .../interfaces/RobotMemoryInterface.xml            |   20 ++
 src/plugins/robot-memory/robot_memory_thread.cpp   |   60 +++++-
 src/plugins/robot-memory/robot_memory_thread.h     |    7 +
 8 files changed, 410 insertions(+), 43 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/robot-memory/Makefile b/src/plugins/robot-memory/Makefile
index d24702f..78fe64a 100644
--- a/src/plugins/robot-memory/Makefile
+++ b/src/plugins/robot-memory/Makefile
@@ -19,9 +19,11 @@ include $(BASEDIR)/etc/buildsys/config.mk
 include $(BUILDCONFDIR)/tf/tf.mk
 include $(BASEDIR)/src/plugins/mongodb/mongodb.mk
 
+PRESUBDIRS = interfaces
+
 LIBS_robot_memory = fawkescore fawkesaspects fawkesblackboard fawkesinterface \
 		fawkesutils fawkeslogging fawkesmongodbaspect fvutils \
-		fawkestf
+		fawkestf RobotMemoryInterface
 OBJS_robot_memory = $(patsubst %.cpp,%.o,$(patsubst qa/%,,$(subst $(SRCDIR)/,,$(realpath $(wildcard $(SRCDIR)/*.cpp)))))
 
 CFLAGS  += $(CFLAGS_MONGODB)
diff --git a/src/plugins/robot-memory/robot_memory_thread.cpp b/src/plugins/robot-memory/robot_memory_thread.cpp
index be08e53..2c35769 100644
--- a/src/plugins/robot-memory/robot_memory_thread.cpp
+++ b/src/plugins/robot-memory/robot_memory_thread.cpp
@@ -21,6 +21,10 @@
  */
 
 #include "robot_memory_thread.h"
+#include "interfaces/RobotMemoryInterface.h"
+#include <core/threading/mutex.h>
+#include <core/threading/mutex_locker.h>
+#include <memory>
 
 // from MongoDB
 #include <mongo/client/dbclient.h>
@@ -35,24 +39,34 @@ using namespace fawkes;
 
 /** Constructor. */
 RobotMemoryThread::RobotMemoryThread()
-  : Thread("RobotMemoryThread", Thread::OPMODE_WAITFORWAKEUP)
+	: Thread("RobotMemoryThread", Thread::OPMODE_WAITFORWAKEUP),
+	  BlockedTimingAspect(BlockedTimingAspect::WAKEUP_HOOK_WORLDSTATE)
 {
+  __mutex = new Mutex();
 }
 
 
 /** Destructor. */
 RobotMemoryThread::~RobotMemoryThread()
 {
+  delete __mutex;
 }
 
 
 void
 RobotMemoryThread::init()
 {
+	logger->log_info(name(), "Started RobotMemory");
 	__collection = "fawkes.msglog";
   try {
     __collection = config->get_string("/plugins/mongodb/logger_collection");
   } catch (Exception &e) {}
+
+  __rm_if = blackboard->open_for_writing<RobotMemoryInterface>(config->get_string("/plugins/robot-memory/interface-name").c_str());
+  __rm_if->set_error("");
+  __rm_if->set_result("");
+  
+  __rm_if->write();
 }
 
 
@@ -65,8 +79,52 @@ RobotMemoryThread::finalize()
 void
 RobotMemoryThread::loop()
 {
+	// process interface messages
+  while (! __rm_if->msgq_empty() ) {
+    if (__rm_if->msgq_first_is<RobotMemoryInterface::QueryMessage>()) {
+	    RobotMemoryInterface::QueryMessage* query = (RobotMemoryInterface::QueryMessage*) __rm_if->msgq_first();
+	    exec_query(query->query());
+    } else {
+      logger->log_warn(name(), "Unknown message received");
+    }
+
+    __rm_if->msgq_pop();
+  }
 }
 
+void RobotMemoryThread::exec_query(std::string query_string)
+{
+	logger->log_info(name(), "Executing Query: %s", query_string.c_str());
+
+	//only one query at a time
+	MutexLocker lock(__mutex);
+
+	//get query from string
+	Query query;
+	try{
+	  query = Query(query_string);
+	} catch (DBException &e) {
+		logger->log_error(name(), "Can't parse query_string '%s'\n Exception: %s",
+		                  query_string.c_str(), e.toString().c_str());
+		__rm_if->set_error((std::string("Can't parse query_string ") +  query_string
+		                    + "\nException: " + e.toString()).c_str());
+		return;
+	}
+
+	//actually execute query
+	std::unique_ptr<DBClientCursor> cursor;
+	try{
+	  cursor = mongodb_client->query(__collection, query);
+	} catch (DBException &e) {
+		logger->log_error(name(), "Error for query %s\n Exception: %s",
+		                  query_string.c_str(), e.toString().c_str());
+		__rm_if->set_error((std::string("Query error for ") +  query_string
+		                    + "\nException: " + e.toString()).c_str());
+		return;
+	}
+
+	logger->log_info(name(), "Query One result:\n%s", cursor->next().toString().c_str());
+}
 
 // void
 // RobotMemoryThread::insert_message(LogLevel ll, const char *component,
diff --git a/src/plugins/robot-memory/robot_memory_thread.h b/src/plugins/robot-memory/robot_memory_thread.h
index ca3ee06..004a454 100644
--- a/src/plugins/robot-memory/robot_memory_thread.h
+++ b/src/plugins/robot-memory/robot_memory_thread.h
@@ -29,11 +29,13 @@
 #include <aspect/clock.h>
 #include <plugins/mongodb/aspect/mongodb.h>
 #include <aspect/blackboard.h>
+#include <aspect/blocked_timing.h>
 
 #include <string>
 
 namespace fawkes {
   class Mutex;
+  class RobotMemoryInterface;
 }
 
 class RobotMemoryThread
@@ -42,6 +44,7 @@ class RobotMemoryThread
   public fawkes::ConfigurableAspect,
   public fawkes::ClockAspect,
   public fawkes::MongoDBAspect,
+	public fawkes::BlockedTimingAspect,
   public fawkes::BlackBoardAspect
 {
  public:
@@ -57,6 +60,10 @@ class RobotMemoryThread
 
  private:
   std::string    __collection;
+  fawkes::Mutex *__mutex;
+  fawkes::RobotMemoryInterface *__rm_if;
+
+  void exec_query(std::string query);
 };
 
 #endif

- *commit* caec699dd3e4fdc46781bc6104c4ca052f688009 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Sun May 1 23:38:09 2016 +0200
Subject: robot-memory: get info about parsed query

 src/plugins/robot-memory/robot_memory_thread.cpp |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/robot-memory/robot_memory_thread.cpp b/src/plugins/robot-memory/robot_memory_thread.cpp
index 2c35769..32facf8 100644
--- a/src/plugins/robot-memory/robot_memory_thread.cpp
+++ b/src/plugins/robot-memory/robot_memory_thread.cpp
@@ -108,9 +108,18 @@ void RobotMemoryThread::exec_query(std::string query_string)
 		                  query_string.c_str(), e.toString().c_str());
 		__rm_if->set_error((std::string("Can't parse query_string ") +  query_string
 		                    + "\nException: " + e.toString()).c_str());
+		__rm_if->write();
 		return;
 	}
 
+	//introspect query
+	logger->log_info(name(), "Filter: %s", query.getFilter().toString().c_str());
+	logger->log_info(name(), "Modifiers: %s", query.getModifiers().toString().c_str());
+	logger->log_info(name(), "Sort: %s", query.getSort().toString().c_str());
+	logger->log_info(name(), "Hint: %s", query.getHint().toString().c_str());
+	logger->log_info(name(), "ReadPref: %s", query.getReadPref().toString().c_str());
+
+	
 	//actually execute query
 	std::unique_ptr<DBClientCursor> cursor;
 	try{
@@ -120,10 +129,13 @@ void RobotMemoryThread::exec_query(std::string query_string)
 		                  query_string.c_str(), e.toString().c_str());
 		__rm_if->set_error((std::string("Query error for ") +  query_string
 		                    + "\nException: " + e.toString()).c_str());
+		__rm_if->write();
 		return;
 	}
 
 	logger->log_info(name(), "Query One result:\n%s", cursor->next().toString().c_str());
+	__rm_if->set_result(cursor->next().toString().c_str());
+	__rm_if->write();
 }
 
 // void

- *commit* 6bbf4ea6838a733dcf3f8e8c9603f0a9bbf265d6 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Mon May 9 17:50:45 2016 +0200
Subject: robot-memory: added insert, update, remove messages

 .../interfaces/RobotMemoryInterface.cpp            |  327 +++++++++++++++++++-
 .../interfaces/RobotMemoryInterface.h_ext          |   85 +++++
 .../interfaces/RobotMemoryInterface.tolua          |   87 ++++++
 .../interfaces/RobotMemoryInterface.xml            |   19 ++
 src/plugins/robot-memory/robot_memory_thread.cpp   |  219 ++++++++++---
 src/plugins/robot-memory/robot_memory_thread.h     |    7 +
 6 files changed, 696 insertions(+), 48 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/robot-memory/interfaces/RobotMemoryInterface.cpp b/src/plugins/robot-memory/interfaces/RobotMemoryInterface.cpp
index 40250f8..54650b9 100644
--- a/src/plugins/robot-memory/interfaces/RobotMemoryInterface.cpp
+++ b/src/plugins/robot-memory/interfaces/RobotMemoryInterface.cpp
@@ -53,7 +53,10 @@ RobotMemoryInterface::RobotMemoryInterface() : Interface()
   add_fieldinfo(IFT_STRING, "error", 1024, data->error);
   add_fieldinfo(IFT_STRING, "result", 1024, data->result);
   add_messageinfo("QueryMessage");
-  unsigned char tmp_hash[] = {0xb5, 0xf6, 0xa0, 0x13, 0xd1, 0x30, 0x84, 0x19, 0xb6, 0x98, 0x2c, 0x3d, 0x92, 0xa4, 0x7a, 0xf};
+  add_messageinfo("InsertMessage");
+  add_messageinfo("UpdateMessage");
+  add_messageinfo("RemoveMessage");
+  unsigned char tmp_hash[] = {0x61, 0x88, 0x21, 0xcd, 0x5a, 0x65, 0x18, 0x8d, 0x60, 0xaf, 0xf5, 0x57, 0x30, 0x4c, 0x6b, 0xd8};
   set_hash(tmp_hash);
 }
 
@@ -131,6 +134,12 @@ RobotMemoryInterface::create_message(const char *type) const
 {
   if ( strncmp("QueryMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
     return new QueryMessage();
+  } else if ( strncmp("InsertMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
+    return new InsertMessage();
+  } else if ( strncmp("UpdateMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
+    return new UpdateMessage();
+  } else if ( strncmp("RemoveMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
+    return new RemoveMessage();
   } else {
     throw UnknownTypeException("The given type '%s' does not match any known "
                                "message type for this interface type.", type);
@@ -249,6 +258,310 @@ RobotMemoryInterface::QueryMessage::clone() const
 {
   return new RobotMemoryInterface::QueryMessage(this);
 }
+/** @class RobotMemoryInterface::InsertMessage <interfaces/RobotMemoryInterface.h>
+ * InsertMessage Fawkes BlackBoard Interface Message.
+ * 
+    
+ */
+
+
+/** Constructor with initial values.
+ * @param ini_insert initial value for insert
+ */
+RobotMemoryInterface::InsertMessage::InsertMessage(const char * ini_insert) : Message("InsertMessage")
+{
+  data_size = sizeof(InsertMessage_data_t);
+  data_ptr  = malloc(data_size);
+  memset(data_ptr, 0, data_size);
+  data      = (InsertMessage_data_t *)data_ptr;
+  data_ts   = (message_data_ts_t *)data_ptr;
+  strncpy(data->insert, ini_insert, 1024);
+  add_fieldinfo(IFT_STRING, "insert", 1024, data->insert);
+}
+/** Constructor */
+RobotMemoryInterface::InsertMessage::InsertMessage() : Message("InsertMessage")
+{
+  data_size = sizeof(InsertMessage_data_t);
+  data_ptr  = malloc(data_size);
+  memset(data_ptr, 0, data_size);
+  data      = (InsertMessage_data_t *)data_ptr;
+  data_ts   = (message_data_ts_t *)data_ptr;
+  add_fieldinfo(IFT_STRING, "insert", 1024, data->insert);
+}
+
+/** Destructor */
+RobotMemoryInterface::InsertMessage::~InsertMessage()
+{
+  free(data_ptr);
+}
+
+/** Copy constructor.
+ * @param m message to copy from
+ */
+RobotMemoryInterface::InsertMessage::InsertMessage(const InsertMessage *m) : Message("InsertMessage")
+{
+  data_size = m->data_size;
+  data_ptr  = malloc(data_size);
+  memcpy(data_ptr, m->data_ptr, data_size);
+  data      = (InsertMessage_data_t *)data_ptr;
+  data_ts   = (message_data_ts_t *)data_ptr;
+}
+
+/* Methods */
+/** Get insert value.
+ * Document to insert as JSON string
+ * @return insert value
+ */
+char *
+RobotMemoryInterface::InsertMessage::insert() const
+{
+  return data->insert;
+}
+
+/** Get maximum length of insert value.
+ * @return length of insert value, can be length of the array or number of 
+ * maximum number of characters for a string
+ */
+size_t
+RobotMemoryInterface::InsertMessage::maxlenof_insert() const
+{
+  return 1024;
+}
+
+/** Set insert value.
+ * Document to insert as JSON string
+ * @param new_insert new insert value
+ */
+void
+RobotMemoryInterface::InsertMessage::set_insert(const char * new_insert)
+{
+  strncpy(data->insert, new_insert, sizeof(data->insert));
+}
+
+/** Clone this message.
+ * Produces a message of the same type as this message and copies the
+ * data to the new message.
+ * @return clone of this message
+ */
+Message *
+RobotMemoryInterface::InsertMessage::clone() const
+{
+  return new RobotMemoryInterface::InsertMessage(this);
+}
+/** @class RobotMemoryInterface::UpdateMessage <interfaces/RobotMemoryInterface.h>
+ * UpdateMessage Fawkes BlackBoard Interface Message.
+ * 
+    
+ */
+
+
+/** Constructor with initial values.
+ * @param ini_query initial value for query
+ * @param ini_update initial value for update
+ */
+RobotMemoryInterface::UpdateMessage::UpdateMessage(const char * ini_query, const char * ini_update) : Message("UpdateMessage")
+{
+  data_size = sizeof(UpdateMessage_data_t);
+  data_ptr  = malloc(data_size);
+  memset(data_ptr, 0, data_size);
+  data      = (UpdateMessage_data_t *)data_ptr;
+  data_ts   = (message_data_ts_t *)data_ptr;
+  strncpy(data->query, ini_query, 1024);
+  strncpy(data->update, ini_update, 1024);
+  add_fieldinfo(IFT_STRING, "query", 1024, data->query);
+  add_fieldinfo(IFT_STRING, "update", 1024, data->update);
+}
+/** Constructor */
+RobotMemoryInterface::UpdateMessage::UpdateMessage() : Message("UpdateMessage")
+{
+  data_size = sizeof(UpdateMessage_data_t);
+  data_ptr  = malloc(data_size);
+  memset(data_ptr, 0, data_size);
+  data      = (UpdateMessage_data_t *)data_ptr;
+  data_ts   = (message_data_ts_t *)data_ptr;
+  add_fieldinfo(IFT_STRING, "query", 1024, data->query);
+  add_fieldinfo(IFT_STRING, "update", 1024, data->update);
+}
+
+/** Destructor */
+RobotMemoryInterface::UpdateMessage::~UpdateMessage()
+{
+  free(data_ptr);
+}
+
+/** Copy constructor.
+ * @param m message to copy from
+ */
+RobotMemoryInterface::UpdateMessage::UpdateMessage(const UpdateMessage *m) : Message("UpdateMessage")
+{
+  data_size = m->data_size;
+  data_ptr  = malloc(data_size);
+  memcpy(data_ptr, m->data_ptr, data_size);
+  data      = (UpdateMessage_data_t *)data_ptr;
+  data_ts   = (message_data_ts_t *)data_ptr;
+}
+
+/* Methods */
+/** Get query value.
+ * Query as JSON string
+ * @return query value
+ */
+char *
+RobotMemoryInterface::UpdateMessage::query() const
+{
+  return data->query;
+}
+
+/** Get maximum length of query value.
+ * @return length of query value, can be length of the array or number of 
+ * maximum number of characters for a string
+ */
+size_t
+RobotMemoryInterface::UpdateMessage::maxlenof_query() const
+{
+  return 1024;
+}
+
+/** Set query value.
+ * Query as JSON string
+ * @param new_query new query value
+ */
+void
+RobotMemoryInterface::UpdateMessage::set_query(const char * new_query)
+{
+  strncpy(data->query, new_query, sizeof(data->query));
+}
+
+/** Get update value.
+ * Update as JSON string
+ * @return update value
+ */
+char *
+RobotMemoryInterface::UpdateMessage::update() const
+{
+  return data->update;
+}
+
+/** Get maximum length of update value.
+ * @return length of update value, can be length of the array or number of 
+ * maximum number of characters for a string
+ */
+size_t
+RobotMemoryInterface::UpdateMessage::maxlenof_update() const
+{
+  return 1024;
+}
+
+/** Set update value.
+ * Update as JSON string
+ * @param new_update new update value
+ */
+void
+RobotMemoryInterface::UpdateMessage::set_update(const char * new_update)
+{
+  strncpy(data->update, new_update, sizeof(data->update));
+}
+
+/** Clone this message.
+ * Produces a message of the same type as this message and copies the
+ * data to the new message.
+ * @return clone of this message
+ */
+Message *
+RobotMemoryInterface::UpdateMessage::clone() const
+{
+  return new RobotMemoryInterface::UpdateMessage(this);
+}
+/** @class RobotMemoryInterface::RemoveMessage <interfaces/RobotMemoryInterface.h>
+ * RemoveMessage Fawkes BlackBoard Interface Message.
+ * 
+    
+ */
+
+
+/** Constructor with initial values.
+ * @param ini_query initial value for query
+ */
+RobotMemoryInterface::RemoveMessage::RemoveMessage(const char * ini_query) : Message("RemoveMessage")
+{
+  data_size = sizeof(RemoveMessage_data_t);
+  data_ptr  = malloc(data_size);
+  memset(data_ptr, 0, data_size);
+  data      = (RemoveMessage_data_t *)data_ptr;
+  data_ts   = (message_data_ts_t *)data_ptr;
+  strncpy(data->query, ini_query, 1024);
+  add_fieldinfo(IFT_STRING, "query", 1024, data->query);
+}
+/** Constructor */
+RobotMemoryInterface::RemoveMessage::RemoveMessage() : Message("RemoveMessage")
+{
+  data_size = sizeof(RemoveMessage_data_t);
+  data_ptr  = malloc(data_size);
+  memset(data_ptr, 0, data_size);
+  data      = (RemoveMessage_data_t *)data_ptr;
+  data_ts   = (message_data_ts_t *)data_ptr;
+  add_fieldinfo(IFT_STRING, "query", 1024, data->query);
+}
+
+/** Destructor */
+RobotMemoryInterface::RemoveMessage::~RemoveMessage()
+{
+  free(data_ptr);
+}
+
+/** Copy constructor.
+ * @param m message to copy from
+ */
+RobotMemoryInterface::RemoveMessage::RemoveMessage(const RemoveMessage *m) : Message("RemoveMessage")
+{
+  data_size = m->data_size;
+  data_ptr  = malloc(data_size);
+  memcpy(data_ptr, m->data_ptr, data_size);
+  data      = (RemoveMessage_data_t *)data_ptr;
+  data_ts   = (message_data_ts_t *)data_ptr;
+}
+
+/* Methods */
+/** Get query value.
+ * Query as JSON string
+ * @return query value
+ */
+char *
+RobotMemoryInterface::RemoveMessage::query() const
+{
+  return data->query;
+}
+
+/** Get maximum length of query value.
+ * @return length of query value, can be length of the array or number of 
+ * maximum number of characters for a string
+ */
+size_t
+RobotMemoryInterface::RemoveMessage::maxlenof_query() const
+{
+  return 1024;
+}
+
+/** Set query value.
+ * Query as JSON string
+ * @param new_query new query value
+ */
+void
+RobotMemoryInterface::RemoveMessage::set_query(const char * new_query)
+{
+  strncpy(data->query, new_query, sizeof(data->query));
+}
+
+/** Clone this message.
+ * Produces a message of the same type as this message and copies the
+ * data to the new message.
+ * @return clone of this message
+ */
+Message *
+RobotMemoryInterface::RemoveMessage::clone() const
+{
+  return new RobotMemoryInterface::RemoveMessage(this);
+}
 /** Check if message is valid and can be enqueued.
  * @param message Message to check
  * @return true if the message is valid, false otherwise.
@@ -260,6 +573,18 @@ RobotMemoryInterface::message_valid(const Message *message) const
   if ( m0 != NULL ) {
     return true;
   }
+  const InsertMessage *m1 = dynamic_cast<const InsertMessage *>(message);
+  if ( m1 != NULL ) {
+    return true;
+  }
+  const UpdateMessage *m2 = dynamic_cast<const UpdateMessage *>(message);
+  if ( m2 != NULL ) {
+    return true;
+  }
+  const RemoveMessage *m3 = dynamic_cast<const RemoveMessage *>(message);
+  if ( m3 != NULL ) {
+    return true;
+  }
   return false;
 }
 
diff --git a/src/plugins/robot-memory/interfaces/RobotMemoryInterface.h_ext b/src/plugins/robot-memory/interfaces/RobotMemoryInterface.h_ext
index e0abd1a..ddd2d0b 100644
--- a/src/plugins/robot-memory/interfaces/RobotMemoryInterface.h_ext
+++ b/src/plugins/robot-memory/interfaces/RobotMemoryInterface.h_ext
@@ -80,6 +80,91 @@ class RobotMemoryInterface : public Interface
     virtual Message * clone() const;
   };
 
+  class InsertMessage : public Message
+  {
+   private:
+#pragma pack(push,4)
+    /** Internal data storage, do NOT modify! */
+    typedef struct {
+      int64_t timestamp_sec;  /**< Interface Unix timestamp, seconds */
+      int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
+      char insert[1024]; /**< Document to insert as JSON string */
+    } InsertMessage_data_t;
+#pragma pack(pop)
+
+    InsertMessage_data_t *data;
+
+   public:
+    InsertMessage(const char * ini_insert);
+    InsertMessage();
+    ~InsertMessage();
+
+    InsertMessage(const InsertMessage *m);
+    /* Methods */
+    char * insert() const;
+    void set_insert(const char * new_insert);
+    size_t maxlenof_insert() const;
+    virtual Message * clone() const;
+  };
+
+  class UpdateMessage : public Message
+  {
+   private:
+#pragma pack(push,4)
+    /** Internal data storage, do NOT modify! */
+    typedef struct {
+      int64_t timestamp_sec;  /**< Interface Unix timestamp, seconds */
+      int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
+      char query[1024]; /**< Query as JSON string */
+      char update[1024]; /**< Update as JSON string */
+    } UpdateMessage_data_t;
+#pragma pack(pop)
+
+    UpdateMessage_data_t *data;
+
+   public:
+    UpdateMessage(const char * ini_query, const char * ini_update);
+    UpdateMessage();
+    ~UpdateMessage();
+
+    UpdateMessage(const UpdateMessage *m);
+    /* Methods */
+    char * query() const;
+    void set_query(const char * new_query);
+    size_t maxlenof_query() const;
+    char * update() const;
+    void set_update(const char * new_update);
+    size_t maxlenof_update() const;
+    virtual Message * clone() const;
+  };
+
+  class RemoveMessage : public Message
+  {
+   private:
+#pragma pack(push,4)
+    /** Internal data storage, do NOT modify! */
+    typedef struct {
+      int64_t timestamp_sec;  /**< Interface Unix timestamp, seconds */
+      int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
+      char query[1024]; /**< Query as JSON string */
+    } RemoveMessage_data_t;
+#pragma pack(pop)
+
+    RemoveMessage_data_t *data;
+
+   public:
+    RemoveMessage(const char * ini_query);
+    RemoveMessage();
+    ~RemoveMessage();
+
+    RemoveMessage(const RemoveMessage *m);
+    /* Methods */
+    char * query() const;
+    void set_query(const char * new_query);
+    size_t maxlenof_query() const;
+    virtual Message * clone() const;
+  };
+
   virtual bool message_valid(const Message *message) const;
  private:
   RobotMemoryInterface();
diff --git a/src/plugins/robot-memory/interfaces/RobotMemoryInterface.tolua b/src/plugins/robot-memory/interfaces/RobotMemoryInterface.tolua
index 1b06b6b..67095b2 100644
--- a/src/plugins/robot-memory/interfaces/RobotMemoryInterface.tolua
+++ b/src/plugins/robot-memory/interfaces/RobotMemoryInterface.tolua
@@ -34,6 +34,93 @@ class RobotMemoryInterface : public Interface
     int maxlenof_query() const;
   };
 
+  class InsertMessage : public Message
+  {
+    InsertMessage(char * ini_insert);
+    InsertMessage();
+    ~InsertMessage();
+
+    unsigned int      id() const;
+
+    unsigned int      sender_id() const;
+    const char *      sender_thread_name() const;
+    Interface *       interface() const;
+    const char *      type() const;
+
+    const void *      datachunk() const;
+    unsigned int      datasize() const;
+
+    void              set_from_chunk(const void *chunk);
+
+    /* from RefCount */
+    void              ref();
+    void              unref();
+    unsigned int      refcount();
+
+    char * insert();
+    void set_insert(const char * new_insert);
+    int maxlenof_insert() const;
+  };
+
+  class UpdateMessage : public Message
+  {
+    UpdateMessage(char * ini_query, char * ini_update);
+    UpdateMessage();
+    ~UpdateMessage();
+
+    unsigned int      id() const;
+
+    unsigned int      sender_id() const;
+    const char *      sender_thread_name() const;
+    Interface *       interface() const;
+    const char *      type() const;
+
+    const void *      datachunk() const;
+    unsigned int      datasize() const;
+
+    void              set_from_chunk(const void *chunk);
+
+    /* from RefCount */
+    void              ref();
+    void              unref();
+    unsigned int      refcount();
+
+    char * query();
+    void set_query(const char * new_query);
+    int maxlenof_query() const;
+    char * update();
+    void set_update(const char * new_update);
+    int maxlenof_update() const;
+  };
+
+  class RemoveMessage : public Message
+  {
+    RemoveMessage(char * ini_query);
+    RemoveMessage();
+    ~RemoveMessage();
+
+    unsigned int      id() const;
+
+    unsigned int      sender_id() const;
+    const char *      sender_thread_name() const;
+    Interface *       interface() const;
+    const char *      type() const;
+
+    const void *      datachunk() const;
+    unsigned int      datasize() const;
+
+    void              set_from_chunk(const void *chunk);
+
+    /* from RefCount */
+    void              ref();
+    void              unref();
+    unsigned int      refcount();
+
+    char * query();
+    void set_query(const char * new_query);
+    int maxlenof_query() const;
+  };
+
   char * error();
   void set_error(const char * new_error);
   int maxlenof_error() const;
diff --git a/src/plugins/robot-memory/interfaces/RobotMemoryInterface.xml b/src/plugins/robot-memory/interfaces/RobotMemoryInterface.xml
index ae43d12..56dcfe7 100644
--- a/src/plugins/robot-memory/interfaces/RobotMemoryInterface.xml
+++ b/src/plugins/robot-memory/interfaces/RobotMemoryInterface.xml
@@ -16,5 +16,24 @@
     </comment>
     <field type="string"  length="1024" name="query">Query as JSON string</field>
   </message>
+  <message name="Insert">
+    <comment>
+      Message to insert a document into the database.
+    </comment>
+    <field type="string"  length="1024" name="insert">Document to insert as JSON string</field>
+  </message>
+  <message name="Update">
+    <comment>
+      Message to update documents mathing a query.
+    </comment>
+    <field type="string"  length="1024" name="query">Query as JSON string</field>
+    <field type="string"  length="1024" name="update">Update as JSON string</field>
+  </message>
+  <message name="Remove">
+    <comment>
+      Message to remove documents matching the query.
+    </comment>
+    <field type="string"  length="1024" name="query">Query as JSON string</field>
+  </message>
 
 </interface>
diff --git a/src/plugins/robot-memory/robot_memory_thread.cpp b/src/plugins/robot-memory/robot_memory_thread.cpp
index 32facf8..1821a83 100644
--- a/src/plugins/robot-memory/robot_memory_thread.cpp
+++ b/src/plugins/robot-memory/robot_memory_thread.cpp
@@ -59,7 +59,7 @@ RobotMemoryThread::init()
 	logger->log_info(name(), "Started RobotMemory");
 	__collection = "fawkes.msglog";
   try {
-    __collection = config->get_string("/plugins/mongodb/logger_collection");
+    __collection = config->get_string("/plugins/mongodb/test-collection");
   } catch (Exception &e) {}
 
   __rm_if = blackboard->open_for_writing<RobotMemoryInterface>(config->get_string("/plugins/robot-memory/interface-name").c_str());
@@ -82,8 +82,17 @@ RobotMemoryThread::loop()
 	// process interface messages
   while (! __rm_if->msgq_empty() ) {
     if (__rm_if->msgq_first_is<RobotMemoryInterface::QueryMessage>()) {
-	    RobotMemoryInterface::QueryMessage* query = (RobotMemoryInterface::QueryMessage*) __rm_if->msgq_first();
-	    exec_query(query->query());
+	    RobotMemoryInterface::QueryMessage* msg = (RobotMemoryInterface::QueryMessage*) __rm_if->msgq_first();
+	    exec_query(msg->query());
+    } else if (__rm_if->msgq_first_is<RobotMemoryInterface::InsertMessage>()) {
+	    RobotMemoryInterface::InsertMessage* msg = (RobotMemoryInterface::InsertMessage*) __rm_if->msgq_first();
+	    exec_insert(msg->insert());
+    } else if (__rm_if->msgq_first_is<RobotMemoryInterface::UpdateMessage>()) {
+	    RobotMemoryInterface::UpdateMessage* msg = (RobotMemoryInterface::UpdateMessage*) __rm_if->msgq_first();
+	    exec_update(msg->query(), msg->update());
+    } else if (__rm_if->msgq_first_is<RobotMemoryInterface::RemoveMessage>()) {
+	    RobotMemoryInterface::RemoveMessage* msg = (RobotMemoryInterface::RemoveMessage*) __rm_if->msgq_first();
+	    exec_remove(msg->query());
     } else {
       logger->log_warn(name(), "Unknown message received");
     }
@@ -113,17 +122,12 @@ void RobotMemoryThread::exec_query(std::string query_string)
 	}
 
 	//introspect query
-	logger->log_info(name(), "Filter: %s", query.getFilter().toString().c_str());
-	logger->log_info(name(), "Modifiers: %s", query.getModifiers().toString().c_str());
-	logger->log_info(name(), "Sort: %s", query.getSort().toString().c_str());
-	logger->log_info(name(), "Hint: %s", query.getHint().toString().c_str());
-	logger->log_info(name(), "ReadPref: %s", query.getReadPref().toString().c_str());
-
+	log(query, "executing query:");
 	
 	//actually execute query
 	std::unique_ptr<DBClientCursor> cursor;
 	try{
-	  cursor = mongodb_client->query(__collection, query);
+	  cursor = mongodb_client->query(dyn_collection, query);
 	} catch (DBException &e) {
 		logger->log_error(name(), "Error for query %s\n Exception: %s",
 		                  query_string.c_str(), e.toString().c_str());
@@ -133,43 +137,164 @@ void RobotMemoryThread::exec_query(std::string query_string)
 		return;
 	}
 
-	logger->log_info(name(), "Query One result:\n%s", cursor->next().toString().c_str());
-	__rm_if->set_result(cursor->next().toString().c_str());
+	if(cursor->more()){
+		BSONObj res = cursor->next();
+		logger->log_info(name(), "Query One result:\n%s", res.toString().c_str());
+		__rm_if->set_result(res.toString().c_str());
+		__rm_if->write();
+	}
+	else {
+		logger->log_info(name(), "Query result empty");
+	}
+}
+
+void RobotMemoryThread::exec_insert(std::string insert_string)
+{
+	logger->log_info(name(), "Executing Query: %s", insert_string.c_str());
+
+	//only one query at a time
+	MutexLocker lock(__mutex);
+
+	//get query from string
+  BSONObj obj;
+	try{
+		obj = fromjson(insert_string);
+	} catch (DBException &e) {
+		logger->log_error(name(), "Can't parse insert_string '%s'\n Exception: %s",
+		                  insert_string.c_str(), e.toString().c_str());
+		__rm_if->set_error((std::string("Can't parse insert_string ") +  insert_string
+		                    + "\nException: " + e.toString()).c_str());
+		__rm_if->write();
+		return;
+	}
+
+	log(obj, "Inserting:");
+	
+	//actually execute insert
+	try{
+	  mongodb_client->insert(__collection, obj);
+	} catch (DBException &e) {
+		logger->log_error(name(), "Error for insert %s\n Exception: %s",
+		                  insert_string.c_str(), e.toString().c_str());
+		__rm_if->set_error((std::string("Query error for ") +  insert_string
+		                    + "\nException: " + e.toString()).c_str());
+		__rm_if->write();
+		return;
+	}
+
+	__rm_if->set_result("insert successful");
 	__rm_if->write();
 }
 
-// void
-// RobotMemoryThread::insert_message(LogLevel ll, const char *component,
-// 				    const char *format, va_list va)
-// {
-//   if (log_level <= ll ) {
-//     MutexLocker lock(__mutex);
-//     struct timeval now;
-//     gettimeofday(&now, NULL);
-//     Date_t nowd = now.tv_sec * 1000 + now.tv_usec / 1000;
-
-//     char *msg;
-//     if (vasprintf(&msg, format, va) == -1) {
-//       // Cannot do anything useful, drop log message
-//       return;
-//     }
-
-//     BSONObjBuilder b;
-//     switch (ll) {
-//     case LL_DEBUG: b.append("level", "DEBUG"); break;
-//     case LL_INFO:  b.append("level", "INFO");  break;
-//     case LL_WARN:  b.append("level", "WARN");  break;
-//     case LL_ERROR: b.append("level", "ERROR"); break;
-//     default:       b.append("level", "UNKN");  break;
-//     }
-//     b.append("component", component);
-//     b.appendDate("time", nowd);
-//     b.append("message", msg);
-
-//     free(msg);
-
-//     try {
-//       mongodb_client->insert(__collection, b.obj());
-//     } catch (mongo::DBException &e) {} // ignored
-//   }
-// }
+void RobotMemoryThread::exec_update(std::string query_string, std::string update_string)
+{
+	logger->log_info(name(), "Executing Update %s for query %s",
+	                 update_string.c_str(), query_string.c_str());
+
+	//only one query at a time
+	MutexLocker lock(__mutex);
+
+	//get query from string
+	Query query;
+	try{
+	  query = Query(query_string);
+	} catch (DBException &e) {
+		logger->log_error(name(), "Can't parse query_string '%s'\n Exception: %s",
+		                  query_string.c_str(), e.toString().c_str());
+		__rm_if->set_error((std::string("Can't parse query_string ") +  query_string
+		                    + "\nException: " + e.toString()).c_str());
+		__rm_if->write();
+		return;
+	}
+	BSONObj update;
+	try{
+		update = fromjson(update_string);
+	} catch (DBException &e) {
+		logger->log_error(name(), "Can't parse update_string '%s'\n Exception: %s",
+		                  update_string.c_str(), e.toString().c_str());
+		__rm_if->set_error((std::string("Can't parse update_string ") +  update_string
+		                    + "\nException: " + e.toString()).c_str());
+		__rm_if->write();
+		return;
+	}
+
+	log(query, "Updating documents for query:");
+	log(update, "Updating with:");
+	
+	//actually execute update
+	try{
+		mongodb_client->update(__collection, query, update);
+	} catch (DBException &e) {
+		logger->log_error(name(), "Error for update %s for query %s\n Exception: %s",
+		                  update_string.c_str(), query_string.c_str(), e.toString().c_str());
+		__rm_if->set_error((std::string("Query error for ") +  query_string + " and update "
+		                    + update_string + "\nException: " + e.toString()).c_str());
+		__rm_if->write();
+		return;
+	}
+
+	__rm_if->set_result("update successful");
+	__rm_if->write();
+}
+
+void RobotMemoryThread::exec_remove(std::string query_string)
+{
+	logger->log_info(name(), "Executing Remove: %s", query_string.c_str());
+
+	//only one query at a time
+	MutexLocker lock(__mutex);
+
+	//get query from string
+	Query query;
+	try{
+	  query = Query(query_string);
+	} catch (DBException &e) {
+		logger->log_error(name(), "Can't parse query_string '%s'\n Exception: %s",
+		                  query_string.c_str(), e.toString().c_str());
+		__rm_if->set_error((std::string("Can't parse query_string ") +  query_string
+		                    + "\nException: " + e.toString()).c_str());
+		__rm_if->write();
+		return;
+	}
+
+	//introspect
+	log(query, "Removing documents for query:");
+	
+	//actually execute remove
+	try{
+	  mongodb_client->remove(__collection, query);
+	} catch (DBException &e) {
+		logger->log_error(name(), "Error for query %s\n Exception: %s",
+		                  query_string.c_str(), e.toString().c_str());
+		__rm_if->set_error((std::string("Query error for ") +  query_string
+		                    + "\nException: " + e.toString()).c_str());
+		__rm_if->write();
+		return;
+	}
+
+	__rm_if->set_result("remove successful");
+	__rm_if->write();
+}
+
+void
+RobotMemoryThread::log(Query query, std::string what)
+{
+	std::string output = what
+		+ "\nFilter: " + query.getFilter().toString()
+		+ "\nModifiers: " + query.getModifiers().toString()
+		+ "\nSort: " + query.getSort().toString()
+		+ "\nHint: " + query.getHint().toString()
+		+ "\nReadPref: " + query.getReadPref().toString();
+		
+	logger->log_info(name(), "%s", output.c_str());
+}
+
+void
+RobotMemoryThread::log(BSONObj obj, std::string what)
+{
+	std::string output = what
+		+ "\nObject: " + obj.toString();
+		
+	logger->log_info(name(), "%s", output.c_str());
+}
+
diff --git a/src/plugins/robot-memory/robot_memory_thread.h b/src/plugins/robot-memory/robot_memory_thread.h
index 004a454..ed32903 100644
--- a/src/plugins/robot-memory/robot_memory_thread.h
+++ b/src/plugins/robot-memory/robot_memory_thread.h
@@ -30,6 +30,7 @@
 #include <plugins/mongodb/aspect/mongodb.h>
 #include <aspect/blackboard.h>
 #include <aspect/blocked_timing.h>
+#include <mongo/client/dbclient.h>
 
 #include <string>
 
@@ -64,6 +65,12 @@ class RobotMemoryThread
   fawkes::RobotMemoryInterface *__rm_if;
 
   void exec_query(std::string query);
+  void exec_insert(std::string insert);
+  void exec_update(std::string query, std::string update);
+  void exec_remove(std::string query);
+
+  void log(mongo::Query query, std::string what);
+  void log(mongo::BSONObj obj, std::string what);
 };
 
 #endif

- *commit* 15fad015e6794700d1da6ebd09cbb1ddee61efb4 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Mon May 9 18:59:23 2016 +0200
Subject: robot-memory: virtual knowledge base experiments

 src/plugins/robot-memory/robot_memory_thread.cpp |  108 +++++++++++++++++++++-
 src/plugins/robot-memory/robot_memory_thread.h   |   11 ++
 2 files changed, 115 insertions(+), 4 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/robot-memory/robot_memory_thread.cpp b/src/plugins/robot-memory/robot_memory_thread.cpp
index 1821a83..7774ab7 100644
--- a/src/plugins/robot-memory/robot_memory_thread.cpp
+++ b/src/plugins/robot-memory/robot_memory_thread.cpp
@@ -103,6 +103,10 @@ RobotMemoryThread::loop()
 
 void RobotMemoryThread::exec_query(std::string query_string)
 {
+	exec_query(query_string, __collection);
+}
+void RobotMemoryThread::exec_query(std::string query_string, std::string collection)
+{
 	logger->log_info(name(), "Executing Query: %s", query_string.c_str());
 
 	//only one query at a time
@@ -123,11 +127,26 @@ void RobotMemoryThread::exec_query(std::string query_string)
 
 	//introspect query
 	log(query, "executing query:");
+
+	//check if virtual knowledge is queried
+	//rename field in query
+	if(query.getFilter().hasField("class")){
+		set_fields(query, std::string("{type:\"") +
+		           query.getFilter()["class"].String() + "\"}");
+		remove_field(query, "class");
+	}
+	log(query, "Virtual query:");
+	//computation on request
+	if(query.getFilter().hasField("bbinterface")){
+		collection = config->get_string("plugins/robot-memory/blackboard-collection");
+		gen_blackboard_data(query.getFilter()["bbinterface"].String());
+	}
+	log(query, "Virtual query:");
 	
 	//actually execute query
 	std::unique_ptr<DBClientCursor> cursor;
 	try{
-	  cursor = mongodb_client->query(dyn_collection, query);
+	  cursor = mongodb_client->query(collection, query);
 	} catch (DBException &e) {
 		logger->log_error(name(), "Error for query %s\n Exception: %s",
 		                  query_string.c_str(), e.toString().c_str());
@@ -150,6 +169,10 @@ void RobotMemoryThread::exec_query(std::string query_string)
 
 void RobotMemoryThread::exec_insert(std::string insert_string)
 {
+	exec_insert(insert_string, __collection);
+}
+void RobotMemoryThread::exec_insert(std::string insert_string, std::string collection)
+{
 	logger->log_info(name(), "Executing Query: %s", insert_string.c_str());
 
 	//only one query at a time
@@ -169,10 +192,12 @@ void RobotMemoryThread::exec_insert(std::string insert_string)
 	}
 
 	log(obj, "Inserting:");
+	set_fields(obj, "{type: \"test\"}");
+	log(obj, "Updated Inserting:");
 	
 	//actually execute insert
 	try{
-	  mongodb_client->insert(__collection, obj);
+	  mongodb_client->insert(collection, obj);
 	} catch (DBException &e) {
 		logger->log_error(name(), "Error for insert %s\n Exception: %s",
 		                  insert_string.c_str(), e.toString().c_str());
@@ -188,6 +213,11 @@ void RobotMemoryThread::exec_insert(std::string insert_string)
 
 void RobotMemoryThread::exec_update(std::string query_string, std::string update_string)
 {
+	exec_update(query_string, update_string, __collection);
+}
+void RobotMemoryThread::exec_update(std::string query_string, std::string update_string,
+                                    std::string collection)
+{
 	logger->log_info(name(), "Executing Update %s for query %s",
 	                 update_string.c_str(), query_string.c_str());
 
@@ -223,7 +253,7 @@ void RobotMemoryThread::exec_update(std::string query_string, std::string update
 	
 	//actually execute update
 	try{
-		mongodb_client->update(__collection, query, update);
+		mongodb_client->update(collection, query, update);
 	} catch (DBException &e) {
 		logger->log_error(name(), "Error for update %s for query %s\n Exception: %s",
 		                  update_string.c_str(), query_string.c_str(), e.toString().c_str());
@@ -239,6 +269,11 @@ void RobotMemoryThread::exec_update(std::string query_string, std::string update
 
 void RobotMemoryThread::exec_remove(std::string query_string)
 {
+	exec_remove(query_string, __collection);
+}
+
+void RobotMemoryThread::exec_remove(std::string query_string, std::string collection)
+{
 	logger->log_info(name(), "Executing Remove: %s", query_string.c_str());
 
 	//only one query at a time
@@ -262,7 +297,7 @@ void RobotMemoryThread::exec_remove(std::string query_string)
 	
 	//actually execute remove
 	try{
-	  mongodb_client->remove(__collection, query);
+	  mongodb_client->remove(collection, query);
 	} catch (DBException &e) {
 		logger->log_error(name(), "Error for query %s\n Exception: %s",
 		                  query_string.c_str(), e.toString().c_str());
@@ -298,3 +333,68 @@ RobotMemoryThread::log(BSONObj obj, std::string what)
 	logger->log_info(name(), "%s", output.c_str());
 }
 
+void
+RobotMemoryThread::set_fields(BSONObj &obj, std::string what)
+{
+	BSONObjBuilder b;
+	b.appendElements(obj);
+	b.appendElements(fromjson(what));
+	//override
+	obj = b.obj();
+}
+
+void
+RobotMemoryThread::set_fields(Query &q, std::string what)
+{
+	BSONObjBuilder b;
+	b.appendElements(q.getFilter());
+	b.appendElements(fromjson(what));
+
+	//TODO keep other stuff in query
+	// + "\nFilter: " + query.getFilter().toString()
+	// + "\nModifiers: " + query.getModifiers().toString()
+	// + "\nSort: " + query.getSort().toString()
+	// + "\nHint: " + query.getHint().toString()
+	// + "\nReadPref: " + query.getReadPref().toString();
+     
+	//override
+	q = Query(b.obj());
+}
+
+void
+RobotMemoryThread::remove_field(Query &q, std::string what)
+{
+	BSONObjBuilder b;
+	b.appendElements(q.getFilter().removeField(what));
+	
+	//TODO keep other stuff in query
+	// + "\nFilter: " + query.getFilter().toString()
+	// + "\nModifiers: " + query.getModifiers().toString()
+	// + "\nSort: " + query.getSort().toString()
+	// + "\nHint: " + query.getHint().toString()
+	// + "\nReadPref: " + query.getReadPref().toString();
+	
+	//override
+	q = Query(b.obj());
+}
+
+void
+RobotMemoryThread::gen_blackboard_data(std::string field)
+{
+	logger->log_info(name(), "Generating virtual kb for bb");
+
+	std::string collection = config->get_string("plugins/robot-memory/blackboard-collection");
+	
+	//remove old data first
+	mongodb_client->remove(collection, Query{"{}"});
+	
+	BSONObjBuilder b;
+	b.append("type", "bbinterface");
+	__rm_if->read();
+	b.append("bbinterface", __rm_if->uid());
+	b.append("error", __rm_if->error());
+	b.append("result", __rm_if->result());
+	
+	mongodb_client->insert(collection, b.obj());  
+}
+
diff --git a/src/plugins/robot-memory/robot_memory_thread.h b/src/plugins/robot-memory/robot_memory_thread.h
index ed32903..8a5013c 100644
--- a/src/plugins/robot-memory/robot_memory_thread.h
+++ b/src/plugins/robot-memory/robot_memory_thread.h
@@ -64,13 +64,24 @@ class RobotMemoryThread
   fawkes::Mutex *__mutex;
   fawkes::RobotMemoryInterface *__rm_if;
 
+  void exec_query(std::string query, std::string collection);
   void exec_query(std::string query);
+  void exec_insert(std::string insert, std::string collection);
   void exec_insert(std::string insert);
+  void exec_update(std::string query, std::string update, std::string collection);
   void exec_update(std::string query, std::string update);
+  void exec_remove(std::string query, std::string collection);
   void exec_remove(std::string query);
 
   void log(mongo::Query query, std::string what);
   void log(mongo::BSONObj obj, std::string what);
+
+  void set_fields(mongo::BSONObj &obj, std::string what);
+  void set_fields(mongo::Query &q, std::string what);
+  void remove_field(mongo::Query &q, std::string what);
+
+  //funtions to generate virtual knowledge
+  void gen_blackboard_data(std::string field);
 };
 
 #endif

- *commit* 63d7186f6cdd37d715aeb7b57c953049f2e33673 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Wed May 11 14:52:21 2016 +0200
Subject: robot-memory: added missing config file

 cfg/conf.d/robot-memory.yaml |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)


- *commit* 4bb5f4709e414612659dbedeb42384d5661b6530 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Thu Aug 18 12:59:31 2016 +0200
Subject: robot-memory: added gtest skeleton for unit testing

 .../core => plugins/robot-memory}/tests/Makefile   |   26 ++++++++-----------
 .../robot-memory/tests/robot_memory_test.cpp}      |   22 +++++++++-------
 2 files changed, 23 insertions(+), 25 deletions(-)


- *commit* b2a5231a1ba736c9114a903556300e3c61da6fcb - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Tue Aug 23 18:51:52 2016 +0200
Subject: mongodb: hint in exception to start the mongod service

 src/plugins/mongodb/mongodb_thread.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/mongodb/mongodb_thread.cpp b/src/plugins/mongodb/mongodb_thread.cpp
index 081fd18..c2a7e5b 100644
--- a/src/plugins/mongodb/mongodb_thread.cpp
+++ b/src/plugins/mongodb/mongodb_thread.cpp
@@ -326,7 +326,7 @@ MongoDBThread::ClientConf::create_client()
       client = clconn;
       std::string errmsg;
       if (! clconn->connect(__conn_hostport, errmsg)) {
-	throw Exception("Could not connect to MongoDB at %s: %s",
+	throw Exception("Could not connect to MongoDB at %s: %s\nYou probably forgot to start/enable the mongod service",
 			__conn_hostport.toString().c_str(), errmsg.c_str());
       }
       std::list<AuthInfo>::iterator ai;

- *commit* 7d86c6fc167acc2d6ff0f95fc7692dee31d2c463 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Tue Aug 23 18:55:19 2016 +0200
Subject: robot-memory: provide aspect for using the RobotMemory

 src/plugins/robot-memory/Makefile                  |    9 +-
 src/plugins/{nao => robot-memory}/aspect/Makefile  |   33 +-
 .../robot_memory_aspect.cpp}                       |   51 ++--
 .../robot_memory_aspect.h}                         |   47 ++--
 .../robot-memory/aspect/robot_memory_inifin.cpp    |   79 +++++
 .../robot_memory_inifin.h}                         |   35 ++-
 .../interfaces/RobotMemoryInterface.cpp            |    2 +-
 .../interfaces/RobotMemoryInterface.xml            |    2 +-
 src/plugins/robot-memory/robot_memory.cpp          |  305 +++++++++++++++++
 src/plugins/robot-memory/robot_memory.h            |   82 +++++
 src/plugins/robot-memory/robot_memory_thread.cpp   |  354 ++------------------
 src/plugins/robot-memory/robot_memory_thread.h     |   30 +--
 12 files changed, 594 insertions(+), 435 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/robot-memory/Makefile b/src/plugins/robot-memory/Makefile
index 78fe64a..6deb5cb 100644
--- a/src/plugins/robot-memory/Makefile
+++ b/src/plugins/robot-memory/Makefile
@@ -19,16 +19,13 @@ include $(BASEDIR)/etc/buildsys/config.mk
 include $(BUILDCONFDIR)/tf/tf.mk
 include $(BASEDIR)/src/plugins/mongodb/mongodb.mk
 
-PRESUBDIRS = interfaces
+PRESUBDIRS = interfaces aspect
 
 LIBS_robot_memory = fawkescore fawkesaspects fawkesblackboard fawkesinterface \
 		fawkesutils fawkeslogging fawkesmongodbaspect fvutils \
-		fawkestf RobotMemoryInterface
+		fawkestf RobotMemoryInterface fawkesrobotmemory
 OBJS_robot_memory = $(patsubst %.cpp,%.o,$(patsubst qa/%,,$(subst $(SRCDIR)/,,$(realpath $(wildcard $(SRCDIR)/*.cpp)))))
 
-CFLAGS  += $(CFLAGS_MONGODB)
-LDFLAGS += $(LDFLAGS_MONGODB)
-
 OBJS_all    = $(OBJS_robot_memory)
 
 ifeq ($(HAVE_MONGODB)$(HAVE_TF),11)
@@ -49,7 +46,7 @@ all: $(WARN_TARGETS)
 
 .PHONY: warning_mongodb warning_tf
 warning_mongodb:
-	$(SILENT)echo -e "$(INDENT_PRINT)--> $(TRED)Omitting MongoDB Logging Plugin$(TNORMAL) (mongodb[-devel] not installed)"
+	$(SILENT)echo -e "$(INDENT_PRINT)--> $(TRED)Omitting RobotMemory Plugin$(TNORMAL) (mongodb[-devel] not installed)"
 warning_tf:
 	$(SILENT)echo -e "$(INDENT_PRINT)--> $(TRED)Omitting PCL utility library$(TNORMAL) (tf framework not available)"
 endif
diff --git a/src/plugins/robot-memory/interfaces/RobotMemoryInterface.cpp b/src/plugins/robot-memory/interfaces/RobotMemoryInterface.cpp
index 54650b9..a60da8d 100644
--- a/src/plugins/robot-memory/interfaces/RobotMemoryInterface.cpp
+++ b/src/plugins/robot-memory/interfaces/RobotMemoryInterface.cpp
@@ -56,7 +56,7 @@ RobotMemoryInterface::RobotMemoryInterface() : Interface()
   add_messageinfo("InsertMessage");
   add_messageinfo("UpdateMessage");
   add_messageinfo("RemoveMessage");
-  unsigned char tmp_hash[] = {0x61, 0x88, 0x21, 0xcd, 0x5a, 0x65, 0x18, 0x8d, 0x60, 0xaf, 0xf5, 0x57, 0x30, 0x4c, 0x6b, 0xd8};
+  unsigned char tmp_hash[] = {0x57, 0x8, 0x55, 0x6b, 0x61, 0x8, 0xc9, 0x16, 0xf7, 0x68, 0xcc, 0x7e, 0xae, 0xe2, 0x42, 0xe};
   set_hash(tmp_hash);
 }
 
diff --git a/src/plugins/robot-memory/interfaces/RobotMemoryInterface.xml b/src/plugins/robot-memory/interfaces/RobotMemoryInterface.xml
index 56dcfe7..498cda9 100644
--- a/src/plugins/robot-memory/interfaces/RobotMemoryInterface.xml
+++ b/src/plugins/robot-memory/interfaces/RobotMemoryInterface.xml
@@ -24,7 +24,7 @@
   </message>
   <message name="Update">
     <comment>
-      Message to update documents mathing a query.
+      Message to update documents matching a query.
     </comment>
     <field type="string"  length="1024" name="query">Query as JSON string</field>
     <field type="string"  length="1024" name="update">Update as JSON string</field>
diff --git a/src/plugins/robot-memory/robot_memory_thread.cpp b/src/plugins/robot-memory/robot_memory_thread.cpp
index 7774ab7..8bf74ec 100644
--- a/src/plugins/robot-memory/robot_memory_thread.cpp
+++ b/src/plugins/robot-memory/robot_memory_thread.cpp
@@ -26,10 +26,7 @@
 #include <core/threading/mutex_locker.h>
 #include <memory>
 
-// from MongoDB
-#include <mongo/client/dbclient.h>
 
-using namespace mongo;
 using namespace fawkes;
 
 /** @class RobotMemoryThread "robot_memory_thread.h"
@@ -40,39 +37,33 @@ using namespace fawkes;
 /** Constructor. */
 RobotMemoryThread::RobotMemoryThread()
 	: Thread("RobotMemoryThread", Thread::OPMODE_WAITFORWAKEUP),
-	  BlockedTimingAspect(BlockedTimingAspect::WAKEUP_HOOK_WORLDSTATE)
+	  BlockedTimingAspect(BlockedTimingAspect::WAKEUP_HOOK_SENSOR_PROCESS),
+    AspectProviderAspect(&robot_memory_inifin_)
 {
-  __mutex = new Mutex();
 }
 
 
 /** Destructor. */
 RobotMemoryThread::~RobotMemoryThread()
-{
-  delete __mutex;
-}
+{}
 
 
 void
 RobotMemoryThread::init()
 {
-	logger->log_info(name(), "Started RobotMemory");
-	__collection = "fawkes.msglog";
-  try {
-    __collection = config->get_string("/plugins/mongodb/test-collection");
-  } catch (Exception &e) {}
-
-  __rm_if = blackboard->open_for_writing<RobotMemoryInterface>(config->get_string("/plugins/robot-memory/interface-name").c_str());
-  __rm_if->set_error("");
-  __rm_if->set_result("");
-  
-  __rm_if->write();
+  //init RobotMemory itself
+  robot_memory = new RobotMemory(config, logger, clock, mongodb_client, blackboard);
+  robot_memory->init();
+  //prepare aspect initializer
+  robot_memory_inifin_.set_robot_memory(robot_memory);
 }
 
 
 void
 RobotMemoryThread::finalize()
 {
+  robot_memory_inifin_.set_robot_memory(NULL);
+  delete robot_memory;
 }
 
 
@@ -80,321 +71,24 @@ void
 RobotMemoryThread::loop()
 {
 	// process interface messages
-  while (! __rm_if->msgq_empty() ) {
-    if (__rm_if->msgq_first_is<RobotMemoryInterface::QueryMessage>()) {
-	    RobotMemoryInterface::QueryMessage* msg = (RobotMemoryInterface::QueryMessage*) __rm_if->msgq_first();
-	    exec_query(msg->query());
-    } else if (__rm_if->msgq_first_is<RobotMemoryInterface::InsertMessage>()) {
-	    RobotMemoryInterface::InsertMessage* msg = (RobotMemoryInterface::InsertMessage*) __rm_if->msgq_first();
-	    exec_insert(msg->insert());
-    } else if (__rm_if->msgq_first_is<RobotMemoryInterface::UpdateMessage>()) {
-	    RobotMemoryInterface::UpdateMessage* msg = (RobotMemoryInterface::UpdateMessage*) __rm_if->msgq_first();
-	    exec_update(msg->query(), msg->update());
-    } else if (__rm_if->msgq_first_is<RobotMemoryInterface::RemoveMessage>()) {
-	    RobotMemoryInterface::RemoveMessage* msg = (RobotMemoryInterface::RemoveMessage*) __rm_if->msgq_first();
-	    exec_remove(msg->query());
+  while (! robot_memory->rm_if_->msgq_empty() ) {
+    if (robot_memory->rm_if_->msgq_first_is<RobotMemoryInterface::QueryMessage>()) {
+	    RobotMemoryInterface::QueryMessage* msg = (RobotMemoryInterface::QueryMessage*) robot_memory->rm_if_->msgq_first();
+	    robot_memory->exec_query(msg->query());
+    } else if (robot_memory->rm_if_->msgq_first_is<RobotMemoryInterface::InsertMessage>()) {
+	    RobotMemoryInterface::InsertMessage* msg = (RobotMemoryInterface::InsertMessage*) robot_memory->rm_if_->msgq_first();
+	    robot_memory->exec_insert(msg->insert());
+    } else if (robot_memory->rm_if_->msgq_first_is<RobotMemoryInterface::UpdateMessage>()) {
+	    RobotMemoryInterface::UpdateMessage* msg = (RobotMemoryInterface::UpdateMessage*) robot_memory->rm_if_->msgq_first();
+	    robot_memory->exec_update(msg->query(), msg->update());
+    } else if (robot_memory->rm_if_->msgq_first_is<RobotMemoryInterface::RemoveMessage>()) {
+	    RobotMemoryInterface::RemoveMessage* msg = (RobotMemoryInterface::RemoveMessage*) robot_memory->rm_if_->msgq_first();
+	    robot_memory->exec_remove(msg->query());
     } else {
       logger->log_warn(name(), "Unknown message received");
     }
 
-    __rm_if->msgq_pop();
+    robot_memory->rm_if_->msgq_pop();
   }
 }
 
-void RobotMemoryThread::exec_query(std::string query_string)
-{
-	exec_query(query_string, __collection);
-}
-void RobotMemoryThread::exec_query(std::string query_string, std::string collection)
-{
-	logger->log_info(name(), "Executing Query: %s", query_string.c_str());
-
-	//only one query at a time
-	MutexLocker lock(__mutex);
-
-	//get query from string
-	Query query;
-	try{
-	  query = Query(query_string);
-	} catch (DBException &e) {
-		logger->log_error(name(), "Can't parse query_string '%s'\n Exception: %s",
-		                  query_string.c_str(), e.toString().c_str());
-		__rm_if->set_error((std::string("Can't parse query_string ") +  query_string
-		                    + "\nException: " + e.toString()).c_str());
-		__rm_if->write();
-		return;
-	}
-
-	//introspect query
-	log(query, "executing query:");
-
-	//check if virtual knowledge is queried
-	//rename field in query
-	if(query.getFilter().hasField("class")){
-		set_fields(query, std::string("{type:\"") +
-		           query.getFilter()["class"].String() + "\"}");
-		remove_field(query, "class");
-	}
-	log(query, "Virtual query:");
-	//computation on request
-	if(query.getFilter().hasField("bbinterface")){
-		collection = config->get_string("plugins/robot-memory/blackboard-collection");
-		gen_blackboard_data(query.getFilter()["bbinterface"].String());
-	}
-	log(query, "Virtual query:");
-	
-	//actually execute query
-	std::unique_ptr<DBClientCursor> cursor;
-	try{
-	  cursor = mongodb_client->query(collection, query);
-	} catch (DBException &e) {
-		logger->log_error(name(), "Error for query %s\n Exception: %s",
-		                  query_string.c_str(), e.toString().c_str());
-		__rm_if->set_error((std::string("Query error for ") +  query_string
-		                    + "\nException: " + e.toString()).c_str());
-		__rm_if->write();
-		return;
-	}
-
-	if(cursor->more()){
-		BSONObj res = cursor->next();
-		logger->log_info(name(), "Query One result:\n%s", res.toString().c_str());
-		__rm_if->set_result(res.toString().c_str());
-		__rm_if->write();
-	}
-	else {
-		logger->log_info(name(), "Query result empty");
-	}
-}
-
-void RobotMemoryThread::exec_insert(std::string insert_string)
-{
-	exec_insert(insert_string, __collection);
-}
-void RobotMemoryThread::exec_insert(std::string insert_string, std::string collection)
-{
-	logger->log_info(name(), "Executing Query: %s", insert_string.c_str());
-
-	//only one query at a time
-	MutexLocker lock(__mutex);
-
-	//get query from string
-  BSONObj obj;
-	try{
-		obj = fromjson(insert_string);
-	} catch (DBException &e) {
-		logger->log_error(name(), "Can't parse insert_string '%s'\n Exception: %s",
-		                  insert_string.c_str(), e.toString().c_str());
-		__rm_if->set_error((std::string("Can't parse insert_string ") +  insert_string
-		                    + "\nException: " + e.toString()).c_str());
-		__rm_if->write();
-		return;
-	}
-
-	log(obj, "Inserting:");
-	set_fields(obj, "{type: \"test\"}");
-	log(obj, "Updated Inserting:");
-	
-	//actually execute insert
-	try{
-	  mongodb_client->insert(collection, obj);
-	} catch (DBException &e) {
-		logger->log_error(name(), "Error for insert %s\n Exception: %s",
-		                  insert_string.c_str(), e.toString().c_str());
-		__rm_if->set_error((std::string("Query error for ") +  insert_string
-		                    + "\nException: " + e.toString()).c_str());
-		__rm_if->write();
-		return;
-	}
-
-	__rm_if->set_result("insert successful");
-	__rm_if->write();
-}
-
-void RobotMemoryThread::exec_update(std::string query_string, std::string update_string)
-{
-	exec_update(query_string, update_string, __collection);
-}
-void RobotMemoryThread::exec_update(std::string query_string, std::string update_string,
-                                    std::string collection)
-{
-	logger->log_info(name(), "Executing Update %s for query %s",
-	                 update_string.c_str(), query_string.c_str());
-
-	//only one query at a time
-	MutexLocker lock(__mutex);
-
-	//get query from string
-	Query query;
-	try{
-	  query = Query(query_string);
-	} catch (DBException &e) {
-		logger->log_error(name(), "Can't parse query_string '%s'\n Exception: %s",
-		                  query_string.c_str(), e.toString().c_str());
-		__rm_if->set_error((std::string("Can't parse query_string ") +  query_string
-		                    + "\nException: " + e.toString()).c_str());
-		__rm_if->write();
-		return;
-	}
-	BSONObj update;
-	try{
-		update = fromjson(update_string);
-	} catch (DBException &e) {
-		logger->log_error(name(), "Can't parse update_string '%s'\n Exception: %s",
-		                  update_string.c_str(), e.toString().c_str());
-		__rm_if->set_error((std::string("Can't parse update_string ") +  update_string
-		                    + "\nException: " + e.toString()).c_str());
-		__rm_if->write();
-		return;
-	}
-
-	log(query, "Updating documents for query:");
-	log(update, "Updating with:");
-	
-	//actually execute update
-	try{
-		mongodb_client->update(collection, query, update);
-	} catch (DBException &e) {
-		logger->log_error(name(), "Error for update %s for query %s\n Exception: %s",
-		                  update_string.c_str(), query_string.c_str(), e.toString().c_str());
-		__rm_if->set_error((std::string("Query error for ") +  query_string + " and update "
-		                    + update_string + "\nException: " + e.toString()).c_str());
-		__rm_if->write();
-		return;
-	}
-
-	__rm_if->set_result("update successful");
-	__rm_if->write();
-}
-
-void RobotMemoryThread::exec_remove(std::string query_string)
-{
-	exec_remove(query_string, __collection);
-}
-
-void RobotMemoryThread::exec_remove(std::string query_string, std::string collection)
-{
-	logger->log_info(name(), "Executing Remove: %s", query_string.c_str());
-
-	//only one query at a time
-	MutexLocker lock(__mutex);
-
-	//get query from string
-	Query query;
-	try{
-	  query = Query(query_string);
-	} catch (DBException &e) {
-		logger->log_error(name(), "Can't parse query_string '%s'\n Exception: %s",
-		                  query_string.c_str(), e.toString().c_str());
-		__rm_if->set_error((std::string("Can't parse query_string ") +  query_string
-		                    + "\nException: " + e.toString()).c_str());
-		__rm_if->write();
-		return;
-	}
-
-	//introspect
-	log(query, "Removing documents for query:");
-	
-	//actually execute remove
-	try{
-	  mongodb_client->remove(collection, query);
-	} catch (DBException &e) {
-		logger->log_error(name(), "Error for query %s\n Exception: %s",
-		                  query_string.c_str(), e.toString().c_str());
-		__rm_if->set_error((std::string("Query error for ") +  query_string
-		                    + "\nException: " + e.toString()).c_str());
-		__rm_if->write();
-		return;
-	}
-
-	__rm_if->set_result("remove successful");
-	__rm_if->write();
-}
-
-void
-RobotMemoryThread::log(Query query, std::string what)
-{
-	std::string output = what
-		+ "\nFilter: " + query.getFilter().toString()
-		+ "\nModifiers: " + query.getModifiers().toString()
-		+ "\nSort: " + query.getSort().toString()
-		+ "\nHint: " + query.getHint().toString()
-		+ "\nReadPref: " + query.getReadPref().toString();
-		
-	logger->log_info(name(), "%s", output.c_str());
-}
-
-void
-RobotMemoryThread::log(BSONObj obj, std::string what)
-{
-	std::string output = what
-		+ "\nObject: " + obj.toString();
-		
-	logger->log_info(name(), "%s", output.c_str());
-}
-
-void
-RobotMemoryThread::set_fields(BSONObj &obj, std::string what)
-{
-	BSONObjBuilder b;
-	b.appendElements(obj);
-	b.appendElements(fromjson(what));
-	//override
-	obj = b.obj();
-}
-
-void
-RobotMemoryThread::set_fields(Query &q, std::string what)
-{
-	BSONObjBuilder b;
-	b.appendElements(q.getFilter());
-	b.appendElements(fromjson(what));
-
-	//TODO keep other stuff in query
-	// + "\nFilter: " + query.getFilter().toString()
-	// + "\nModifiers: " + query.getModifiers().toString()
-	// + "\nSort: " + query.getSort().toString()
-	// + "\nHint: " + query.getHint().toString()
-	// + "\nReadPref: " + query.getReadPref().toString();
-     
-	//override
-	q = Query(b.obj());
-}
-
-void
-RobotMemoryThread::remove_field(Query &q, std::string what)
-{
-	BSONObjBuilder b;
-	b.appendElements(q.getFilter().removeField(what));
-	
-	//TODO keep other stuff in query
-	// + "\nFilter: " + query.getFilter().toString()
-	// + "\nModifiers: " + query.getModifiers().toString()
-	// + "\nSort: " + query.getSort().toString()
-	// + "\nHint: " + query.getHint().toString()
-	// + "\nReadPref: " + query.getReadPref().toString();
-	
-	//override
-	q = Query(b.obj());
-}
-
-void
-RobotMemoryThread::gen_blackboard_data(std::string field)
-{
-	logger->log_info(name(), "Generating virtual kb for bb");
-
-	std::string collection = config->get_string("plugins/robot-memory/blackboard-collection");
-	
-	//remove old data first
-	mongodb_client->remove(collection, Query{"{}"});
-	
-	BSONObjBuilder b;
-	b.append("type", "bbinterface");
-	__rm_if->read();
-	b.append("bbinterface", __rm_if->uid());
-	b.append("error", __rm_if->error());
-	b.append("result", __rm_if->result());
-	
-	mongodb_client->insert(collection, b.obj());  
-}
-
diff --git a/src/plugins/robot-memory/robot_memory_thread.h b/src/plugins/robot-memory/robot_memory_thread.h
index 8a5013c..b23ed42 100644
--- a/src/plugins/robot-memory/robot_memory_thread.h
+++ b/src/plugins/robot-memory/robot_memory_thread.h
@@ -31,6 +31,9 @@
 #include <aspect/blackboard.h>
 #include <aspect/blocked_timing.h>
 #include <mongo/client/dbclient.h>
+#include <aspect/aspect_provider.h>
+#include "robot_memory.h"
+#include "aspect/robot_memory_inifin.h"
 
 #include <string>
 
@@ -46,7 +49,8 @@ class RobotMemoryThread
   public fawkes::ClockAspect,
   public fawkes::MongoDBAspect,
 	public fawkes::BlockedTimingAspect,
-  public fawkes::BlackBoardAspect
+  public fawkes::BlackBoardAspect,
+  public fawkes::AspectProviderAspect
 {
  public:
   RobotMemoryThread();
@@ -60,28 +64,8 @@ class RobotMemoryThread
  protected: virtual void run() { Thread::run(); }
 
  private:
-  std::string    __collection;
-  fawkes::Mutex *__mutex;
-  fawkes::RobotMemoryInterface *__rm_if;
-
-  void exec_query(std::string query, std::string collection);
-  void exec_query(std::string query);
-  void exec_insert(std::string insert, std::string collection);
-  void exec_insert(std::string insert);
-  void exec_update(std::string query, std::string update, std::string collection);
-  void exec_update(std::string query, std::string update);
-  void exec_remove(std::string query, std::string collection);
-  void exec_remove(std::string query);
-
-  void log(mongo::Query query, std::string what);
-  void log(mongo::BSONObj obj, std::string what);
-
-  void set_fields(mongo::BSONObj &obj, std::string what);
-  void set_fields(mongo::Query &q, std::string what);
-  void remove_field(mongo::Query &q, std::string what);
-
-  //funtions to generate virtual knowledge
-  void gen_blackboard_data(std::string field);
+   RobotMemory* robot_memory;
+   fawkes::RobotMemoryIniFin robot_memory_inifin_;
 };
 
 #endif

- *commit* 24573f491e916ea4fe2dd1948c4f091566401c6a - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Wed Aug 24 11:36:35 2016 +0200
Subject: robot-memory: clearer api functions

 src/plugins/robot-memory/robot_memory.cpp        |   56 +++++++++++-----------
 src/plugins/robot-memory/robot_memory.h          |   14 ++----
 src/plugins/robot-memory/robot_memory_thread.cpp |    8 ++--
 3 files changed, 37 insertions(+), 41 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/robot-memory/robot_memory.cpp b/src/plugins/robot-memory/robot_memory.cpp
index cd0d647..d460f5a 100644
--- a/src/plugins/robot-memory/robot_memory.cpp
+++ b/src/plugins/robot-memory/robot_memory.cpp
@@ -52,9 +52,9 @@ void RobotMemory::init()
 {
   //load config values
   logger_->log_info(name_, "Started RobotMemory");
-  collection_ = "fawkes.msglog";
+  default_collection_ = "fawkes.msglog";
   try {
-    collection_ = config_->get_string("/plugins/mongodb/test-collection");
+    default_collection_ = config_->get_string("/plugins/mongodb/test-collection");
   } catch (Exception &e) {}
 
   //init blackboard interface
@@ -64,13 +64,13 @@ void RobotMemory::init()
   rm_if_->write();
 }
 
-void RobotMemory::exec_query(std::string query_string)
+void RobotMemory::query(std::string query_string, std::string collection)
 {
-  exec_query(query_string, collection_);
-}
-void RobotMemory::exec_query(std::string query_string, std::string collection)
-{
-  logger_->log_info(name_, "Executing Query: %s", query_string.c_str());
+  if(collection == "")
+  {
+    collection = default_collection_;
+  }
+  logger_->log_info(name_, "Executing Query %s on collection %s", query_string.c_str(), collection);
 
   //only one query at a time
   MutexLocker lock(mutex_);
@@ -122,13 +122,13 @@ void RobotMemory::exec_query(std::string query_string, std::string collection)
   }
 }
 
-void RobotMemory::exec_insert(std::string insert_string)
+void RobotMemory::insert(std::string insert_string, std::string collection)
 {
-  exec_insert(insert_string, collection_);
-}
-void RobotMemory::exec_insert(std::string insert_string, std::string collection)
-{
-  logger_->log_info(name_, "Executing Query: %s", insert_string.c_str());
+  if(collection == "")
+  {
+    collection = default_collection_;
+  }
+  logger_->log_info(name_, "Executing Query %s on collection %s", insert_string.c_str(), collection);
 
   //only one query at a time
   MutexLocker lock(mutex_);
@@ -157,15 +157,15 @@ void RobotMemory::exec_insert(std::string insert_string, std::string collection)
   }
 }
 
-void RobotMemory::exec_update(std::string query_string, std::string update_string)
-{
-  exec_update(query_string, update_string, collection_);
-}
-void RobotMemory::exec_update(std::string query_string, std::string update_string,
+void RobotMemory::update(std::string query_string, std::string update_string,
                                     std::string collection)
 {
-  logger_->log_info(name_, "Executing Update %s for query %s",
-                   update_string.c_str(), query_string.c_str());
+  if(collection == "")
+  {
+    collection = default_collection_;
+  }
+  logger_->log_info(name_, "Executing Update %s for query %s on collection %s",
+                   update_string.c_str(), query_string.c_str(), collection);
 
   //only one query at a time
   MutexLocker lock(mutex_);
@@ -201,14 +201,14 @@ void RobotMemory::exec_update(std::string query_string, std::string update_strin
   }
 }
 
-void RobotMemory::exec_remove(std::string query_string)
-{
-  exec_remove(query_string, collection_);
-}
-
-void RobotMemory::exec_remove(std::string query_string, std::string collection)
+void RobotMemory::remove(std::string query_string, std::string collection)
 {
-  logger_->log_info(name_, "Executing Remove: %s", query_string.c_str());
+  if(collection == "")
+  {
+    collection = default_collection_;
+  }
+  logger_->log_info(name_, "Executing Remove %s on collection %s",
+                    query_string.c_str(), collection);
 
   //only one query at a time
   MutexLocker lock(mutex_);
diff --git a/src/plugins/robot-memory/robot_memory.h b/src/plugins/robot-memory/robot_memory.h
index 7eb00ee..8584de1 100644
--- a/src/plugins/robot-memory/robot_memory.h
+++ b/src/plugins/robot-memory/robot_memory.h
@@ -48,14 +48,10 @@ class RobotMemory
     virtual ~RobotMemory();
 
     //robot memory functions
-    void exec_query(std::string query, std::string collection);
-    void exec_query(std::string query);
-    void exec_insert(std::string insert, std::string collection);
-    void exec_insert(std::string insert);
-    void exec_update(std::string query, std::string update, std::string collection);
-    void exec_update(std::string query, std::string update);
-    void exec_remove(std::string query, std::string collection);
-    void exec_remove(std::string query);
+    void query(std::string query, std::string collection = "");
+    void insert(std::string insert, std::string collection = "");
+    void update(std::string query, std::string update, std::string collection = "");
+    void remove(std::string query, std::string collection = "");
 
   private:
     mongo::DBClientBase* mongodb_client_;
@@ -65,7 +61,7 @@ class RobotMemory
     fawkes::BlackBoard* blackboard_;
 
     const char* name_ = "RobotMemory";
-    std::string collection_;
+    std::string default_collection_;
     fawkes::Mutex *mutex_;
     fawkes::RobotMemoryInterface* rm_if_;
 
diff --git a/src/plugins/robot-memory/robot_memory_thread.cpp b/src/plugins/robot-memory/robot_memory_thread.cpp
index 8bf74ec..5ba2c0c 100644
--- a/src/plugins/robot-memory/robot_memory_thread.cpp
+++ b/src/plugins/robot-memory/robot_memory_thread.cpp
@@ -74,16 +74,16 @@ RobotMemoryThread::loop()
   while (! robot_memory->rm_if_->msgq_empty() ) {
     if (robot_memory->rm_if_->msgq_first_is<RobotMemoryInterface::QueryMessage>()) {
 	    RobotMemoryInterface::QueryMessage* msg = (RobotMemoryInterface::QueryMessage*) robot_memory->rm_if_->msgq_first();
-	    robot_memory->exec_query(msg->query());
+	    robot_memory->query(msg->query());
     } else if (robot_memory->rm_if_->msgq_first_is<RobotMemoryInterface::InsertMessage>()) {
 	    RobotMemoryInterface::InsertMessage* msg = (RobotMemoryInterface::InsertMessage*) robot_memory->rm_if_->msgq_first();
-	    robot_memory->exec_insert(msg->insert());
+	    robot_memory->insert(msg->insert());
     } else if (robot_memory->rm_if_->msgq_first_is<RobotMemoryInterface::UpdateMessage>()) {
 	    RobotMemoryInterface::UpdateMessage* msg = (RobotMemoryInterface::UpdateMessage*) robot_memory->rm_if_->msgq_first();
-	    robot_memory->exec_update(msg->query(), msg->update());
+	    robot_memory->update(msg->query(), msg->update());
     } else if (robot_memory->rm_if_->msgq_first_is<RobotMemoryInterface::RemoveMessage>()) {
 	    RobotMemoryInterface::RemoveMessage* msg = (RobotMemoryInterface::RemoveMessage*) robot_memory->rm_if_->msgq_first();
-	    robot_memory->exec_remove(msg->query());
+	    robot_memory->remove(msg->query());
     } else {
       logger->log_warn(name(), "Unknown message received");
     }

- *commit* 43c0ff74262a4175f7ef4311440e09b2d3fb979f - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Wed Aug 24 14:03:51 2016 +0200
Subject: gtest: tool for unit testing in a running fawkes environment

 .../robot-memory/tests => tools/gtest}/Makefile    |   21 ++++---
 src/tools/gtest/gtest_fawkes.cpp                   |   70 ++++++++++++++++++++
 2 files changed, 82 insertions(+), 9 deletions(-)


- *commit* fd1d110a8cb83eb931efce4056f47e1ca531cc26 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Wed Aug 24 14:59:22 2016 +0200
Subject: robot-memory: created gtest plugin to run tests in fawkes

 .../aspect => robot-memory/test-plugin}/Makefile   |   21 +++---
 .../robot_memory_test_plugin.cpp}                  |   38 +++++------
 .../test-plugin/robot_memory_test_thread.cpp       |   67 ++++++++++++++++++++
 .../test-plugin/robot_memory_test_thread.h}        |   33 ++++++----
 src/plugins/robot-memory/tests/Makefile            |   45 -------------
 .../robot-memory/tests/robot_memory_test.cpp       |   34 ----------
 6 files changed, 116 insertions(+), 122 deletions(-)


- *commit* 0121b82476f370d33e5cd1c58cc5a55d2aa083a1 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Wed Aug 24 17:40:48 2016 +0200
Subject: robot-memory-test: provide environment with access to the RobotMemory

 src/plugins/robot-memory/test-plugin/Makefile      |   24 +++++++--
 .../test-plugin/robot_memory_test.cpp}             |   40 +++++++++-----
 .../robot-memory/test-plugin/robot_memory_test.h   |   56 ++++++++++++++++++++
 .../test-plugin/robot_memory_test_thread.cpp       |   10 ++--
 .../test-plugin/robot_memory_test_thread.h         |   10 ++--
 5 files changed, 112 insertions(+), 28 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/robot-memory/test-plugin/Makefile b/src/plugins/robot-memory/test-plugin/Makefile
index 377737c..546954c 100644
--- a/src/plugins/robot-memory/test-plugin/Makefile
+++ b/src/plugins/robot-memory/test-plugin/Makefile
@@ -19,12 +19,28 @@ include $(BASEDIR)/etc/buildsys/config.mk
 include $(BASEDIR)/etc/buildsys/gtest.mk
 
 LIBS_robot_memory_test = m fawkescore fawkesutils fawkesaspects fawkesbaseapp \
-                      fawkesblackboard fawkesinterface
+                      fawkesblackboard fawkesinterface fawkesrobotmemory
 
-OBJS_robot_memory_test = robot_memory_test_plugin.o robot_memory_test_thread.o
-
-PLUGINS_all = $(PLUGINDIR)/robot_memory_test.$(SOEXT)
+OBJS_robot_memory_test = robot_memory_test_plugin.o robot_memory_test_thread.o robot_memory_test.o
 
 OBJS_all = $(OBJS_robot_memory_test)
 
+ifeq ($(HAVE_GTEST)$(HAVE_CPP11),11)
+  CFLAGS += $(CFLAGS_GTEST)
+  CFLAGS += $(CFLAGS_CPP11)
+  LDFLAGS += $(LDFLAGS_GTEST)
+  PLUGINS_all = $(PLUGINDIR)/robot_memory_test.$(SOEXT)
+else
+  WARN_TARGETS += warning_gtest
+endif
+
+ifeq ($(OBJSSUBMAKE),1)
+test: $(WARN_TARGETS)
+
+.PHONY: warning_gtest
+warning_gtest:
+	$(SILENT)echo -e "$(INDENT_PRINT)--> $(TRED)Omitting unit tests for Robot Memory$(TNORMAL) (gtest or cpp11 not available)"
+
+endif
+
 include $(BUILDSYSDIR)/base.mk
\ No newline at end of file
diff --git a/src/plugins/robot-memory/test-plugin/robot_memory_test_thread.cpp b/src/plugins/robot-memory/test-plugin/robot_memory_test_thread.cpp
index 5a31270..2a3d7c3 100644
--- a/src/plugins/robot-memory/test-plugin/robot_memory_test_thread.cpp
+++ b/src/plugins/robot-memory/test-plugin/robot_memory_test_thread.cpp
@@ -39,14 +39,14 @@ RobotMemoryTestThread::RobotMemoryTestThread()
 {
 }
 
-TEST(GTestTest, TestsWorking)
-{
-  ASSERT_EQ(1, 3-2);
-}
-
 void
 RobotMemoryTestThread::init()
 {
+  //prepare tests
+  logger->log_warn(name(), "Preparing tests");
+  test_env_ = new RobotMemoryTestEnvironment(robot_memory);
+  ::testing::AddGlobalTestEnvironment((testing::Environment*) test_env_);
+
   logger->log_warn(name(), "Starting tests");
   test_result_ = RUN_ALL_TESTS();
 }
diff --git a/src/plugins/robot-memory/test-plugin/robot_memory_test_thread.h b/src/plugins/robot-memory/test-plugin/robot_memory_test_thread.h
index d574bff..769d47f 100644
--- a/src/plugins/robot-memory/test-plugin/robot_memory_test_thread.h
+++ b/src/plugins/robot-memory/test-plugin/robot_memory_test_thread.h
@@ -29,19 +29,19 @@
 #include <aspect/logging.h>
 #include <aspect/blackboard.h>
 #include <aspect/configurable.h>
-
 #include <string>
 
+#include "plugins/robot-memory/aspect/robot_memory_aspect.h"
+#include "robot_memory_test.h"
 
-namespace fawkes {
-}
 
 class RobotMemoryTestThread 
 : public fawkes::Thread,
   public fawkes::BlockedTimingAspect,
   public fawkes::LoggingAspect,
   public fawkes::ConfigurableAspect,
-  public fawkes::BlackBoardAspect
+  public fawkes::BlackBoardAspect,
+  public fawkes::RobotMemoryAspect
 {
 
  public:
@@ -57,6 +57,8 @@ class RobotMemoryTestThread
  private:
   int test_result_;
 
+  //environment to make objects available for testing
+  RobotMemoryTestEnvironment* test_env_;
 };
 
 

- *commit* aedae1b4e6c33806c65789fe094d22c5c5e528ea - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Thu Aug 25 02:16:47 2016 +0200
Subject: robot-memory: appropriate return values for query,insert,update,remove

 src/plugins/robot-memory/robot_memory.cpp |   66 ++++++++++++++---------------
 src/plugins/robot-memory/robot_memory.h   |   12 ++++--
 2 files changed, 40 insertions(+), 38 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/robot-memory/robot_memory.cpp b/src/plugins/robot-memory/robot_memory.cpp
index d460f5a..d6bd428 100644
--- a/src/plugins/robot-memory/robot_memory.cpp
+++ b/src/plugins/robot-memory/robot_memory.cpp
@@ -54,7 +54,7 @@ void RobotMemory::init()
   logger_->log_info(name_, "Started RobotMemory");
   default_collection_ = "fawkes.msglog";
   try {
-    default_collection_ = config_->get_string("/plugins/mongodb/test-collection");
+    default_collection_ = config_->get_string("/plugins/robot-memory/default-collection");
   } catch (Exception &e) {}
 
   //init blackboard interface
@@ -64,7 +64,7 @@ void RobotMemory::init()
   rm_if_->write();
 }
 
-void RobotMemory::query(std::string query_string, std::string collection)
+QResCursor RobotMemory::query(std::string query_string, std::string collection)
 {
   if(collection == "")
   {
@@ -82,47 +82,39 @@ void RobotMemory::query(std::string query_string, std::string collection)
   } catch (DBException &e) {
     logger_->log_error(name_, "Can't parse query_string '%s'\n Exception: %s",
                       query_string.c_str(), e.toString().c_str());
-    return;
+    return NULL;
   }
 
-  //introspect query
-  log(query, "executing query:");
+//  //introspect query
+//  log(query, "executing query:");
 
-  //check if virtual knowledge is queried
-  //rename field in query
-  if(query.getFilter().hasField("class")){
-    set_fields(query, std::string("{type:\"") +
-               query.getFilter()["class"].String() + "\"}");
-    remove_field(query, "class");
-  }
-  log(query, "Virtual query:");
 //  //TODO: computation on demand
+//  //check if virtual knowledge is queried
+//  //rename field in query
+//  if(query.getFilter().hasField("class")){
+//    set_fields(query, std::string("{type:\"") +
+//               query.getFilter()["class"].String() + "\"}");
+//    remove_field(query, "class");
+//  }
+//
 //  if(query.getFilter().hasField("bbinterface")){
 //    collection = config->get_string("plugins/robot-memory/blackboard-collection");
 //    gen_blackboard_data(query.getFilter()["bbinterface"].String());
 //  }
-  log(query, "Virtual query:");
 
   //actually execute query
-  std::unique_ptr<DBClientCursor> cursor;
+  QResCursor cursor;
   try{
     cursor = mongodb_client_->query(collection, query);
   } catch (DBException &e) {
     logger_->log_error(name_, "Error for query %s\n Exception: %s",
                       query_string.c_str(), e.toString().c_str());
-    return;
-  }
-
-  if(cursor->more()){
-    BSONObj res = cursor->next();
-    logger_->log_info(name_, "Query One result:\n%s", res.toString().c_str());
-  }
-  else {
-    logger_->log_info(name_, "Query result empty");
+    return NULL;
   }
+  return cursor;
 }
 
-void RobotMemory::insert(std::string insert_string, std::string collection)
+int RobotMemory::insert(std::string insert_string, std::string collection)
 {
   if(collection == "")
   {
@@ -140,7 +132,7 @@ void RobotMemory::insert(std::string insert_string, std::string collection)
   } catch (DBException &e) {
     logger_->log_error(name_, "Can't parse insert_string '%s'\n Exception: %s",
                       insert_string.c_str(), e.toString().c_str());
-    return;
+    return 0;
   }
 
   log(obj, "Inserting:");
@@ -153,11 +145,13 @@ void RobotMemory::insert(std::string insert_string, std::string collection)
   } catch (DBException &e) {
     logger_->log_error(name_, "Error for insert %s\n Exception: %s",
                       insert_string.c_str(), e.toString().c_str());
-    return;
+    return 0;
   }
+  //return success
+  return 1;
 }
 
-void RobotMemory::update(std::string query_string, std::string update_string,
+int RobotMemory::update(std::string query_string, std::string update_string,
                                     std::string collection)
 {
   if(collection == "")
@@ -177,7 +171,7 @@ void RobotMemory::update(std::string query_string, std::string update_string,
   } catch (DBException &e) {
     logger_->log_error(name_, "Can't parse query_string '%s'\n Exception: %s",
                       query_string.c_str(), e.toString().c_str());
-    return;
+    return 0;
   }
   BSONObj update;
   try{
@@ -185,7 +179,7 @@ void RobotMemory::update(std::string query_string, std::string update_string,
   } catch (DBException &e) {
     logger_->log_error(name_, "Can't parse update_string '%s'\n Exception: %s",
                       update_string.c_str(), e.toString().c_str());
-    return;
+    return 0;
   }
 
   log(query, "Updating documents for query:");
@@ -197,11 +191,13 @@ void RobotMemory::update(std::string query_string, std::string update_string,
   } catch (DBException &e) {
     logger_->log_error(name_, "Error for update %s for query %s\n Exception: %s",
                       update_string.c_str(), query_string.c_str(), e.toString().c_str());
-    return;
+    return 0;
   }
+  //return success
+  return 1;
 }
 
-void RobotMemory::remove(std::string query_string, std::string collection)
+int RobotMemory::remove(std::string query_string, std::string collection)
 {
   if(collection == "")
   {
@@ -220,7 +216,7 @@ void RobotMemory::remove(std::string query_string, std::string collection)
   } catch (DBException &e) {
     logger_->log_error(name_, "Can't parse query_string '%s'\n Exception: %s",
                       query_string.c_str(), e.toString().c_str());
-    return;
+    return 0;
   }
 
   //introspect
@@ -232,8 +228,10 @@ void RobotMemory::remove(std::string query_string, std::string collection)
   } catch (DBException &e) {
     logger_->log_error(name_, "Error for query %s\n Exception: %s",
                       query_string.c_str(), e.toString().c_str());
-    return;
+    return 0;
   }
+  //return success
+  return 1;
 }
 
 void
diff --git a/src/plugins/robot-memory/robot_memory.h b/src/plugins/robot-memory/robot_memory.h
index 8584de1..c216df7 100644
--- a/src/plugins/robot-memory/robot_memory.h
+++ b/src/plugins/robot-memory/robot_memory.h
@@ -25,6 +25,7 @@
 #include <aspect/configurable.h>
 #include <aspect/logging.h>
 #include <aspect/blackboard.h>
+#include <memory>
 
 #include <mongo/client/dbclient.h>
 #include "interfaces/RobotMemoryInterface.h"
@@ -34,6 +35,9 @@ namespace fawkes {
   class RobotMemoryInterface;
 }
 
+///typedef for shorter type description
+typedef std::unique_ptr<mongo::DBClientCursor> QResCursor;
+
 /*
  *
  */
@@ -48,10 +52,10 @@ class RobotMemory
     virtual ~RobotMemory();
 
     //robot memory functions
-    void query(std::string query, std::string collection = "");
-    void insert(std::string insert, std::string collection = "");
-    void update(std::string query, std::string update, std::string collection = "");
-    void remove(std::string query, std::string collection = "");
+    QResCursor query(std::string query, std::string collection = "");
+    int insert(std::string insert, std::string collection = "");
+    int update(std::string query, std::string update, std::string collection = "");
+    int remove(std::string query, std::string collection = "");
 
   private:
     mongo::DBClientBase* mongodb_client_;

- *commit* a184dc8ad586101023be35bca4c8cb577ba45e42 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Thu Aug 25 02:19:47 2016 +0200
Subject: robot-memory-tests: added tests for query,insert,update,remove

 src/plugins/robot-memory/Makefile                  |    1 +
 .../robot-memory/test-plugin/robot_memory_test.cpp |   99 +++++++++++++++++++-
 .../robot-memory/test-plugin/robot_memory_test.h   |    3 +
 3 files changed, 102 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/robot-memory/Makefile b/src/plugins/robot-memory/Makefile
index 6deb5cb..84453a7 100644
--- a/src/plugins/robot-memory/Makefile
+++ b/src/plugins/robot-memory/Makefile
@@ -20,6 +20,7 @@ include $(BUILDCONFDIR)/tf/tf.mk
 include $(BASEDIR)/src/plugins/mongodb/mongodb.mk
 
 PRESUBDIRS = interfaces aspect
+SUBDIRS = test-plugin
 
 LIBS_robot_memory = fawkescore fawkesaspects fawkesblackboard fawkesinterface \
 		fawkesutils fawkeslogging fawkesmongodbaspect fvutils \
diff --git a/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp b/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp
index 06888ea..e326900 100644
--- a/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp
+++ b/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp
@@ -24,7 +24,8 @@
 //init static variable
 RobotMemory* RobotMemoryTestEnvironment::robot_memory = NULL;
 
-
+using namespace fawkes;
+using namespace mongo;
 
 /**
  * Setup for each test
@@ -44,6 +45,102 @@ TEST_F(RobotMemoryTest, AspectAvailable)
   ASSERT_FALSE(robot_memory==NULL);
 }
 
+TEST_F(RobotMemoryTest, QueryResultEmpty)
+{
+  QResCursor qres = robot_memory->query("{somekey:'should_not_exist'}");
+  ASSERT_FALSE(qres->more());
+}
+
+TEST_F(RobotMemoryTest, StoreAndQuery)
+{
+  ASSERT_TRUE(robot_memory->insert("{'testkey':'value'}"));
+  QResCursor qres = robot_memory->query("{'testkey':'value'}");
+  ASSERT_TRUE(qres->more());
+  ASSERT_TRUE(contains_pairs(qres->next(), fromjson("{'testkey':'value'}")));
+}
 
+TEST_F(RobotMemoryTest, StoreAndQueryOtherCollection)
+{
+  ASSERT_TRUE(robot_memory->insert("{'testkey':'value'}", "robmem.othercollection"));
+  QResCursor qres = robot_memory->query("{'testkey':'value'}", "robmem.othercollection");
+  ASSERT_TRUE(qres->more());
+  ASSERT_TRUE(contains_pairs(qres->next(), fromjson("{'testkey':'value'}")));
+}
 
+TEST_F(RobotMemoryTest, StoreUpdateQuery)
+{
+  ASSERT_TRUE(robot_memory->insert("{'inserting':'something',as:0.5}"));
+  ASSERT_TRUE(robot_memory->update("{'inserting':'something',as:0.5}",
+      "{'updated':'something',as:3.0,extra:true}"));
+  QResCursor qres = robot_memory->query("{'updated':'something'}");
+  ASSERT_TRUE(qres->more());
+  ASSERT_TRUE(contains_pairs(qres->next(), fromjson(
+      "{'updated':'something',as:3.0,extra:true}")));
+}
+
+TEST_F(RobotMemoryTest, StoreRemoveQuery)
+{
+  ASSERT_TRUE(robot_memory->insert("{to_be:'removed'}"));
+  ASSERT_TRUE(robot_memory->remove("{to_be:'removed'}"));
+  QResCursor qres = robot_memory->query("{to_be:'removed'}");
+  ASSERT_FALSE(qres->more());
+}
+
+TEST_F(RobotMemoryTest, QueryInvalidCaught)
+{
+  ASSERT_EQ(robot_memory->query("{key:'not existing'}"), NULL);
+}
+
+TEST_F(RobotMemoryTest, InsertInvalidCaught)
+{
+  ASSERT_NO_THROW(robot_memory->insert("{'testkey'::'value'}"));
+  ASSERT_FALSE(robot_memory->insert("warbagarbl"));
+}
 
+TEST_F(RobotMemoryTest, UpdateInvalidCaught)
+{
+  ASSERT_NO_THROW(robot_memory->update("{'testkey'::'value'}",
+      "{'key':'update'}"));
+  ASSERT_NO_THROW(robot_memory->update("{'testkey':'good'}",
+      "{'bad':1.2.3}"));
+  ASSERT_FALSE(robot_memory->update("{([})]", "{'key':4}"));
+  ASSERT_FALSE(robot_memory->update("{'key':'valid'}", "invalid!"));
+}
+
+TEST_F(RobotMemoryTest, RemoveInvalidCaught)
+{
+  ASSERT_NO_THROW(robot_memory->remove("{____:4.56}"));
+  ASSERT_FALSE(robot_memory->remove("{([})]"));
+}
+
+TEST_F(RobotMemoryTest, AggregationQuery)
+{
+  //TODO: implement
+}
+
+TEST_F(RobotMemoryTest, MapReduceQuery)
+{
+  //TODO: implement
+}
+
+TEST_F(RobotMemoryTest, JavaScriptQuery)
+{
+  //TODO: implement
+}
+
+
+::testing::AssertionResult RobotMemoryTest::contains_pairs(BSONObj obj, BSONObj exp)
+{
+  for(BSONObjIterator it = exp.begin(); it.more();)
+  {
+    BSONElement kvpair = it.next();
+    printf("checking %s\n", kvpair.toString().c_str());
+    if(!obj.hasElement(kvpair.fieldName())
+        || obj.getField(kvpair.fieldName()) != kvpair)
+    {
+      return ::testing::AssertionFailure() << obj.toString()
+          << " does not include {" << kvpair.toString() << "}";
+    }
+  }
+  return ::testing::AssertionSuccess();
+}
diff --git a/src/plugins/robot-memory/test-plugin/robot_memory_test.h b/src/plugins/robot-memory/test-plugin/robot_memory_test.h
index 3b0a902..d28dcca 100644
--- a/src/plugins/robot-memory/test-plugin/robot_memory_test.h
+++ b/src/plugins/robot-memory/test-plugin/robot_memory_test.h
@@ -50,6 +50,9 @@ class RobotMemoryTest : public ::testing::Test
  protected:
   virtual void SetUp();
   RobotMemory* robot_memory;
+
+ protected:
+  ::testing::AssertionResult contains_pairs(mongo::BSONObj obj, mongo::BSONObj exp);
 };
 
 

- *commit* 6b6a1772bf007d4b0be9e9d75f8870c16bd4fa04 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Thu Aug 25 21:57:23 2016 +0200
Subject: robot-memory: configurable debug output

 cfg/conf.d/robot-memory.yaml                       |    3 +-
 src/plugins/robot-memory/robot_memory.cpp          |  104 ++++++++++++++------
 src/plugins/robot-memory/robot_memory.h            |    1 +
 .../robot-memory/test-plugin/robot_memory_test.cpp |    3 +-
 .../robot-memory/test-plugin/robot_memory_test.h   |    2 +-
 5 files changed, 78 insertions(+), 35 deletions(-)

_Diff for modified files_:
diff --git a/cfg/conf.d/robot-memory.yaml b/cfg/conf.d/robot-memory.yaml
index 03e1f8e..51c959b 100644
--- a/cfg/conf.d/robot-memory.yaml
+++ b/cfg/conf.d/robot-memory.yaml
@@ -6,7 +6,8 @@ doc-url: !url http://trac.fawkesrobotics.org/wiki/Plugins/robot-memory
 plugins/robot-memory:
 
   database: fawkes
-  test-collection: "robmem.test"
+  default-collection: "robmem.test"
   interface-name: "memory"
+  more-debug-output: true
 
   blackboard-collection: "robmem.bb"
\ No newline at end of file
diff --git a/src/plugins/robot-memory/robot_memory.cpp b/src/plugins/robot-memory/robot_memory.cpp
index d6bd428..e3024c9 100644
--- a/src/plugins/robot-memory/robot_memory.cpp
+++ b/src/plugins/robot-memory/robot_memory.cpp
@@ -40,6 +40,7 @@ RobotMemory::RobotMemory(fawkes::Configuration* config, fawkes::Logger* logger,
   clock_ = clock;
   mongodb_client_ = mongodb_client;
   blackboard_ = blackboard;
+  debug_ = false;
 }
 
 RobotMemory::~RobotMemory()
@@ -56,12 +57,20 @@ void RobotMemory::init()
   try {
     default_collection_ = config_->get_string("/plugins/robot-memory/default-collection");
   } catch (Exception &e) {}
+  try {
+    debug_ = config_->get_bool("/plugins/robot-memory/more-debug-output");
+  } catch (Exception &e) {}
 
   //init blackboard interface
   rm_if_ = blackboard_->open_for_writing<RobotMemoryInterface>(config_->get_string("/plugins/robot-memory/interface-name").c_str());
   rm_if_->set_error("");
   rm_if_->set_result("");
   rm_if_->write();
+
+  if(debug_)
+  {
+    logger_->log_info(name_, "Initialized RobotMemory");
+  }
 }
 
 QResCursor RobotMemory::query(std::string query_string, std::string collection)
@@ -70,7 +79,10 @@ QResCursor RobotMemory::query(std::string query_string, std::string collection)
   {
     collection = default_collection_;
   }
-  logger_->log_info(name_, "Executing Query %s on collection %s", query_string.c_str(), collection);
+  if(debug_)
+  {
+    logger_->log_info(name_, "Executing Query %s on collection %s", query_string.c_str(), collection);
+  }
 
   //only one query at a time
   MutexLocker lock(mutex_);
@@ -80,8 +92,11 @@ QResCursor RobotMemory::query(std::string query_string, std::string collection)
   try{
     query = Query(query_string);
   } catch (DBException &e) {
-    logger_->log_error(name_, "Can't parse query_string '%s'\n Exception: %s",
-                      query_string.c_str(), e.toString().c_str());
+    if(debug_)
+    {
+      logger_->log_error(name_, "Can't parse query_string '%s'\n Exception: %s",
+          query_string.c_str(), e.toString().c_str());
+    }
     return NULL;
   }
 
@@ -107,8 +122,11 @@ QResCursor RobotMemory::query(std::string query_string, std::string collection)
   try{
     cursor = mongodb_client_->query(collection, query);
   } catch (DBException &e) {
-    logger_->log_error(name_, "Error for query %s\n Exception: %s",
-                      query_string.c_str(), e.toString().c_str());
+    if(debug_)
+    {
+      logger_->log_error(name_, "Error for query %s\n Exception: %s",
+          query_string.c_str(), e.toString().c_str());
+    }
     return NULL;
   }
   return cursor;
@@ -120,7 +138,10 @@ int RobotMemory::insert(std::string insert_string, std::string collection)
   {
     collection = default_collection_;
   }
-  logger_->log_info(name_, "Executing Query %s on collection %s", insert_string.c_str(), collection);
+  if(debug_)
+  {
+    logger_->log_info(name_, "Executing Query %s on collection %s", insert_string.c_str(), collection);
+  }
 
   //only one query at a time
   MutexLocker lock(mutex_);
@@ -130,21 +151,25 @@ int RobotMemory::insert(std::string insert_string, std::string collection)
   try{
     obj = fromjson(insert_string);
   } catch (DBException &e) {
-    logger_->log_error(name_, "Can't parse insert_string '%s'\n Exception: %s",
-                      insert_string.c_str(), e.toString().c_str());
+    if(debug_)
+    {
+      logger_->log_error(name_, "Can't parse insert_string '%s'\n Exception: %s",
+          insert_string.c_str(), e.toString().c_str());
+    }
     return 0;
   }
 
-  log(obj, "Inserting:");
   set_fields(obj, "{type: \"test\"}");
-  log(obj, "Updated Inserting:");
 
   //actually execute insert
   try{
     mongodb_client_->insert(collection, obj);
   } catch (DBException &e) {
-    logger_->log_error(name_, "Error for insert %s\n Exception: %s",
-                      insert_string.c_str(), e.toString().c_str());
+    if(debug_)
+    {
+      logger_->log_error(name_, "Error for insert %s\n Exception: %s",
+          insert_string.c_str(), e.toString().c_str());
+    }
     return 0;
   }
   //return success
@@ -158,8 +183,11 @@ int RobotMemory::update(std::string query_string, std::string update_string,
   {
     collection = default_collection_;
   }
-  logger_->log_info(name_, "Executing Update %s for query %s on collection %s",
-                   update_string.c_str(), query_string.c_str(), collection);
+  if(debug_)
+  {
+    logger_->log_info(name_, "Executing Update %s for query %s on collection %s",
+        update_string.c_str(), query_string.c_str(), collection);
+  }
 
   //only one query at a time
   MutexLocker lock(mutex_);
@@ -169,28 +197,34 @@ int RobotMemory::update(std::string query_string, std::string update_string,
   try{
     query = Query(query_string);
   } catch (DBException &e) {
-    logger_->log_error(name_, "Can't parse query_string '%s'\n Exception: %s",
-                      query_string.c_str(), e.toString().c_str());
+    if(debug_)
+    {
+      logger_->log_error(name_, "Can't parse query_string '%s'\n Exception: %s",
+          query_string.c_str(), e.toString().c_str());
+    }
     return 0;
   }
   BSONObj update;
   try{
     update = fromjson(update_string);
   } catch (DBException &e) {
-    logger_->log_error(name_, "Can't parse update_string '%s'\n Exception: %s",
-                      update_string.c_str(), e.toString().c_str());
+    if(debug_)
+    {
+      logger_->log_error(name_, "Can't parse update_string '%s'\n Exception: %s",
+          update_string.c_str(), e.toString().c_str());
+    }
     return 0;
   }
 
-  log(query, "Updating documents for query:");
-  log(update, "Updating with:");
-
   //actually execute update
   try{
     mongodb_client_->update(collection, query, update);
   } catch (DBException &e) {
-    logger_->log_error(name_, "Error for update %s for query %s\n Exception: %s",
-                      update_string.c_str(), query_string.c_str(), e.toString().c_str());
+    if(debug_)
+    {
+      logger_->log_error(name_, "Error for update %s for query %s\n Exception: %s",
+          update_string.c_str(), query_string.c_str(), e.toString().c_str());
+    }
     return 0;
   }
   //return success
@@ -203,8 +237,11 @@ int RobotMemory::remove(std::string query_string, std::string collection)
   {
     collection = default_collection_;
   }
-  logger_->log_info(name_, "Executing Remove %s on collection %s",
-                    query_string.c_str(), collection);
+  if(debug_)
+  {
+    logger_->log_info(name_, "Executing Remove %s on collection %s",
+        query_string.c_str(), collection);
+  }
 
   //only one query at a time
   MutexLocker lock(mutex_);
@@ -214,20 +251,23 @@ int RobotMemory::remove(std::string query_string, std::string collection)
   try{
     query = Query(query_string);
   } catch (DBException &e) {
-    logger_->log_error(name_, "Can't parse query_string '%s'\n Exception: %s",
-                      query_string.c_str(), e.toString().c_str());
+    if(debug_)
+    {
+      logger_->log_error(name_, "Can't parse query_string '%s'\n Exception: %s",
+          query_string.c_str(), e.toString().c_str());
+    }
     return 0;
   }
 
-  //introspect
-  log(query, "Removing documents for query:");
-
   //actually execute remove
   try{
     mongodb_client_->remove(collection, query);
   } catch (DBException &e) {
-    logger_->log_error(name_, "Error for query %s\n Exception: %s",
-                      query_string.c_str(), e.toString().c_str());
+    if(debug_)
+    {
+      logger_->log_error(name_, "Error for query %s\n Exception: %s",
+          query_string.c_str(), e.toString().c_str());
+    }
     return 0;
   }
   //return success
diff --git a/src/plugins/robot-memory/robot_memory.h b/src/plugins/robot-memory/robot_memory.h
index c216df7..7a095f4 100644
--- a/src/plugins/robot-memory/robot_memory.h
+++ b/src/plugins/robot-memory/robot_memory.h
@@ -66,6 +66,7 @@ class RobotMemory
 
     const char* name_ = "RobotMemory";
     std::string default_collection_;
+    bool debug_;
     fawkes::Mutex *mutex_;
     fawkes::RobotMemoryInterface* rm_if_;
 
diff --git a/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp b/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp
index e326900..6f8f68e 100644
--- a/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp
+++ b/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp
@@ -47,6 +47,7 @@ TEST_F(RobotMemoryTest, AspectAvailable)
 
 TEST_F(RobotMemoryTest, QueryResultEmpty)
 {
+  ASSERT_TRUE(robot_memory->insert("{'insert':'something to have the namespace'}"));
   QResCursor qres = robot_memory->query("{somekey:'should_not_exist'}");
   ASSERT_FALSE(qres->more());
 }
@@ -88,7 +89,7 @@ TEST_F(RobotMemoryTest, StoreRemoveQuery)
 
 TEST_F(RobotMemoryTest, QueryInvalidCaught)
 {
-  ASSERT_EQ(robot_memory->query("{key:'not existing'}"), NULL);
+  ASSERT_FALSE(robot_memory->query("{key-:+'not existing'}"));
 }
 
 TEST_F(RobotMemoryTest, InsertInvalidCaught)
diff --git a/src/plugins/robot-memory/test-plugin/robot_memory_test.h b/src/plugins/robot-memory/test-plugin/robot_memory_test.h
index d28dcca..a9cdb07 100644
--- a/src/plugins/robot-memory/test-plugin/robot_memory_test.h
+++ b/src/plugins/robot-memory/test-plugin/robot_memory_test.h
@@ -38,7 +38,7 @@ class RobotMemoryTestEnvironment : public ::testing::Environment
   }
   virtual ~RobotMemoryTestEnvironment() {}
   void SetUp() {}
-  virtual void TearDown() {}
+  virtual void TearDown(){}
  public:
   static RobotMemory* robot_memory;
 };

- *commit* d8a0684480e717cd1b12178067cbe4a1e1b10806 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Thu Aug 25 21:57:57 2016 +0200
Subject: robot-memory-test: properly quit fawkes when tests finished

 .../test-plugin/robot_memory_test_thread.cpp       |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/robot-memory/test-plugin/robot_memory_test_thread.cpp b/src/plugins/robot-memory/test-plugin/robot_memory_test_thread.cpp
index 2a3d7c3..5bedac1 100644
--- a/src/plugins/robot-memory/test-plugin/robot_memory_test_thread.cpp
+++ b/src/plugins/robot-memory/test-plugin/robot_memory_test_thread.cpp
@@ -23,7 +23,7 @@
 
 #include "robot_memory_test_thread.h"
 #include <core/exception.h>
-
+#include <baseapp/run.h>
 #include <gtest/gtest.h>
 
 using namespace fawkes;
@@ -54,10 +54,9 @@ RobotMemoryTestThread::init()
 void
 RobotMemoryTestThread::loop()
 {
-  logger->log_warn(name(), "Finished tests with result %d, shutting down...", test_result_);
-
-  //stop fawkes by throwing an exception
-  throw fawkes::Exception("Stopping Fawkes after running tests in %s", name());
+  logger->log_warn(name(), "Finished tests with, quitting as intended...");
+  //stop fawkes to finish the testing run
+  fawkes::runtime::quit();
 }
 
 void

- *commit* 5bf7f961a90888869504f86b926602ad9ac2e766 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Fri Aug 26 19:05:37 2016 +0200
Subject: robot-memory: better logging functions

 src/plugins/robot-memory/robot_memory.cpp |  154 +++++++++++++++--------------
 src/plugins/robot-memory/robot_memory.h   |   11 ++-
 2 files changed, 89 insertions(+), 76 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/robot-memory/robot_memory.cpp b/src/plugins/robot-memory/robot_memory.cpp
index e3024c9..b4f39ff 100644
--- a/src/plugins/robot-memory/robot_memory.cpp
+++ b/src/plugins/robot-memory/robot_memory.cpp
@@ -52,14 +52,18 @@ RobotMemory::~RobotMemory()
 void RobotMemory::init()
 {
   //load config values
-  logger_->log_info(name_, "Started RobotMemory");
-  default_collection_ = "fawkes.msglog";
+  log("Started RobotMemory");
+  default_collection_ = "robmem.test";
   try {
     default_collection_ = config_->get_string("/plugins/robot-memory/default-collection");
   } catch (Exception &e) {}
   try {
     debug_ = config_->get_bool("/plugins/robot-memory/more-debug-output");
   } catch (Exception &e) {}
+  database_name_ = "mobmem";
+  try {
+    database_name_ = config_->get_string("/plugins/robot-memory/database");
+  } catch (Exception &e) {}
 
   //init blackboard interface
   rm_if_ = blackboard_->open_for_writing<RobotMemoryInterface>(config_->get_string("/plugins/robot-memory/interface-name").c_str());
@@ -67,10 +71,7 @@ void RobotMemory::init()
   rm_if_->set_result("");
   rm_if_->write();
 
-  if(debug_)
-  {
-    logger_->log_info(name_, "Initialized RobotMemory");
-  }
+  log_deb("Initialized RobotMemory");
 }
 
 QResCursor RobotMemory::query(std::string query_string, std::string collection)
@@ -79,10 +80,7 @@ QResCursor RobotMemory::query(std::string query_string, std::string collection)
   {
     collection = default_collection_;
   }
-  if(debug_)
-  {
-    logger_->log_info(name_, "Executing Query %s on collection %s", query_string.c_str(), collection);
-  }
+  log_deb(std::string("Executing Query "+ query_string+" on collection "+collection));
 
   //only one query at a time
   MutexLocker lock(mutex_);
@@ -92,11 +90,9 @@ QResCursor RobotMemory::query(std::string query_string, std::string collection)
   try{
     query = Query(query_string);
   } catch (DBException &e) {
-    if(debug_)
-    {
-      logger_->log_error(name_, "Can't parse query_string '%s'\n Exception: %s",
-          query_string.c_str(), e.toString().c_str());
-    }
+    std::string error = "Can't parse query_string "
+        + query_string + "\n Exception: " + e.toString();
+    log_deb(error, "error");
     return NULL;
   }
 
@@ -122,11 +118,9 @@ QResCursor RobotMemory::query(std::string query_string, std::string collection)
   try{
     cursor = mongodb_client_->query(collection, query);
   } catch (DBException &e) {
-    if(debug_)
-    {
-      logger_->log_error(name_, "Error for query %s\n Exception: %s",
-          query_string.c_str(), e.toString().c_str());
-    }
+    std::string error = std::string("Error for query ")
+      + query_string + "\n Exception: " + e.toString();
+    log(error, "error");
     return NULL;
   }
   return cursor;
@@ -138,10 +132,8 @@ int RobotMemory::insert(std::string insert_string, std::string collection)
   {
     collection = default_collection_;
   }
-  if(debug_)
-  {
-    logger_->log_info(name_, "Executing Query %s on collection %s", insert_string.c_str(), collection);
-  }
+
+  log_deb(std::string("Executing Query "+ insert_string + " on collection " + collection));
 
   //only one query at a time
   MutexLocker lock(mutex_);
@@ -151,11 +143,9 @@ int RobotMemory::insert(std::string insert_string, std::string collection)
   try{
     obj = fromjson(insert_string);
   } catch (DBException &e) {
-    if(debug_)
-    {
-      logger_->log_error(name_, "Can't parse insert_string '%s'\n Exception: %s",
-          insert_string.c_str(), e.toString().c_str());
-    }
+    std::string error = "Can't parse insert_string "
+        + insert_string + "\n Exception: " + e.toString();
+    log_deb(error, "error");
     return 0;
   }
 
@@ -165,11 +155,9 @@ int RobotMemory::insert(std::string insert_string, std::string collection)
   try{
     mongodb_client_->insert(collection, obj);
   } catch (DBException &e) {
-    if(debug_)
-    {
-      logger_->log_error(name_, "Error for insert %s\n Exception: %s",
-          insert_string.c_str(), e.toString().c_str());
-    }
+    std::string error = "Error for insert " + insert_string
+        + "\n Exception: " + e.toString();
+    log_deb(error, "error");
     return 0;
   }
   //return success
@@ -183,11 +171,7 @@ int RobotMemory::update(std::string query_string, std::string update_string,
   {
     collection = default_collection_;
   }
-  if(debug_)
-  {
-    logger_->log_info(name_, "Executing Update %s for query %s on collection %s",
-        update_string.c_str(), query_string.c_str(), collection);
-  }
+  log_deb(std::string("Executing Update "+update_string+" for query "+query_string+" on collection "+ collection));
 
   //only one query at a time
   MutexLocker lock(mutex_);
@@ -197,22 +181,16 @@ int RobotMemory::update(std::string query_string, std::string update_string,
   try{
     query = Query(query_string);
   } catch (DBException &e) {
-    if(debug_)
-    {
-      logger_->log_error(name_, "Can't parse query_string '%s'\n Exception: %s",
-          query_string.c_str(), e.toString().c_str());
-    }
+    std::string error = "Can't parse query_string " + query_string
+        + "\n Exception: " + e.toString();
+    log_deb(error, "error");
     return 0;
   }
   BSONObj update;
   try{
     update = fromjson(update_string);
   } catch (DBException &e) {
-    if(debug_)
-    {
-      logger_->log_error(name_, "Can't parse update_string '%s'\n Exception: %s",
-          update_string.c_str(), e.toString().c_str());
-    }
+    log_deb(std::string("Can't parse update_string '"+update_string+"'\n Exception: "+e.toString()),"error");
     return 0;
   }
 
@@ -220,11 +198,7 @@ int RobotMemory::update(std::string query_string, std::string update_string,
   try{
     mongodb_client_->update(collection, query, update);
   } catch (DBException &e) {
-    if(debug_)
-    {
-      logger_->log_error(name_, "Error for update %s for query %s\n Exception: %s",
-          update_string.c_str(), query_string.c_str(), e.toString().c_str());
-    }
+    log_deb(std::string("Error for update "+update_string+" for query "+query_string+"\n Exception: "+e.toString()), "error");
     return 0;
   }
   //return success
@@ -237,11 +211,7 @@ int RobotMemory::remove(std::string query_string, std::string collection)
   {
     collection = default_collection_;
   }
-  if(debug_)
-  {
-    logger_->log_info(name_, "Executing Remove %s on collection %s",
-        query_string.c_str(), collection);
-  }
+  log_deb(std::string("Executing Remove "+query_string+" on collection "+collection));
 
   //only one query at a time
   MutexLocker lock(mutex_);
@@ -251,11 +221,7 @@ int RobotMemory::remove(std::string query_string, std::string collection)
   try{
     query = Query(query_string);
   } catch (DBException &e) {
-    if(debug_)
-    {
-      logger_->log_error(name_, "Can't parse query_string '%s'\n Exception: %s",
-          query_string.c_str(), e.toString().c_str());
-    }
+    log_deb(std::string("Can't parse query_string '"+query_string+"'\n Exception: "+e.toString()), "error");
     return 0;
   }
 
@@ -263,19 +229,55 @@ int RobotMemory::remove(std::string query_string, std::string collection)
   try{
     mongodb_client_->remove(collection, query);
   } catch (DBException &e) {
-    if(debug_)
-    {
-      logger_->log_error(name_, "Error for query %s\n Exception: %s",
-          query_string.c_str(), e.toString().c_str());
-    }
+    log_deb(std::string("Error for query "+query_string+"\n Exception: "+e.toString()), "error");
     return 0;
   }
   //return success
   return 1;
 }
 
+int RobotMemory::drop_collection(std::string collection)
+{
+  log_deb("Clearing whole robot memory");
+  return remove("{}", collection);
+}
+
+int RobotMemory::clear_memory()
+{
+  log_deb("Clearing whole robot memory");
+  mongodb_client_->dropDatabase(database_name_);
+  return 1;
+}
+
 void
-RobotMemory::log(Query query, std::string what)
+RobotMemory::log(std::string what, std::string info)
+{
+  if(!info.compare("error"))
+      logger_->log_error(name_, "%s", what.c_str());
+  else if(!info.compare("warn"))
+    logger_->log_warn(name_, "%s", what.c_str());
+  else if(!info.compare("debug"))
+    logger_->log_debug(name_, "%s", what.c_str());
+  else
+    logger_->log_info(name_, "%s", what.c_str());
+}
+
+void
+RobotMemory::log_deb(std::string what, std::string level)
+{
+  if(debug_)
+    log(what, level);
+}
+
+void
+RobotMemory::log_deb(Query query, std::string what, std::string level)
+{
+  if(debug_)
+    log(query, what, level);
+}
+
+void
+RobotMemory::log(Query query, std::string what, std::string level)
 {
   std::string output = what
     + "\nFilter: " + query.getFilter().toString()
@@ -283,17 +285,21 @@ RobotMemory::log(Query query, std::string what)
     + "\nSort: " + query.getSort().toString()
     + "\nHint: " + query.getHint().toString()
     + "\nReadPref: " + query.getReadPref().toString();
+  log(output, level);
+}
 
-  logger_->log_info(name_, "%s", output.c_str());
+void
+RobotMemory::log_deb(BSONObj obj, std::string what, std::string level)
+{
+  log(obj, what, level);
 }
 
 void
-RobotMemory::log(BSONObj obj, std::string what)
+RobotMemory::log(BSONObj obj, std::string what, std::string level)
 {
   std::string output = what
     + "\nObject: " + obj.toString();
-
-  logger_->log_info(name_, "%s", output.c_str());
+  log(output, level);
 }
 
 void
diff --git a/src/plugins/robot-memory/robot_memory.h b/src/plugins/robot-memory/robot_memory.h
index 7a095f4..e4efa09 100644
--- a/src/plugins/robot-memory/robot_memory.h
+++ b/src/plugins/robot-memory/robot_memory.h
@@ -56,6 +56,8 @@ class RobotMemory
     int insert(std::string insert, std::string collection = "");
     int update(std::string query, std::string update, std::string collection = "");
     int remove(std::string query, std::string collection = "");
+    int drop_collection(std::string collection);
+    int clear_memory();
 
   private:
     mongo::DBClientBase* mongodb_client_;
@@ -65,6 +67,7 @@ class RobotMemory
     fawkes::BlackBoard* blackboard_;
 
     const char* name_ = "RobotMemory";
+    std::string database_name_;
     std::string default_collection_;
     bool debug_;
     fawkes::Mutex *mutex_;
@@ -72,8 +75,12 @@ class RobotMemory
 
     void init();
 
-    void log(mongo::Query query, std::string what);
-    void log(mongo::BSONObj obj, std::string what);
+    void log(std::string what, std::string level = "info");
+    void log_deb(std::string what, std::string level = "info");
+    void log(mongo::Query query, std::string what, std::string level = "info");
+    void log(mongo::BSONObj obj, std::string what, std::string level = "info");
+    void log_deb(mongo::Query query, std::string what, std::string level = "info");
+    void log_deb(mongo::BSONObj obj, std::string what, std::string level = "info");
 
     void set_fields(mongo::BSONObj &obj, std::string what);
     void set_fields(mongo::Query &q, std::string what);

- *commit* e47565a0598910e69d3e397856afd2c91d0270bc - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Mon Aug 29 19:02:53 2016 +0200
Subject: robot-memory: dump and restore collections

 src/plugins/robot-memory/robot_memory.cpp          |   96 ++++++++++++++++++++
 src/plugins/robot-memory/robot_memory.h            |    2 +
 .../robot-memory/test-plugin/robot_memory_test.cpp |   21 ++++-
 3 files changed, 118 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/robot-memory/robot_memory.cpp b/src/plugins/robot-memory/robot_memory.cpp
index b4f39ff..724c1fc 100644
--- a/src/plugins/robot-memory/robot_memory.cpp
+++ b/src/plugins/robot-memory/robot_memory.cpp
@@ -21,8 +21,13 @@
 #include "robot_memory.h"
 #include <core/threading/mutex.h>
 #include <core/threading/mutex_locker.h>
+#include <utils/misc/string_conversions.h>
+#include <utils/misc/string_split.h>
 #include <memory>
 #include <string>
+#include <stdio.h>
+#include <iostream>
+#include <stdlib.h>
 
 // from MongoDB
 #include <mongo/client/dbclient.h>
@@ -249,6 +254,97 @@ int RobotMemory::clear_memory()
   return 1;
 }
 
+int RobotMemory::restore_collection(std::string collection, std::string directory)
+{
+  drop_collection(collection);
+
+  //resolve path to restore
+  if(collection.find(".") == std::string::npos)
+  {
+    log(std::string("Unable to restore collection" + collection), "error");
+    log(std::string("Specify collection like 'db.collection'"), "error");
+    return 0;
+  }
+  std::string path = StringConversions::resolve_path(directory) + "/"
+      + collection.replace(collection.find("."),1,"/") + ".bson";
+  log_deb(std::string("Restore collection " + collection + " from " + path), "warn");
+
+  //call mongorestore from folder with initial restores
+  std::string command = "/usr/bin/mongorestore --dir " + path + " --quiet";
+  log_deb(std::string("Restore command: " + command), "warn");
+  FILE *bash_output = popen(command.c_str(), "r");
+
+  //check if output is ok
+  if(!bash_output)
+  {
+    log(std::string("Unable to restore collection" + collection), "error");
+    return 0;
+  }
+  std::string output_string = "";
+  char buffer[100];
+  while (!feof(bash_output) )
+  {
+    if (fgets(buffer, 100, bash_output) == NULL)
+    {
+      break;
+    }
+    output_string += buffer;
+  }
+  pclose(bash_output);
+  if(output_string.find("Failed") != std::string::npos)
+  {
+    log(std::string("Unable to restore collection" + collection), "error");
+    log_deb(output_string, "error");
+    return 0;
+  }
+  return 1;
+}
+
+int RobotMemory::dump_collection(std::string collection, std::string directory)
+{
+  //resolve path to dump to
+  if(collection.find(".") == std::string::npos)
+  {
+    log(std::string("Unable to dump collection" + collection), "error");
+    log(std::string("Specify collection like 'db.collection'"), "error");
+    return 0;
+  }
+  std::string path = StringConversions::resolve_path(directory);
+  log_deb(std::string("Dump collection " + collection + " into " + path), "warn");
+
+  //call mongorestore from folder with initial restores
+  std::vector<std::string> split = str_split(collection, '.');
+  std::string command = "/usr/bin/mongodump --out=" + path + " --db=" + split[0]
+    + " --collection=" + split[1] + " --quiet";
+  log_deb(std::string("Dump command: " + command), "warn");
+  FILE *bash_output = popen(command.c_str(), "r");
+
+  //check if output is ok
+  if(!bash_output)
+  {
+    log(std::string("Unable to dump collection" + collection), "error");
+    return 0;
+  }
+  std::string output_string = "";
+  char buffer[100];
+  while (!feof(bash_output) )
+  {
+    if (fgets(buffer, 100, bash_output) == NULL)
+    {
+      break;
+    }
+    output_string += buffer;
+  }
+  pclose(bash_output);
+  if(output_string.find("Failed") != std::string::npos)
+  {
+    log(std::string("Unable to dump collection" + collection), "error");
+    log_deb(output_string, "error");
+    return 0;
+  }
+  return 1;
+}
+
 void
 RobotMemory::log(std::string what, std::string info)
 {
diff --git a/src/plugins/robot-memory/robot_memory.h b/src/plugins/robot-memory/robot_memory.h
index e4efa09..0566127 100644
--- a/src/plugins/robot-memory/robot_memory.h
+++ b/src/plugins/robot-memory/robot_memory.h
@@ -58,6 +58,8 @@ class RobotMemory
     int remove(std::string query, std::string collection = "");
     int drop_collection(std::string collection);
     int clear_memory();
+    int restore_collection(std::string collection, std::string directory = "@CONFDIR@/robot-memory");
+    int dump_collection(std::string collection, std::string directory = "@CONFDIR@/robot-memory");
 
   private:
     mongo::DBClientBase* mongodb_client_;
diff --git a/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp b/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp
index 6f8f68e..e9586fb 100644
--- a/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp
+++ b/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp
@@ -129,13 +129,32 @@ TEST_F(RobotMemoryTest, JavaScriptQuery)
   //TODO: implement
 }
 
+TEST_F(RobotMemoryTest, DumpAndResore)
+{
+  ASSERT_TRUE(robot_memory->drop_collection("robmem.test"));
+  ASSERT_TRUE(robot_memory->insert("{'testkey':'value',v:1}"));
+  ASSERT_TRUE(robot_memory->insert("{'testkey':'value',v:2}"));
+  ASSERT_TRUE(robot_memory->insert("{'testkey':'value',v:3}"));
+  ASSERT_TRUE(robot_memory->dump_collection("robmem.test"));
+  ASSERT_TRUE(robot_memory->drop_collection("robmem.test"));
+  ASSERT_TRUE(robot_memory->restore_collection("robmem.test"));
+  QResCursor qres = robot_memory->query("{'testkey':'value'}");
+  ASSERT_TRUE(qres->more());
+  ASSERT_TRUE(contains_pairs(qres->next(), fromjson("{'testkey':'value',v:1}")));
+  ASSERT_TRUE(qres->more());
+  ASSERT_TRUE(contains_pairs(qres->next(), fromjson("{'testkey':'value',v:2}")));
+  ASSERT_TRUE(qres->more());
+  ASSERT_TRUE(contains_pairs(qres->next(), fromjson("{'testkey':'value',v:3}")));
+  ASSERT_FALSE(qres->more());
+
+}
 
 ::testing::AssertionResult RobotMemoryTest::contains_pairs(BSONObj obj, BSONObj exp)
 {
   for(BSONObjIterator it = exp.begin(); it.more();)
   {
     BSONElement kvpair = it.next();
-    printf("checking %s\n", kvpair.toString().c_str());
+    //printf("checking %s\n", kvpair.toString().c_str());
     if(!obj.hasElement(kvpair.fieldName())
         || obj.getField(kvpair.fieldName()) != kvpair)
     {

- *commit* cdecfb075141a21d62f4ef1ac0590403fd5c34fc - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Mon Aug 29 19:44:31 2016 +0200
Subject: robot-memory: use BSONObj and Query in API

 src/plugins/robot-memory/robot_memory.cpp          |   89 +++++---------------
 src/plugins/robot-memory/robot_memory.h            |   10 ++-
 .../robot-memory/test-plugin/robot_memory_test.cpp |   21 ++---
 3 files changed, 37 insertions(+), 83 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/robot-memory/robot_memory.cpp b/src/plugins/robot-memory/robot_memory.cpp
index 724c1fc..d273ce2 100644
--- a/src/plugins/robot-memory/robot_memory.cpp
+++ b/src/plugins/robot-memory/robot_memory.cpp
@@ -79,28 +79,15 @@ void RobotMemory::init()
   log_deb("Initialized RobotMemory");
 }
 
-QResCursor RobotMemory::query(std::string query_string, std::string collection)
+QResCursor RobotMemory::query(Query query, std::string collection)
 {
   if(collection == "")
-  {
     collection = default_collection_;
-  }
-  log_deb(std::string("Executing Query "+ query_string+" on collection "+collection));
+  log_deb(std::string("Executing Query "+ query.toString() +" on collection "+collection));
 
   //only one query at a time
   MutexLocker lock(mutex_);
 
-  //get query from string
-  Query query;
-  try{
-    query = Query(query_string);
-  } catch (DBException &e) {
-    std::string error = "Can't parse query_string "
-        + query_string + "\n Exception: " + e.toString();
-    log_deb(error, "error");
-    return NULL;
-  }
-
 //  //introspect query
 //  log(query, "executing query:");
 
@@ -124,43 +111,30 @@ QResCursor RobotMemory::query(std::string query_string, std::string collection)
     cursor = mongodb_client_->query(collection, query);
   } catch (DBException &e) {
     std::string error = std::string("Error for query ")
-      + query_string + "\n Exception: " + e.toString();
+      + query.toString() + "\n Exception: " + e.toString();
     log(error, "error");
     return NULL;
   }
   return cursor;
 }
 
-int RobotMemory::insert(std::string insert_string, std::string collection)
+int RobotMemory::insert(BSONObj obj, std::string collection)
 {
   if(collection == "")
-  {
     collection = default_collection_;
-  }
 
-  log_deb(std::string("Executing Query "+ insert_string + " on collection " + collection));
+  log_deb(std::string("Executing Query "+ obj.toString() + " on collection " + collection));
 
   //only one query at a time
   MutexLocker lock(mutex_);
 
-  //get query from string
-  BSONObj obj;
-  try{
-    obj = fromjson(insert_string);
-  } catch (DBException &e) {
-    std::string error = "Can't parse insert_string "
-        + insert_string + "\n Exception: " + e.toString();
-    log_deb(error, "error");
-    return 0;
-  }
-
   set_fields(obj, "{type: \"test\"}");
 
   //actually execute insert
   try{
     mongodb_client_->insert(collection, obj);
   } catch (DBException &e) {
-    std::string error = "Error for insert " + insert_string
+    std::string error = "Error for insert " + obj.toString()
         + "\n Exception: " + e.toString();
     log_deb(error, "error");
     return 0;
@@ -169,72 +143,54 @@ int RobotMemory::insert(std::string insert_string, std::string collection)
   return 1;
 }
 
-int RobotMemory::update(std::string query_string, std::string update_string,
-                                    std::string collection)
+int RobotMemory::insert(std::string obj_str, std::string collection)
+{
+  return insert(fromjson(obj_str), collection);
+}
+
+int RobotMemory::update(Query query, BSONObj update, std::string collection)
 {
   if(collection == "")
   {
     collection = default_collection_;
   }
-  log_deb(std::string("Executing Update "+update_string+" for query "+query_string+" on collection "+ collection));
+  log_deb(std::string("Executing Update "+update.toString()+" for query "+query.toString()+" on collection "+ collection));
 
   //only one query at a time
   MutexLocker lock(mutex_);
 
-  //get query from string
-  Query query;
-  try{
-    query = Query(query_string);
-  } catch (DBException &e) {
-    std::string error = "Can't parse query_string " + query_string
-        + "\n Exception: " + e.toString();
-    log_deb(error, "error");
-    return 0;
-  }
-  BSONObj update;
-  try{
-    update = fromjson(update_string);
-  } catch (DBException &e) {
-    log_deb(std::string("Can't parse update_string '"+update_string+"'\n Exception: "+e.toString()),"error");
-    return 0;
-  }
-
   //actually execute update
   try{
     mongodb_client_->update(collection, query, update);
   } catch (DBException &e) {
-    log_deb(std::string("Error for update "+update_string+" for query "+query_string+"\n Exception: "+e.toString()), "error");
+    log_deb(std::string("Error for update "+update.toString()+" for query "+query.toString()+"\n Exception: "+e.toString()), "error");
     return 0;
   }
   //return success
   return 1;
 }
 
-int RobotMemory::remove(std::string query_string, std::string collection)
+int RobotMemory::update(Query query, std::string update_str, std::string collection)
+{
+  return update(query, fromjson(update_str), collection);
+}
+
+int RobotMemory::remove(Query query, std::string collection)
 {
   if(collection == "")
   {
     collection = default_collection_;
   }
-  log_deb(std::string("Executing Remove "+query_string+" on collection "+collection));
+  log_deb(std::string("Executing Remove "+query.toString()+" on collection "+collection));
 
   //only one query at a time
   MutexLocker lock(mutex_);
 
-  //get query from string
-  Query query;
-  try{
-    query = Query(query_string);
-  } catch (DBException &e) {
-    log_deb(std::string("Can't parse query_string '"+query_string+"'\n Exception: "+e.toString()), "error");
-    return 0;
-  }
-
   //actually execute remove
   try{
     mongodb_client_->remove(collection, query);
   } catch (DBException &e) {
-    log_deb(std::string("Error for query "+query_string+"\n Exception: "+e.toString()), "error");
+    log_deb(std::string("Error for query "+query.toString()+"\n Exception: "+e.toString()), "error");
     return 0;
   }
   //return success
@@ -442,4 +398,3 @@ RobotMemory::remove_field(Query &q, std::string what)
   //override
   q = Query(b.obj());
 }
-
diff --git a/src/plugins/robot-memory/robot_memory.h b/src/plugins/robot-memory/robot_memory.h
index 0566127..58c17f7 100644
--- a/src/plugins/robot-memory/robot_memory.h
+++ b/src/plugins/robot-memory/robot_memory.h
@@ -52,10 +52,12 @@ class RobotMemory
     virtual ~RobotMemory();
 
     //robot memory functions
-    QResCursor query(std::string query, std::string collection = "");
-    int insert(std::string insert, std::string collection = "");
-    int update(std::string query, std::string update, std::string collection = "");
-    int remove(std::string query, std::string collection = "");
+    QResCursor query(mongo::Query query, std::string collection = "");
+    int insert(mongo::BSONObj obj, std::string collection = "");
+    int insert(std::string obj_str, std::string collection = "");
+    int update(mongo::Query query, mongo::BSONObj update, std::string collection = "");
+    int update(mongo::Query query, std::string update_str, std::string collection = "");
+    int remove(mongo::Query query, std::string collection = "");
     int drop_collection(std::string collection);
     int clear_memory();
     int restore_collection(std::string collection, std::string directory = "@CONFDIR@/robot-memory");
diff --git a/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp b/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp
index e9586fb..1e35e04 100644
--- a/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp
+++ b/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp
@@ -87,31 +87,28 @@ TEST_F(RobotMemoryTest, StoreRemoveQuery)
   ASSERT_FALSE(qres->more());
 }
 
-TEST_F(RobotMemoryTest, QueryInvalidCaught)
+TEST_F(RobotMemoryTest, QueryInvalid)
 {
-  ASSERT_FALSE(robot_memory->query("{key-:+'not existing'}"));
+  ASSERT_THROW(robot_memory->query("{key-:+'not existing'}"), mongo::DBException);
 }
 
 TEST_F(RobotMemoryTest, InsertInvalidCaught)
 {
-  ASSERT_NO_THROW(robot_memory->insert("{'testkey'::'value'}"));
-  ASSERT_FALSE(robot_memory->insert("warbagarbl"));
+  ASSERT_THROW(robot_memory->insert("{'testkey'::'value'}"), mongo::DBException);
+  ASSERT_THROW(robot_memory->insert("warbagarbl"), mongo::DBException);
 }
 
 TEST_F(RobotMemoryTest, UpdateInvalidCaught)
 {
-  ASSERT_NO_THROW(robot_memory->update("{'testkey'::'value'}",
-      "{'key':'update'}"));
-  ASSERT_NO_THROW(robot_memory->update("{'testkey':'good'}",
-      "{'bad':1.2.3}"));
-  ASSERT_FALSE(robot_memory->update("{([})]", "{'key':4}"));
-  ASSERT_FALSE(robot_memory->update("{'key':'valid'}", "invalid!"));
+  ASSERT_THROW(robot_memory->update("{'testkey':'good'}",
+      "{'bad':1.2.3}"), mongo::DBException);
+  ASSERT_THROW(robot_memory->update("{([})]", "{'key':4}"), mongo::DBException);
 }
 
 TEST_F(RobotMemoryTest, RemoveInvalidCaught)
 {
-  ASSERT_NO_THROW(robot_memory->remove("{____:4.56}"));
-  ASSERT_FALSE(robot_memory->remove("{([})]"));
+  ASSERT_THROW(robot_memory->remove("{____:4.56!}"), mongo::DBException);
+  ASSERT_THROW(robot_memory->remove("{([})]"), mongo::DBException);
 }
 
 TEST_F(RobotMemoryTest, AggregationQuery)

- *commit* 9cf08148999af9ae0f74eb3a719fa56d1e4c7864 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Mon Aug 29 20:27:26 2016 +0200
Subject: clips-robot-memory: start for CLIPS feature from refbox clips-mongodb

 src/plugins/Makefile                               |    2 +-
 src/plugins/clips-robot-memory/Makefile            |   60 ++
 .../clips_robot_memory_plugin.cpp}                 |   20 +-
 .../clips_robot_memory_thread.cpp                  |  680 ++++++++++++++++++++
 .../clips-robot-memory/clips_robot_memory_thread.h |   95 +++
 5 files changed, 846 insertions(+), 11 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/Makefile b/src/plugins/Makefile
index bfad9d7..e400377 100644
--- a/src/plugins/Makefile
+++ b/src/plugins/Makefile
@@ -26,7 +26,7 @@ SUBDIRS	= bbsync bblogger webview ttmainloop rrd rrdweb \
 	  static_transforms navgraph navgraph-clusters navgraph-generator colli \
 	  clips clips-agent clips-protobuf clips-webview clips-navgraph clips-ros \
 	  clips-tf openprs openprs-agent eclipse-clp \
-	  mongodb mongodb_log robot-memory\
+	  mongodb mongodb_log robot-memory clips-robot-memory \
 	  openni refboxcomm ros player xmlrpc gossip \
 	  robot_state_publisher gazebo dynamixel navgraph-interactive
 

- *commit* b9f7287e9839760b67c07f4365d0034c34276a5c - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Thu Sep 1 15:00:10 2016 +0200
Subject: robot-memory: add upsert option in update function

 src/plugins/robot-memory/robot_memory.cpp          |    8 ++++----
 src/plugins/robot-memory/robot_memory.h            |    4 ++--
 .../robot-memory/test-plugin/robot_memory_test.cpp |   10 ++++++++++
 3 files changed, 16 insertions(+), 6 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/robot-memory/robot_memory.cpp b/src/plugins/robot-memory/robot_memory.cpp
index d273ce2..9a4e65d 100644
--- a/src/plugins/robot-memory/robot_memory.cpp
+++ b/src/plugins/robot-memory/robot_memory.cpp
@@ -148,7 +148,7 @@ int RobotMemory::insert(std::string obj_str, std::string collection)
   return insert(fromjson(obj_str), collection);
 }
 
-int RobotMemory::update(Query query, BSONObj update, std::string collection)
+int RobotMemory::update(Query query, BSONObj update, std::string collection, bool upsert)
 {
   if(collection == "")
   {
@@ -161,7 +161,7 @@ int RobotMemory::update(Query query, BSONObj update, std::string collection)
 
   //actually execute update
   try{
-    mongodb_client_->update(collection, query, update);
+    mongodb_client_->update(collection, query, update, upsert);
   } catch (DBException &e) {
     log_deb(std::string("Error for update "+update.toString()+" for query "+query.toString()+"\n Exception: "+e.toString()), "error");
     return 0;
@@ -170,9 +170,9 @@ int RobotMemory::update(Query query, BSONObj update, std::string collection)
   return 1;
 }
 
-int RobotMemory::update(Query query, std::string update_str, std::string collection)
+int RobotMemory::update(Query query, std::string update_str, std::string collection, bool upsert)
 {
-  return update(query, fromjson(update_str), collection);
+  return update(query, fromjson(update_str), collection, upsert);
 }
 
 int RobotMemory::remove(Query query, std::string collection)
diff --git a/src/plugins/robot-memory/robot_memory.h b/src/plugins/robot-memory/robot_memory.h
index 58c17f7..2ad892b 100644
--- a/src/plugins/robot-memory/robot_memory.h
+++ b/src/plugins/robot-memory/robot_memory.h
@@ -55,8 +55,8 @@ class RobotMemory
     QResCursor query(mongo::Query query, std::string collection = "");
     int insert(mongo::BSONObj obj, std::string collection = "");
     int insert(std::string obj_str, std::string collection = "");
-    int update(mongo::Query query, mongo::BSONObj update, std::string collection = "");
-    int update(mongo::Query query, std::string update_str, std::string collection = "");
+    int update(mongo::Query query, mongo::BSONObj update, std::string collection = "", bool upsert = false);
+    int update(mongo::Query query, std::string update_str, std::string collection = "", bool upsert = false);
     int remove(mongo::Query query, std::string collection = "");
     int drop_collection(std::string collection);
     int clear_memory();
diff --git a/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp b/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp
index 1e35e04..a24e29e 100644
--- a/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp
+++ b/src/plugins/robot-memory/test-plugin/robot_memory_test.cpp
@@ -87,6 +87,16 @@ TEST_F(RobotMemoryTest, StoreRemoveQuery)
   ASSERT_FALSE(qres->more());
 }
 
+TEST_F(RobotMemoryTest, Upsert)
+{
+  ASSERT_TRUE(robot_memory->update("{upsert:'not existing'}", "{upsert:'should not exist'}", "", false));
+  QResCursor qres = robot_memory->query("{upsert:'should not exist'}");
+  ASSERT_FALSE(qres->more());
+  ASSERT_TRUE(robot_memory->update("{upsert:'not existing'}", "{upsert:'should exist'}", "", true));
+  qres = robot_memory->query("{upsert:'should exist'}");
+  ASSERT_TRUE(qres->more());
+}
+
 TEST_F(RobotMemoryTest, QueryInvalid)
 {
   ASSERT_THROW(robot_memory->query("{key-:+'not existing'}"), mongo::DBException);

- *commit* 3af7d94677205381ecd336b048dc8c33c7dcf9a5 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Thu Sep 1 16:25:04 2016 +0200
Subject: robot-memory: removed setting type in document for testing

 src/plugins/robot-memory/robot_memory.cpp |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/robot-memory/robot_memory.cpp b/src/plugins/robot-memory/robot_memory.cpp
index 9a4e65d..dce9510 100644
--- a/src/plugins/robot-memory/robot_memory.cpp
+++ b/src/plugins/robot-memory/robot_memory.cpp
@@ -128,8 +128,6 @@ int RobotMemory::insert(BSONObj obj, std::string collection)
   //only one query at a time
   MutexLocker lock(mutex_);
 
-  set_fields(obj, "{type: \"test\"}");
-
   //actually execute insert
   try{
     mongodb_client_->insert(collection, obj);

- *commit* de73a7db12983440d1d4de7f5103f13660f4b24f - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Thu Sep 1 17:42:09 2016 +0200
Subject: clips-robot-memory: adjusted plugin to use the robot memory

 .../clips_robot_memory_thread.cpp                  |  113 +++++++++-----------
 .../clips-robot-memory/clips_robot_memory_thread.h |   21 ++--
 2 files changed, 60 insertions(+), 74 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/clips-robot-memory/clips_robot_memory_thread.cpp b/src/plugins/clips-robot-memory/clips_robot_memory_thread.cpp
index 725ae1f..fdd9231 100644
--- a/src/plugins/clips-robot-memory/clips_robot_memory_thread.cpp
+++ b/src/plugins/clips-robot-memory/clips_robot_memory_thread.cpp
@@ -62,32 +62,32 @@ ClipsRobotMemoryThread::clips_context_init(const std::string &env_name,
 
   clips.lock();
 
-  clips_->add_function("bson-create", sigc::slot<CLIPS::Value>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_create)));
-  clips_->add_function("bson-parse", sigc::slot<CLIPS::Value, std::string>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_parse)));
-  clips_->add_function("bson-destroy", sigc::slot<void, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_destroy)));
-  clips_->add_function("bson-append", sigc::slot<void, void *, std::string, CLIPS::Value>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_append)));
-  clips_->add_function("bson-append-array", sigc::slot<void, void *, std::string, CLIPS::Values>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_append_array)));
-  clips_->add_function("bson-array-start", sigc::slot<CLIPS::Value, void *, std::string>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_array_start)));
-  clips_->add_function("bson-array-finish", sigc::slot<void, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_array_finish)));
-  clips_->add_function("bson-array-append", sigc::slot<void, void *, CLIPS::Value>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_array_append)));
-
-  clips_->add_function("bson-append-time", sigc::slot<void, void *, std::string, CLIPS::Values>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_append_time)));
-  clips_->add_function("bson-tostring", sigc::slot<std::string, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_tostring)));
-  clips_->add_function("mongodb-insert", sigc::slot<void, std::string, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_mongodb_insert)));
-  clips_->add_function("mongodb-upsert", sigc::slot<void, std::string, void *, CLIPS::Value>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_mongodb_upsert)));
-  clips_->add_function("mongodb-update", sigc::slot<void, std::string, void *, CLIPS::Value>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_mongodb_update)));
-  clips_->add_function("mongodb-replace", sigc::slot<void, std::string, void *, CLIPS::Value>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_mongodb_replace)));
-  clips_->add_function("mongodb-query", sigc::slot<CLIPS::Value, std::string, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_mongodb_query)));
-  clips_->add_function("mongodb-query-sort", sigc::slot<CLIPS::Value, std::string, void *, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_mongodb_query_sort)));
-  clips_->add_function("mongodb-cursor-destroy", sigc::slot<void, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_mongodb_cursor_destroy)));
-  clips_->add_function("mongodb-cursor-more", sigc::slot<CLIPS::Value, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_mongodb_cursor_more)));
-  clips_->add_function("mongodb-cursor-next", sigc::slot<CLIPS::Value, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_mongodb_cursor_next)));
-  clips_->add_function("bson-field-names", sigc::slot<CLIPS::Values, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_field_names)));
-  clips_->add_function("bson-get", sigc::slot<CLIPS::Value, void *, std::string>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_get)));
-  clips_->add_function("bson-get-array", sigc::slot<CLIPS::Values, void *, std::string>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_get_array)));
-  clips_->add_function("bson-get-time", sigc::slot<CLIPS::Values, void *, std::string>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_get_time)));
-
-  clips_->build("(deffacts have-feature-mongodb (have-feature MongoDB))");
+  clips->add_function("bson-create", sigc::slot<CLIPS::Value>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_create)));
+  clips->add_function("bson-parse", sigc::slot<CLIPS::Value, std::string>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_parse)));
+  clips->add_function("bson-destroy", sigc::slot<void, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_destroy)));
+  clips->add_function("bson-append", sigc::slot<void, void *, std::string, CLIPS::Value>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_append)));
+  clips->add_function("bson-append-array", sigc::slot<void, void *, std::string, CLIPS::Values>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_append_array)));
+  clips->add_function("bson-array-start", sigc::slot<CLIPS::Value, void *, std::string>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_array_start)));
+  clips->add_function("bson-array-finish", sigc::slot<void, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_array_finish)));
+  clips->add_function("bson-array-append", sigc::slot<void, void *, CLIPS::Value>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_array_append)));
+
+  clips->add_function("bson-append-time", sigc::slot<void, void *, std::string, CLIPS::Values>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_append_time)));
+  clips->add_function("bson-tostring", sigc::slot<std::string, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_tostring)));
+  clips->add_function("robmem-insert", sigc::slot<void, std::string, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_robotmemory_insert)));
+  clips->add_function("robmem-upsert", sigc::slot<void, std::string, void *, CLIPS::Value>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_robotmemory_upsert)));
+  clips->add_function("robmem-update", sigc::slot<void, std::string, void *, CLIPS::Value>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_robotmemory_update)));
+  clips->add_function("robmem-replace", sigc::slot<void, std::string, void *, CLIPS::Value>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_robotmemory_replace)));
+  clips->add_function("robmem-query", sigc::slot<CLIPS::Value, std::string, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_robotmemory_query)));
+  clips->add_function("robmem-query-sort", sigc::slot<CLIPS::Value, std::string, void *, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_robotmemory_query_sort)));
+  clips->add_function("robmem-cursor-destroy", sigc::slot<void, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_robotmemory_cursor_destroy)));
+  clips->add_function("robmem-cursor-more", sigc::slot<CLIPS::Value, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_robotmemory_cursor_more)));
+  clips->add_function("robmem-cursor-next", sigc::slot<CLIPS::Value, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_robotmemory_cursor_next)));
+  clips->add_function("bson-field-names", sigc::slot<CLIPS::Values, void *>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_field_names)));
+  clips->add_function("bson-get", sigc::slot<CLIPS::Value, void *, std::string>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_get)));
+  clips->add_function("bson-get-array", sigc::slot<CLIPS::Values, void *, std::string>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_get_array)));
+  clips->add_function("bson-get-time", sigc::slot<CLIPS::Values, void *, std::string>(sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_get_time)));
+
+  clips->build("(deffacts have-feature-mongodb (have-feature MongoDB))");
 
   //TODO: clips->batch_evaluate(SRCDIR"/plugins/clips-robot-memory/robot_memory.clp");
 
@@ -118,7 +118,7 @@ ClipsRobotMemoryThread::clips_bson_parse(std::string document)
 #ifdef HAVE_MONGODB_VERSION_H
   } catch (mongo::MsgAssertionException &e) {
 #else
-  } catch (bson::assertion &e) {
+  } catch (mongo::AssertionException &e) {
 #endif
     logger->log_error("MongoDB", "Parsing JSON doc failed: %s\n%s",
            e.what(), document.c_str());
@@ -175,7 +175,7 @@ ClipsRobotMemoryThread::clips_bson_append(void *bson, std::string field_name, CL
 #ifdef HAVE_MONGODB_VERSION_H
   } catch (mongo::MsgAssertionException &e) {
 #else
-  } catch (bson::assertion &e) {
+  } catch (mongo::AssertionException &e) {
 #endif
     logger->log_error("MongoDB", "Failed to append array value to field %s: %s",
            field_name.c_str(), e.what());
@@ -224,7 +224,7 @@ ClipsRobotMemoryThread::clips_bson_append_array(void *bson,
 #ifdef HAVE_MONGODB_VERSION_H
   } catch (mongo::MsgAssertionException &e) {
 #else
-  } catch (bson::assertion &e) {
+  } catch (mongo::AssertionException &e) {
 #endif
     logger->log_error("MongoDB", "Failed to append array value to field %s: %s",
            field_name.c_str(), e.what());
@@ -282,7 +282,7 @@ ClipsRobotMemoryThread::clips_bson_array_append(void *barr, CLIPS::Value value)
 #ifdef HAVE_MONGODB_VERSION_H
   } catch (mongo::MsgAssertionException &e) {
 #else
-  } catch (bson::assertion &e) {
+  } catch (mongo::AssertionException &e) {
 #endif
     logger->log_error("MongoDB", "Failed to append to array: %s", e.what());
   }
@@ -309,7 +309,7 @@ ClipsRobotMemoryThread::clips_bson_append_time(void *bson, std::string field_nam
 #ifdef HAVE_MONGODB_VERSION_H
   } catch (mongo::MsgAssertionException &e) {
 #else
-  } catch (bson::assertion &e) {
+  } catch (mongo::AssertionException &e) {
 #endif
     logger->log_error("MongoDB", "Failed to append time value to field %s: %s",
            field_name.c_str(), e.what());
@@ -317,17 +317,12 @@ ClipsRobotMemoryThread::clips_bson_append_time(void *bson, std::string field_nam
 }
 
 void
-ClipsRobotMemoryThread::clips_mongodb_insert(std::string collection, void *bson)
+ClipsRobotMemoryThread::clips_robotmemory_insert(std::string collection, void *bson)
 {
-  if (! cfg_mongodb_enabled_) {
-    logger->log_warn("MongoDB", "Insert requested while MongoDB disabled");
-    return;
-  }
-
   mongo::BSONObjBuilder *b = static_cast<mongo::BSONObjBuilder *>(bson);
 
   try {
-    mongodb_->insert(collection, b->asTempObj());
+    robot_memory->insert(b->asTempObj(), collection);
   } catch (mongo::DBException &e) {
     logger->log_warn("MongoDB", "Insert failed: %s", e.what());
   }
@@ -335,14 +330,9 @@ ClipsRobotMemoryThread::clips_mongodb_insert(std::string collection, void *bson)
 
 
 void
-ClipsRobotMemoryThread::mongodb_update(std::string &collection, mongo::BSONObj obj,
+ClipsRobotMemoryThread::robotmemory_update(std::string &collection, mongo::BSONObj obj,
          CLIPS::Value &query, bool upsert)
 {
-  if (! cfg_mongodb_enabled_) {
-    logger->log_warn("MongoDB", "Update requested while MongoDB disabled");
-    return;
-  }
-
   try {
     mongo::BSONObj query_obj;
     if (query.type() == CLIPS::TYPE_STRING) {
@@ -355,11 +345,11 @@ ClipsRobotMemoryThread::mongodb_update(std::string &collection, mongo::BSONObj o
       return;
     }
 
-    mongodb_->update(collection, query_obj, obj, upsert);
+    robot_memory->update(query_obj, obj, collection, upsert);
 #ifdef HAVE_MONGODB_VERSION_H
   } catch (mongo::MsgAssertionException &e) {
 #else
-  } catch (bson::assertion &e) {
+  } catch (mongo::AssertionException &e) {
 #endif
     logger->log_warn("MongoDB", "Compiling query failed: %s", e.what());
   } catch (mongo::DBException &e) {
@@ -369,18 +359,18 @@ ClipsRobotMemoryThread::mongodb_update(std::string &collection, mongo::BSONObj o
 
 
 void
-ClipsRobotMemoryThread::clips_mongodb_upsert(std::string collection, void *bson, CLIPS::Value query)
+ClipsRobotMemoryThread::clips_robotmemory_upsert(std::string collection, void *bson, CLIPS::Value query)
 {
   mongo::BSONObjBuilder *b = static_cast<mongo::BSONObjBuilder *>(bson);
   if (! b) {
     logger->log_warn("MongoDB", "Invalid BSON Obj Builder passed");
     return;
   }
-  mongodb_update(collection, b->asTempObj(), query, true);
+  robotmemory_update(collection, b->asTempObj(), query, true);
 }
 
 void
-ClipsRobotMemoryThread::clips_mongodb_update(std::string collection, void *bson, CLIPS::Value query)
+ClipsRobotMemoryThread::clips_robotmemory_update(std::string collection, void *bson, CLIPS::Value query)
 {
   mongo::BSONObjBuilder *b = static_cast<mongo::BSONObjBuilder *>(bson);
   if (! b) {
@@ -391,25 +381,20 @@ ClipsRobotMemoryThread::clips_mongodb_update(std::string collection, void *bson,
   mongo::BSONObjBuilder update_doc;
   update_doc.append("$set", b->asTempObj());
 
-  mongodb_update(collection, update_doc.obj(), query, false);
+  robotmemory_update(collection, update_doc.obj(), query, false);
 }
 
 void
-ClipsRobotMemoryThread::clips_mongodb_replace(std::string collection, void *bson, CLIPS::Value query)
+ClipsRobotMemoryThread::clips_robotmemory_replace(std::string collection, void *bson, CLIPS::Value query)
 {
   mongo::BSONObjBuilder *b = static_cast<mongo::BSONObjBuilder *>(bson);
   if (! b) logger->log_warn("MongoDB", "Invalid BSON Obj Builder passed");
-  mongodb_update(collection, b->asTempObj(), query, false);
+  robotmemory_update(collection, b->asTempObj(), query, false);
 }
 
 CLIPS::Value
-ClipsRobotMemoryThread::clips_mongodb_query_sort(std::string collection, void *bson, void *bson_sort)
+ClipsRobotMemoryThread::clips_robotmemory_query_sort(std::string collection, void *bson, void *bson_sort)
 {
-  if (! cfg_mongodb_enabled_) {
-    logger->log_warn("MongoDB", "Query requested while MongoDB disabled");
-    return CLIPS::Value("FALSE", CLIPS::TYPE_SYMBOL);
-  }
-
   mongo::BSONObjBuilder *b = static_cast<mongo::BSONObjBuilder *>(bson);
 
   try {
@@ -420,7 +405,7 @@ ClipsRobotMemoryThread::clips_mongodb_query_sort(std::string collection, void *b
     }
 
 #if __cplusplus >= 201103L
-    std::unique_ptr<mongo::DBClientCursor> c = mongodb_->query(collection, q);
+    std::unique_ptr<mongo::DBClientCursor> c = robot_memory->query(q, collection);
 
     return CLIPS::Value(new std::unique_ptr<mongo::DBClientCursor>(std::move(c)),
                         CLIPS::TYPE_EXTERNAL_ADDRESS);
@@ -438,13 +423,13 @@ ClipsRobotMemoryThread::clips_mongodb_query_sort(std::string collection, void *b
 }
 
 CLIPS::Value
-ClipsRobotMemoryThread::clips_mongodb_query(std::string collection, void *bson)
+ClipsRobotMemoryThread::clips_robotmemory_query(std::string collection, void *bson)
 {
-  return clips_mongodb_query_sort(collection, bson, NULL);
+  return clips_robotmemory_query_sort(collection, bson, NULL);
 }
 
 void
-ClipsRobotMemoryThread::clips_mongodb_cursor_destroy(void *cursor)
+ClipsRobotMemoryThread::clips_robotmemory_cursor_destroy(void *cursor)
 {
 #if __cplusplus >= 201103L
   std::unique_ptr<mongo::DBClientCursor> *c =
@@ -463,7 +448,7 @@ ClipsRobotMemoryThread::clips_mongodb_cursor_destroy(void *cursor)
 }
 
 CLIPS::Value
-ClipsRobotMemoryThread::clips_mongodb_cursor_more(void *cursor)
+ClipsRobotMemoryThread::clips_robotmemory_cursor_more(void *cursor)
 {
 #if __cplusplus >= 201103L
   std::unique_ptr<mongo::DBClientCursor> *c =
@@ -482,7 +467,7 @@ ClipsRobotMemoryThread::clips_mongodb_cursor_more(void *cursor)
 }
 
 CLIPS::Value
-ClipsRobotMemoryThread::clips_mongodb_cursor_next(void *cursor)
+ClipsRobotMemoryThread::clips_robotmemory_cursor_next(void *cursor)
 {
 #if __cplusplus >= 201103L
   std::unique_ptr<mongo::DBClientCursor> *c =
diff --git a/src/plugins/clips-robot-memory/clips_robot_memory_thread.h b/src/plugins/clips-robot-memory/clips_robot_memory_thread.h
index 25b2b84..6b43d48 100644
--- a/src/plugins/clips-robot-memory/clips_robot_memory_thread.h
+++ b/src/plugins/clips-robot-memory/clips_robot_memory_thread.h
@@ -28,6 +28,7 @@
 #include <core/threading/thread.h>
 #include <aspect/logging.h>
 #include <aspect/configurable.h>
+#include <plugins/clips/aspect/clips_feature.h>
 #include <plugins/robot-memory/aspect/robot_memory_aspect.h>
 
 #include <string>
@@ -74,17 +75,17 @@ class ClipsRobotMemoryThread
   void          clips_bson_array_finish(void *barr);
   void          clips_bson_array_append(void *barr, CLIPS::Value value);
   std::string   clips_bson_tostring(void *bson);
-  void          clips_mongodb_upsert(std::string collection, void *bson, CLIPS::Value query);
-  void          clips_mongodb_update(std::string collection, void *bson, CLIPS::Value query);
-  void          clips_mongodb_replace(std::string collection, void *bson, CLIPS::Value query);
-  void          clips_mongodb_insert(std::string collection, void *bson);
-  void          mongodb_update(std::string &collection, mongo::BSONObj obj,
+  void          clips_robotmemory_upsert(std::string collection, void *bson, CLIPS::Value query);
+  void          clips_robotmemory_update(std::string collection, void *bson, CLIPS::Value query);
+  void          clips_robotmemory_replace(std::string collection, void *bson, CLIPS::Value query);
+  void          clips_robotmemory_insert(std::string collection, void *bson);
+  void          robotmemory_update(std::string &collection, mongo::BSONObj obj,
                                CLIPS::Value &query, bool upsert);
-  CLIPS::Value  clips_mongodb_query_sort(std::string collection, void *bson, void *bson_sort);
-  CLIPS::Value  clips_mongodb_query(std::string collection, void *bson);
-  CLIPS::Value  clips_mongodb_cursor_more(void *cursor);
-  CLIPS::Value  clips_mongodb_cursor_next(void *cursor);
-  void          clips_mongodb_cursor_destroy(void *cursor);
+  CLIPS::Value  clips_robotmemory_query_sort(std::string collection, void *bson, void *bson_sort);
+  CLIPS::Value  clips_robotmemory_query(std::string collection, void *bson);
+  CLIPS::Value  clips_robotmemory_cursor_more(void *cursor);
+  CLIPS::Value  clips_robotmemory_cursor_next(void *cursor);
+  void          clips_robotmemory_cursor_destroy(void *cursor);
   CLIPS::Values clips_bson_field_names(void *bson);
   CLIPS::Value  clips_bson_get(void *bson, std::string field_name);
   CLIPS::Values clips_bson_get_array(void *bson, std::string field_name);

- *commit* c0357cb0cb7d0e11834b83ccdd3edfb6f1f3ac5a - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Tue Sep 13 18:01:15 2016 +0200
Subject: clips-robot-memory: function to create BSON doc from structured fact

 .../clips_robot_memory_thread.cpp                  |    3 +-
 src/plugins/clips-robot-memory/robot-memory.clp    |   29 ++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/clips-robot-memory/clips_robot_memory_thread.cpp b/src/plugins/clips-robot-memory/clips_robot_memory_thread.cpp
index fdd9231..7b5c589 100644
--- a/src/plugins/clips-robot-memory/clips_robot_memory_thread.cpp
+++ b/src/plugins/clips-robot-memory/clips_robot_memory_thread.cpp
@@ -89,7 +89,8 @@ ClipsRobotMemoryThread::clips_context_init(const std::string &env_name,
 
   clips->build("(deffacts have-feature-mongodb (have-feature MongoDB))");
 
-  //TODO: clips->batch_evaluate(SRCDIR"/plugins/clips-robot-memory/robot_memory.clp");
+  //load helper functions written in CLIPS
+  clips->batch_evaluate(SRCDIR"/robot-memory.clp");
 
   clips.unlock();
 }

- *commit* 54478d8068bd92d09e339929974a5ce260b54089 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Tue Sep 13 18:19:27 2016 +0200
Subject: clips-robot-memory: create BSON document from ordered fact

 src/plugins/clips-robot-memory/robot-memory.clp |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/clips-robot-memory/robot-memory.clp b/src/plugins/clips-robot-memory/robot-memory.clp
index dc29baf..aa75186 100644
--- a/src/plugins/clips-robot-memory/robot-memory.clp
+++ b/src/plugins/clips-robot-memory/robot-memory.clp
@@ -13,7 +13,7 @@
 (deffunction rm-structured-fact-to-bson (?fact)
   (bind ?doc (bson-create))
   (bind ?templ (fact-relation ?fact))
-  (bson-append ?doc "type" (str-cat ?templ))
+  (bson-append ?doc "relation" (str-cat ?templ))
   ;append kv-pair for each field
   (progn$ (?slot (fact-slot-names ?fact))
     (if (deftemplate-slot-multip ?templ ?slot)
@@ -27,3 +27,15 @@
   )      
   (return ?doc)
 )
+
+;; Creates a BSON document from an ordered fact
+; @param ?fact Fact-Pointer
+; @return BSON document
+(deffunction rm-ordered-fact-to-bson (?fact)
+  (bind ?doc (bson-create))
+  (bind ?templ (fact-relation ?fact))
+  (bson-append ?doc "relation" (str-cat ?templ))
+  ;append values as array
+  (bson-append-array ?doc "values" (fact-slot-value ?fact implied))
+  (return ?doc)
+)

- *commit* 69195c38a75ac601772b9cabd4dad09040d421eb - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Tue Sep 13 19:15:24 2016 +0200
Subject: clips-robot-memory: assert facts from bson document

 src/plugins/clips-robot-memory/robot-memory.clp |   34 +++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/clips-robot-memory/robot-memory.clp b/src/plugins/clips-robot-memory/robot-memory.clp
index aa75186..709f6bb 100644
--- a/src/plugins/clips-robot-memory/robot-memory.clp
+++ b/src/plugins/clips-robot-memory/robot-memory.clp
@@ -39,3 +39,37 @@
   (bson-append-array ?doc "values" (fact-slot-value ?fact implied))
   (return ?doc)
 )
+
+;; Assert (structured/ordered) fact from a BSON document
+; @param ?doc BSON document
+(deffunction rm-assert-from-bson (?doc)
+  (bind ?relation "")
+  (bind ?values "")
+  (bind ?keys (bson-field-names ?doc))
+  (if (member$ "relation" ?keys)
+    then
+    (bind ?relation (bson-get ?doc "relation"))
+    else
+    (printout error "Can not create fact from " (bson-tostring ?doc) crlf)
+    (return)
+  )
+  (if (member$ ?relation (get-deftemplate-list *))
+    then ;structured fact
+    (progn$ (?slot ?keys)
+      (if (deftemplate-slot-existp ?relation ?slot) then
+        (if (deftemplate-slot-multip ?relation ?slot)
+          then
+          (bind ?values (str-cat ?values "(" ?relation " " (bson-get ?doc ?slot) ")"))
+          else
+          (bind ?values (str-cat ?values "(" ?relation " " (implode$ (bson-get-array ?doc ?slot)) ")"))
+        )
+      )
+    )
+    else ;ordered fact
+    (if (member$ "values" ?keys) then
+      (bind ?values (str-cat ?values "(" ?relation " " (implode$ (bson-get-array ?doc "values")) ")"))
+    )
+  )
+  
+  (assert-string (str-cat "(" ?relation " " ?values ")"))
+)




-- 
Fawkes Robotics Framework                 http://www.fawkesrobotics.org


More information about the fawkes-commits mailing list