Changes have been pushed for the repository "fawkesrobotics/fawkes".
Clone: https://github.com/fawkesrobotics/fawkes.git Gitweb: https://github.com/fawkesrobotics/fawkes The branch, dswoboda/game-state-loading has been created at e1915c5f3b59bee79c1ff62491e7d838211d68a5 (commit) https://github.com/fawkesrobotics/fawkes/tree/dswoboda/game-state-loading - *Log* --------------------------------------------------------------- commit 8377bada9358fd21c6b0e6e8590f8800591c9d3d Author: Daniel Swoboda <[email protected]> AuthorDate: Sun Oct 18 13:14:46 2020 +0200 Commit: Daniel Swoboda <[email protected]> CommitDate: Sun Oct 18 13:14:46 2020 +0200 reactivate mongodb_log plugin https://github.com/fawkesrobotics/fawkes/commit/8377bada9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 41542385d92045953441af3658820c42d2254461 Author: Daniel Swoboda <[email protected]> AuthorDate: Sat Oct 24 17:52:36 2020 +0200 Commit: Daniel Swoboda <[email protected]> CommitDate: Sun Oct 25 15:40:22 2020 +0100 mongodb_log: track world fact history in DB from logs track incoming log messages, detect domain fact asserations and retractions, log the content in a persistent mongodb database such that the world model at any time can be restored. https://github.com/fawkesrobotics/fawkes/commit/41542385d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 4acbbd43d260280394378fa5922b8ee315490bf6 Author: Daniel Swoboda <[email protected]> AuthorDate: Sun Oct 25 15:51:47 2020 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Sun Oct 25 15:51:47 2020 +0100 mongodb_log: fix error in string parsing fix error that cut fact ids too short, leading to incomplete fact ids being stored in the database, causing update failures. https://github.com/fawkesrobotics/fawkes/commit/4acbbd43d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit a5112e3a53636b658e20214854487879d90c4bae Merge: 4acbbd43d e7553a97a Author: Daniel Swoboda <[email protected]> AuthorDate: Thu Oct 29 11:56:00 2020 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Thu Oct 29 11:56:00 2020 +0100 Merge remote-tracking branch 'origin/tviehmann/repair-pddl-robot-memory' into dswoboda/game-state-loading https://github.com/fawkesrobotics/fawkes/commit/a5112e3a5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 3c8d49aebfff6a528d58e8d96e7d9e7ffb01e881 Merge: a5112e3a5 31e80315f Author: Daniel Swoboda <[email protected]> AuthorDate: Sun Nov 8 16:45:20 2020 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Sun Nov 8 16:45:20 2020 +0100 Merge remote-tracking branch 'origin/master' into dswoboda/game-state-loading https://github.com/fawkesrobotics/fawkes/commit/3c8d49aeb - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 630e1e0047f24a082b5fabdf615300e9e29e3fc5 Author: Daniel Swoboda <[email protected]> AuthorDate: Sun Nov 8 17:14:26 2020 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Sun Nov 8 17:14:26 2020 +0100 mongodb_log: fix port originally the local port was used, replace with robot-memory-local port for robot 1, so that it can be access from CLIPS. https://github.com/fawkesrobotics/fawkes/commit/630e1e004 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit a0cd56298cf834a2b0eb7c91058afd0e7f149bb7 Author: Daniel Swoboda <[email protected]> AuthorDate: Sun Nov 8 17:26:32 2020 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Sun Nov 8 17:26:32 2020 +0100 mongodb: add date object from iso 8601 string to bson doc mongodb uses ISO8601 UTC representation of time objects when a collection is viewed with a client. With this method, a bson date object can be created using that same representation in CLIPS. This supports user guided queries. https://github.com/fawkesrobotics/fawkes/commit/a0cd56298 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit de0fa1bbeb50aaf383d67ac36f4c728c2e877856 Author: Daniel Swoboda <[email protected]> AuthorDate: Sun Nov 8 17:29:07 2020 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Sun Nov 8 17:29:07 2020 +0100 mongodb: add methods to perform aggregate queries in CLIPS RobotMemory supports aggregates using pipelines. Extend this functionality to ClipsRobotMemory, to allow pipeline based aggregate queries with match and projection to be created and executed from CLIPS. https://github.com/fawkesrobotics/fawkes/commit/de0fa1bbe - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 3ea36f19b6932904c28fad63db03375b6d79b7fd Author: Daniel Swoboda <[email protected]> AuthorDate: Sun Nov 8 17:31:09 2020 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Sun Nov 8 17:31:09 2020 +0100 cx: load a stored games tate from a mongodb collection given a game id (time) and point in time (time) create a query and projection on an aggregate to get the game state at the given timepoint in the game in a shared world-model like fact representation. https://github.com/fawkesrobotics/fawkes/commit/3ea36f19b - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 9126e1e75387bfba1296edd358edf7e9406c0a0b Author: Daniel Swoboda <[email protected]> AuthorDate: Sun Nov 15 11:39:33 2020 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Sun Nov 15 11:39:33 2020 +0100 cx: fix wrong return value in wm-robmem-load-from-storage https://github.com/fawkesrobotics/fawkes/commit/9126e1e75 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 414003de9fd87309a60a19f7c3743d6b668a5e28 Author: Daniel Swoboda <[email protected]> AuthorDate: Mon Dec 21 00:25:35 2020 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Mon Dec 21 00:25:35 2020 +0100 mongodb_log: use gametime and clips id to update already saved facts previous version used only clips fact id, resulting in inconsistent updates across multiple robots since fact ids are unique, therefore use unique gametime as an additional match https://github.com/fawkesrobotics/fawkes/commit/414003de9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 3f2b1dd312228cf64c866979462ee900791c14e6 Author: Daniel Swoboda <[email protected]> AuthorDate: Mon Dec 21 00:42:19 2020 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Mon Dec 21 00:42:19 2020 +0100 cx: add missing check of modification wm-sync-domain-object-added modify without modification does not lead to a new fact pointer. Check if a new pointer was created before attempting to work with it. https://github.com/fawkesrobotics/fawkes/commit/3f2b1dd31 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 105df432eb6b5d11480baa69810e71cd47aa6f9d Author: Daniel Swoboda <[email protected]> AuthorDate: Wed Jan 20 19:35:33 2021 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Wed Jan 20 19:35:33 2021 +0100 mongodb_log: set to log only on Icks https://github.com/fawkesrobotics/fawkes/commit/105df432e - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 34ed069f98db9a211f508d479e40c13bfb193beb Author: Daniel Swoboda <[email protected]> AuthorDate: Wed Jan 27 13:48:43 2021 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Wed Jan 27 13:48:43 2021 +0100 mongodb_log: add gamestate to logged data tracking when the gamestate is set to running allows better suggestions for the gamestate loading script. https://github.com/fawkesrobotics/fawkes/commit/34ed069f9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit fcc16e80c9308f4ac41a16889f64ddf6d7ef9b4b Author: Daniel Swoboda <[email protected]> AuthorDate: Wed Jan 27 13:51:29 2021 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Wed Jan 27 13:51:29 2021 +0100 mongodb_log: add rule firing to logged data monitor the firing of rules to provide better information for the gamestate loading script, as the states that are in the middle of a rule execution can be excluded, leading to less potential conflicts. https://github.com/fawkesrobotics/fawkes/commit/fcc16e80c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit c018158b8491bd1b7e52fbc469034ebc088fe23c Author: Daniel Swoboda <[email protected]> AuthorDate: Thu Feb 18 23:04:12 2021 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Thu Feb 18 23:04:12 2021 +0100 mongodb_log: fix bug that skipped last entry of values array the last entry of the values slot was ignored due to an oversight. Fixed now. https://github.com/fawkesrobotics/fawkes/commit/c018158b8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit f1b6fad2b0b9d5d9d13ab7f3ab685d66be8fdfc6 Author: Daniel Swoboda <[email protected]> AuthorDate: Thu Feb 18 23:05:09 2021 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Thu Feb 18 23:05:09 2021 +0100 mongodb_log: add refbox and order facts to logging Previously only domain facts were logged. These do not contain enough information to generate a gamereport,therefore add refbox and order facts. https://github.com/fawkesrobotics/fawkes/commit/f1b6fad2b - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 52a37b83737d91803a6dc1f34db3d591513e2c9d Author: Daniel Swoboda <[email protected]> AuthorDate: Thu Feb 18 23:06:10 2021 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Thu Feb 18 23:06:10 2021 +0100 mongodb_log: add different categories for gamephase and gamestate previously gamephase and gamestate were treated as equals in the logging of phase changes, add categories to keep them apart. https://github.com/fawkesrobotics/fawkes/commit/52a37b837 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit db4192bdeb8005c119b905ba92ddeb584009c5c0 Author: Daniel Swoboda <[email protected]> AuthorDate: Wed Mar 24 16:03:28 2021 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Wed Mar 24 16:03:28 2021 +0100 mongodb_log: add refbox/comm to tracked facts The facts in refboxx/comm are needed for complete gamestate restoration. Add these facts to the tracking list. https://github.com/fawkesrobotics/fawkes/commit/db4192bde - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 24419bed3fac5ee8fe7187f753f96ee37fd683ac Author: Daniel Swoboda <[email protected]> AuthorDate: Wed Mar 24 16:04:15 2021 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Wed Mar 24 16:04:15 2021 +0100 mongodb_log: fix broken retraction tracking Only retractions of /domain where monitored. Add the missing fact key prefixes of all the other tracked facts to ensure proper retraction tracking. https://github.com/fawkesrobotics/fawkes/commit/24419bed3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 879bc80bc45ede8ac46d9dc17da85db15e8bff3f Author: Daniel Swoboda <[email protected]> AuthorDate: Sat Mar 27 20:11:14 2021 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Sat Mar 27 20:11:14 2021 +0100 mongodb_log: switch to regex based comparison https://github.com/fawkesrobotics/fawkes/commit/879bc80bc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit e992ccb77e8a0d679f48ee79b4740ae6ab866f0f Author: Daniel Swoboda <[email protected]> AuthorDate: Sat Mar 27 20:20:39 2021 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Sat Mar 27 20:20:39 2021 +0100 mongodb_log: use variable for collection name https://github.com/fawkesrobotics/fawkes/commit/e992ccb77 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 917429adb61cec0f21ec8517fba58dab320245d2 Author: Daniel Swoboda <[email protected]> AuthorDate: Sat Mar 27 20:34:45 2021 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Sat Mar 27 20:34:45 2021 +0100 mongodb_log: fix formatting https://github.com/fawkesrobotics/fawkes/commit/917429adb - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit e1915c5f3b59bee79c1ff62491e7d838211d68a5 Merge: 917429adb 5a39ae60e Author: Daniel Swoboda <[email protected]> AuthorDate: Sat Mar 27 21:06:29 2021 +0100 Commit: Daniel Swoboda <[email protected]> CommitDate: Sat Mar 27 21:06:29 2021 +0100 Merge branch 'master' into dswoboda/game-state-loading https://github.com/fawkesrobotics/fawkes/commit/e1915c5f3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *Summary* ----------------------------------------------------------- .buildkite/pipeline.yml | 28 +--- .buildkite/steps.d/10-freebsd.sh | 44 ----- .buildkite/steps.d/10-freebsd.yml | 11 -- .buildkite/steps.d/20-webview-frontend.yml | 6 +- cfg/conf.d/clips-executive.yaml | 1 + etc/buildsys/btypes/config_fawkes.mk | 2 +- etc/buildsys/fvconf.mk | 9 +- etc/buildsys/interface.mk | 4 +- etc/buildsys/lua.mk | 2 +- etc/buildsys/pcl.mk | 2 +- etc/buildsys/ros.mk | 2 +- src/libs/Makefile | 2 +- src/libs/baseapp/init_options.h | 2 +- src/libs/blackboard/interface_list_maintainer.cpp | 4 +- src/libs/blackboard/interface_list_maintainer.h | 5 +- src/libs/blackboard/interface_listener.cpp | 34 +++- src/libs/blackboard/interface_listener.h | 13 +- src/libs/blackboard/internal/interface_manager.cpp | 20 +-- src/libs/blackboard/internal/interface_manager.h | 9 +- src/libs/blackboard/internal/memory_manager.cpp | 6 +- src/libs/blackboard/internal/notifier.cpp | 16 +- src/libs/blackboard/internal/notifier.h | 15 +- src/libs/blackboard/local.h | 2 +- src/libs/blackboard/net/handler.cpp | 58 ++++--- src/libs/blackboard/net/handler.h | 11 +- src/libs/blackboard/net/interface_listener.cpp | 56 +++++-- src/libs/blackboard/net/interface_listener.h | 15 +- src/libs/blackboard/net/interface_proxy.cpp | 76 +++++---- src/libs/blackboard/net/interface_proxy.h | 27 +-- src/libs/blackboard/net/messages.h | 48 +++--- src/libs/blackboard/ownership.h | 2 +- src/libs/blackboard/qa/qa_bb_notify.cpp | 2 +- src/libs/blackboard/qa/qa_bb_remote.cpp | 2 +- src/libs/blackboard/remote.cpp | 28 ++-- src/libs/blackboard/remote.h | 21 +-- src/libs/blackboard/utils/on_update_waker.cpp | 2 +- src/libs/blackboard/utils/on_update_waker.h | 2 +- src/libs/config/config.h | 9 +- src/libs/config/config.tolua | 3 + src/libs/config/yaml.h | 2 +- src/libs/core/tests/Makefile | 2 +- .../core/tests/catch2_main.cpp} | 15 +- src/libs/core/tests/test_circular_buffer.cpp | 25 ++- src/libs/core/threading/spinlock.cpp | 2 +- src/libs/core/utils/circular_buffer.h | 20 +++ src/libs/fvcams/v4l1.cpp | 4 +- src/libs/fvclassifiers/classifier.h | 2 +- src/libs/fvmodels/color/thresholds_black.cpp | 4 +- src/libs/fvmodels/mirror/mirror_calib.h | 4 +- src/libs/fvutils/draw/drawer.h | 2 +- src/libs/fvutils/draw/field_drawer.h | 2 +- src/libs/fvutils/draw/mono_drawer.h | 2 +- src/libs/gui_utils/interface_dispatcher.cpp | 14 +- src/libs/gui_utils/interface_dispatcher.h | 14 +- src/libs/gui_utils/service_model.h | 2 +- src/libs/gui_utils/twolines_cellrenderer.h | 2 +- src/libs/interface/Makefile | 2 +- src/libs/interface/change_field.h | 92 ++++++++++ src/libs/interface/field_iterator.cpp | 54 +++--- src/libs/interface/interface.cpp | 79 ++++++--- src/libs/interface/interface.h | 49 +++++- src/libs/interface/interface.tolua | 8 +- src/libs/interface/mediators/interface_mediator.h | 4 +- src/libs/interface/message.cpp | 49 +++++- src/libs/interface/message.h | 100 ++++------- src/libs/interface/message.tolua | 3 +- src/libs/interfaces/SkillerInterface.xml | 3 +- src/libs/interfaces/generator/cpp_generator.cpp | 20 +-- src/libs/interfaces/generator/cpp_generator.h | 5 +- src/libs/interfaces/generator/tolua_generator.cpp | 5 +- src/libs/interfaces/generator/tolua_generator.h | 2 +- src/libs/logging/cache.h | 2 +- src/libs/logging/console.h | 2 +- src/libs/logging/fd_redirect.cpp | 2 +- src/libs/logging/file.h | 2 +- src/libs/logging/multi.h | 4 +- src/libs/logging/syslog.h | 2 +- src/libs/lua/context.h | 2 +- src/libs/netcomm/fawkes/server_thread.h | 2 +- src/libs/netcomm/utils/resolver_thread.h | 2 +- src/libs/network_logger/network_logger.h | 2 +- src/libs/protoboard/protobuf_to_bb.h | 5 + src/libs/protobuf_clips/communicator.cpp | 2 +- src/libs/protobuf_clips/communicator.h | 2 +- src/libs/protobuf_comm/server.h | 2 +- src/libs/syncpoint/syncpoint.cpp | 19 ++- src/libs/tf/time_cache.h | 10 +- src/libs/tf/transform_listener.cpp | 12 +- src/libs/tf/transform_listener.h | 8 +- src/libs/utils/Makefile | 4 +- src/libs/utils/ipc/shm.h | 2 +- .../tests}/Makefile | 39 ++--- .../utils/tests/catch2_main.cpp} | 14 +- src/libs/utils/tests/test_uuid.cpp | 77 +++++++++ src/libs/utils/uuid.cpp | 147 ++++++++++++++++ .../{syncpoint/syncpoint_call.h => utils/uuid.h} | 39 +++-- .../libs/webview/microhttpd_compat.h | 17 ++ src/libs/webview/request.cpp | 9 +- src/libs/webview/request_dispatcher.cpp | 28 ++-- src/libs/webview/request_dispatcher.h | 40 ++--- src/libs/webview/server.cpp | 3 +- src/libs/webview/webview.mk | 6 + src/lua/skiller/fawkes/init.lua | 17 +- src/plugins/amcl/amcl_thread.cpp | 2 +- src/plugins/bblogger/log_thread.cpp | 8 +- src/plugins/bblogger/log_thread.h | 7 +- src/plugins/bbsync/sync_listener.cpp | 16 +- src/plugins/bbsync/sync_listener.h | 2 +- src/plugins/bbsync/sync_thread.cpp | 3 + src/plugins/bbsync/writer_listener.cpp | 4 +- src/plugins/bbsync/writer_listener.h | 4 +- .../clips-executive/clips/coordination-mutex.clp | 38 +++-- src/plugins/clips-executive/clips/domain.clp | 38 +++-- src/plugins/clips-executive/clips/goal-tree.clp | 47 ++++++ .../clips-executive/clips/goals/run-all.clp | 2 +- .../clips-executive/clips/goals/run-parallel.clp | 153 +++++++++++++++++ .../clips-executive/clips/goals/try-all.clp | 6 +- src/plugins/clips-executive/clips/lock-actions.clp | 15 +- .../clips/test-scenario/domain.pddl | 4 + .../clips/test-scenario/goal-reasoner.clp | 29 +++- .../clips/test-scenario/goals/talk.clp | 11 +- .../clips/test-scenario/plans/talk-plan.clp | 19 +++ .../clips/test-scenario/print-action.clp | 7 + .../clips-executive/clips/wm-domain-sync.clp | 4 +- .../clips-executive/clips/wm-robmem-sync.clp | 47 +++++- .../clips_robot_memory_thread.cpp | 186 ++++++++++++++++----- .../clips-robot-memory/clips_robot_memory_thread.h | 15 +- src/plugins/clips-tf/clips_tf_thread.h | 2 +- src/plugins/clips/clips/blackboard.clp | 2 +- src/plugins/clips/feature_blackboard.cpp | 10 +- src/plugins/eclipse-clp/externals/blackboard.cpp | 4 +- src/plugins/gazebo/gazebo.mk | 5 + .../gazebo/gazsim-laser/gazsim_laser_thread.cpp | 2 +- .../gazebo/gazsim-localization/gazebo-plugin/gps.h | 2 +- .../gazsim-robotino/gazebo-plugin-gyro/gyro.h | 2 +- .../gazsim-robotino/gazebo-plugin-motor/motor.h | 2 +- .../gazsim-robotino/gazsim_robotino_thread.cpp | 77 ++++++--- src/plugins/gazebo/node_thread.cpp | 37 ++-- src/plugins/gazebo/node_thread.h | 5 +- src/plugins/gologpp/exog_manager.cpp | 2 +- src/plugins/gologpp/exog_manager.h | 2 +- src/plugins/gologpp/skiller_action_executor.cpp | 2 +- src/plugins/gologpp/skiller_action_executor.h | 2 +- src/plugins/jaco/arm_dummy.h | 2 +- src/plugins/jaco/arm_kindrv.h | 2 +- src/plugins/joystick/ffjoystick.cpp | 2 +- src/plugins/katana/controller_kni.h | 2 +- src/plugins/katana/controller_openrave.h | 2 +- src/plugins/katana/goto_openrave_thread.h | 2 +- src/plugins/laser-filter/deadspots/deadspots.cpp | 2 +- src/plugins/laser-lines/line_info.h | 4 +- .../laser-pointclouds/laser_pointcloud_thread.cpp | 6 +- .../laser-pointclouds/laser_pointcloud_thread.h | 4 +- src/plugins/laser/sick_tim55x_ethernet_aqt.cpp | 2 +- src/plugins/metrics/metrics_thread.cpp | 2 +- src/plugins/metrics/metrics_thread.h | 2 +- src/plugins/mongodb/mongodb_instance_config.cpp | 28 +++- src/plugins/mongodb/mongodb_instance_config.h | 1 + src/plugins/mongodb/mongodb_replicaset_config.cpp | 2 +- src/plugins/mongodb_log/mongodb_log_bb_thread.cpp | 3 +- src/plugins/mongodb_log/mongodb_log_bb_thread.h | 2 +- .../mongodb_log/mongodb_log_logger_thread.cpp | 124 ++++++++++++-- .../mongodb_log/mongodb_log_logger_thread.h | 13 +- src/plugins/nao/button_thread.cpp | 2 +- src/plugins/nao/dcm_thread.cpp | 2 +- .../navgraph-clusters/navgraph_clusters_thread.cpp | 4 +- .../navgraph-clusters/navgraph_clusters_thread.h | 4 +- src/plugins/openprs/mod_blackboard.cpp | 2 +- src/plugins/openprs/openprs_thread.cpp | 2 +- src/plugins/openprs/utils/openprs_mp_proxy.cpp | 2 +- src/plugins/openprs/utils/openprs_server_proxy.cpp | 2 +- src/plugins/openrave/environment.cpp | 2 +- src/plugins/openrave/environment.h | 2 +- src/plugins/openrave/openrave_thread.h | 4 +- src/plugins/openrave/robot.h | 2 +- src/plugins/pddl-planner/Makefile | 8 +- src/plugins/pddl-planner/pddl-planner_thread.cpp | 25 ++- src/plugins/pddl-robot-memory/Makefile | 12 +- .../pddl-robot-memory/pddl_robot_memory_thread.cpp | 58 +++++-- src/plugins/perception/tabletop-objects/Makefile | 4 - .../tabletop-objects/tabletop_objects_thread.h | 2 +- src/plugins/plexil/be_adapter.cpp | 2 +- src/plugins/plexil/be_adapter.h | 2 +- src/plugins/plexil/blackboard_adapter.cpp | 4 +- src/plugins/plexil/blackboard_adapter.h | 2 +- src/plugins/plexil/plexil.mk | 2 +- src/plugins/plexil/protobuf_adapter.cpp | 1 + src/plugins/plexil/protobuf_adapter.h | 2 +- src/plugins/realsense/Makefile | 42 +++-- src/plugins/refboxcomm/processor/spl.h | 6 +- src/plugins/robot-memory/Makefile | 2 +- src/plugins/robot-memory/aspect/Makefile | 11 +- src/plugins/robot-memory/event_trigger_manager.cpp | 2 +- src/plugins/robot-memory/robot_memory.cpp | 73 ++------ src/plugins/robot-memory/robot_memory.h | 10 +- .../robot_state_publisher_thread.cpp | 10 +- .../robot_state_publisher_thread.h | 6 +- src/plugins/robotino/act_thread.cpp | 2 +- src/plugins/robotino/com_thread.h | 4 +- src/plugins/robotino/direct_com_thread.cpp | 2 +- src/plugins/robotino/direct_com_thread.h | 2 +- src/plugins/robotino/ir_pcl_thread.cpp | 2 +- src/plugins/robotino/openrobotino_com_thread.h | 2 +- src/plugins/robotino/ros_joints_thread.cpp | 2 +- src/plugins/roomba/roombajoy_thread.cpp | 2 +- src/plugins/ros/imu_thread.cpp | 2 +- src/plugins/ros/imu_thread.h | 2 +- src/plugins/ros/joint_thread.cpp | 8 +- src/plugins/ros/joint_thread.h | 6 +- src/plugins/ros/laserscan_thread.cpp | 6 +- src/plugins/ros/laserscan_thread.h | 6 +- src/plugins/ros/position_3d_thread.cpp | 8 +- src/plugins/ros/position_3d_thread.h | 6 +- src/plugins/ros/skiller_thread.cpp | 2 +- src/plugins/ros/tf_thread.cpp | 6 +- src/plugins/ros/tf_thread.h | 6 +- src/plugins/skiller-simulator/exec_thread.cpp | 22 ++- src/plugins/skiller/exec_thread.cpp | 8 +- src/plugins/skiller/exec_thread.h | 4 +- src/plugins/skiller/rest-api/api.yaml | 3 +- src/plugins/skiller/rest-api/model/Skill.cpp | 6 +- src/plugins/skiller/rest-api/model/Skill.h | 8 +- src/plugins/stn-generator/stn-generator_thread.cpp | 2 +- src/plugins/stn-generator/stn-generator_thread.h | 2 +- src/plugins/webview/Makefile | 4 +- src/tools/laser_calibration/Makefile | 6 +- src/tools/lasergui/visdisplay.cpp | 10 +- src/tools/lasergui/visdisplay.h | 14 +- src/tools/skillgui/graph_drawing_area.h | 2 +- src/tools/skillgui/skillgui.h | 2 +- src/tools/vision/firestation/firestation.cpp | 2 +- 231 files changed, 2135 insertions(+), 1102 deletions(-) delete mode 100755 .buildkite/steps.d/10-freebsd.sh delete mode 100644 .buildkite/steps.d/10-freebsd.yml copy src/{plugins/gazebo/msgs/Float.proto => libs/core/tests/catch2_main.cpp} (77%) create mode 100644 src/libs/interface/change_field.h copy src/libs/{execution_time_estimator => utils/tests}/Makefile (53%) copy src/{plugins/gazebo/msgs/Float.proto => libs/utils/tests/catch2_main.cpp} (77%) create mode 100644 src/libs/utils/tests/test_uuid.cpp create mode 100644 src/libs/utils/uuid.cpp copy src/libs/{syncpoint/syncpoint_call.h => utils/uuid.h} (55%) copy doc/headers/lichead_c.GPL => src/libs/webview/microhttpd_compat.h (65%) create mode 100644 src/plugins/clips-executive/clips/goals/run-parallel.clp - *Diffs* ------------------------------------------------------------- - *commit* 8377bada9358fd21c6b0e6e8590f8800591c9d3d - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Sun Oct 18 13:14:46 2020 +0200 Subject: reactivate mongodb_log plugin src/plugins/Makefile | 2 +- .../mongodb_log/mongodb_log_logger_thread.cpp | 171 ++++++++++----------- src/plugins/mongodb_log/mongodb_log_plugin.cpp | 52 +------ 3 files changed, 87 insertions(+), 138 deletions(-) _Diff for modified files_: diff --git a/src/plugins/Makefile b/src/plugins/Makefile index 4f86cf2a4..e332d803e 100644 --- a/src/plugins/Makefile +++ b/src/plugins/Makefile @@ -32,7 +32,7 @@ SUBDIRS = bbsync bblogger webview ttmainloop rrd \ openrave-robot-memory openni refboxcomm ros player xmlrpc gossip \ robot_state_publisher gazebo dynamixel navgraph-interactive \ pddl-planner stn-generator clips-executive \ - asp plexil cedar gologpp hardware-models execution-time-estimator + asp plexil cedar hardware-models execution-time-estimator include $(BUILDSYSDIR)/rules.mk diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp index 33bb1d32b..b71634bc3 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp @@ -27,6 +27,9 @@ #include <bsoncxx/builder/basic/document.hpp> #include <mongocxx/client.hpp> #include <mongocxx/exception/operation_exception.hpp> +#include <bsoncxx/json.hpp> + +#include <iostream> using namespace mongocxx; using namespace fawkes; @@ -58,6 +61,8 @@ MongoLogLoggerThread::init() { database_ = config->get_string_or_default("/plugins/mongodb/logger/database", "fawkes"); collection_ = config->get_string_or_default("/plugins/mongodb/logger/collection", "msglog"); + mongocxx::uri uri("mongodb://localhost:27017"); + mongodb_client = new mongocxx::client(uri); } void @@ -76,16 +81,45 @@ MongoLogLoggerThread::insert_message(LogLevel ll, const char *format, va_list va) { - if (log_level <= ll) { - MutexLocker lock(mutex_); - bsoncxx::types::b_date nowd{std::chrono::high_resolution_clock::now()}; + MutexLocker lock(mutex_); + bsoncxx::types::b_date nowd{std::chrono::high_resolution_clock::now()}; - char *msg; - if (vasprintf(&msg, format, va) == -1) { - // Cannot do anything useful, drop log message - return; - } + char *msg; + if (vasprintf(&msg, format, va) == -1) { + // Cannot do anything useful, drop log message + return; + } + + + using namespace bsoncxx::builder; + basic::document b; + switch (ll) { + case LL_DEBUG: b.append(basic::kvp("level", "DEBUG")); break; + case LL_INFO: b.append(basic::kvp("level", "INFO")); break; + case LL_WARN: b.append(basic::kvp("level", "WARN")); break; + case LL_ERROR: b.append(basic::kvp("level", "ERROR")); break; + default: b.append(basic::kvp("level", "UNKN")); break; + } + b.append(basic::kvp("component", component)); + b.append(basic::kvp("time", nowd)); + b.append(basic::kvp("message", msg)); + + free(msg); + + try { + mongodb_client->database(database_)[collection_].insert_one(b.view()); + } catch (operation_exception &e) { + } // ignored +} + +void +MongoLogLoggerThread::insert_message(LogLevel ll, const char *component, Exception &e) +{ + MutexLocker lock(mutex_); + bsoncxx::types::b_date nowd{std::chrono::high_resolution_clock::now()}; + + for (Exception::iterator i = e.begin(); i != e.end(); ++i) { using namespace bsoncxx::builder; basic::document b; switch (ll) { @@ -97,10 +131,7 @@ MongoLogLoggerThread::insert_message(LogLevel ll, } b.append(basic::kvp("component", component)); b.append(basic::kvp("time", nowd)); - b.append(basic::kvp("message", msg)); - - free(msg); - + b.append(basic::kvp("message", std::string("[EXCEPTION] ") + *i)); try { mongodb_client->database(database_)[collection_].insert_one(b.view()); } catch (operation_exception &e) { @@ -109,34 +140,6 @@ MongoLogLoggerThread::insert_message(LogLevel ll, } void -MongoLogLoggerThread::insert_message(LogLevel ll, const char *component, Exception &e) -{ - if (log_level <= ll) { - MutexLocker lock(mutex_); - bsoncxx::types::b_date nowd{std::chrono::high_resolution_clock::now()}; - - for (Exception::iterator i = e.begin(); i != e.end(); ++i) { - using namespace bsoncxx::builder; - basic::document b; - switch (ll) { - case LL_DEBUG: b.append(basic::kvp("level", "DEBUG")); break; - case LL_INFO: b.append(basic::kvp("level", "INFO")); break; - case LL_WARN: b.append(basic::kvp("level", "WARN")); break; - case LL_ERROR: b.append(basic::kvp("level", "ERROR")); break; - default: b.append(basic::kvp("level", "UNKN")); break; - } - b.append(basic::kvp("component", component)); - b.append(basic::kvp("time", nowd)); - b.append(basic::kvp("message", std::string("[EXCEPTION] ") + *i)); - try { - mongodb_client->database(database_)[collection_].insert_one(b.view()); - } catch (operation_exception &e) { - } // ignored - } - } -} - -void MongoLogLoggerThread::vlog_debug(const char *component, const char *format, va_list va) { insert_message(LL_DEBUG, component, format, va); @@ -227,17 +230,49 @@ MongoLogLoggerThread::tlog_insert_message(LogLevel ll, const char * format, va_list va) { - if (log_level <= ll) { - MutexLocker lock(mutex_); - char * msg; - if (vasprintf(&msg, format, va) == -1) { - return; - } + MutexLocker lock(mutex_); + char * msg; + if (vasprintf(&msg, format, va) == -1) { + return; + } + + bsoncxx::types::b_date nowd{ + std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds>{ + std::chrono::milliseconds{t->tv_sec * 1000 + t->tv_usec / 1000}}}; + + using namespace bsoncxx::builder; + basic::document b; + switch (ll) { + case LL_DEBUG: b.append(basic::kvp("level", "DEBUG")); break; + case LL_INFO: b.append(basic::kvp("level", "INFO")); break; + case LL_WARN: b.append(basic::kvp("level", "WARN")); break; + case LL_ERROR: b.append(basic::kvp("level", "ERROR")); break; + default: b.append(basic::kvp("level", "UNKN")); break; + } + b.append(basic::kvp("component", component)); + b.append(basic::kvp("time", nowd)); + b.append(basic::kvp("message", msg)); + try { + mongodb_client->database(database_)[collection_].insert_one(b.view()); + } catch (operation_exception &e) { + } // ignored - bsoncxx::types::b_date nowd{ - std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds>{ - std::chrono::milliseconds{t->tv_sec * 1000 + t->tv_usec / 1000}}}; + free(msg); + mutex_->unlock(); +} + +void +MongoLogLoggerThread::tlog_insert_message(LogLevel ll, + struct timeval *t, + const char * component, + Exception & e) +{ + MutexLocker lock(mutex_); + bsoncxx::types::b_date nowd{ + std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds>{ + std::chrono::milliseconds{t->tv_sec * 1000 + t->tv_usec / 1000}}}; + for (Exception::iterator i = e.begin(); i != e.end(); ++i) { using namespace bsoncxx::builder; basic::document b; switch (ll) { @@ -249,47 +284,11 @@ MongoLogLoggerThread::tlog_insert_message(LogLevel ll, } b.append(basic::kvp("component", component)); b.append(basic::kvp("time", nowd)); - b.append(basic::kvp("message", msg)); + b.append(basic::kvp("message", std::string("[EXCEPTION] ") + *i)); try { mongodb_client->database(database_)[collection_].insert_one(b.view()); } catch (operation_exception &e) { } // ignored - - free(msg); - - mutex_->unlock(); - } -} - -void -MongoLogLoggerThread::tlog_insert_message(LogLevel ll, - struct timeval *t, - const char * component, - Exception & e) -{ - if (log_level <= ll) { - MutexLocker lock(mutex_); - bsoncxx::types::b_date nowd{ - std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds>{ - std::chrono::milliseconds{t->tv_sec * 1000 + t->tv_usec / 1000}}}; - for (Exception::iterator i = e.begin(); i != e.end(); ++i) { - using namespace bsoncxx::builder; - basic::document b; - switch (ll) { - case LL_DEBUG: b.append(basic::kvp("level", "DEBUG")); break; - case LL_INFO: b.append(basic::kvp("level", "INFO")); break; - case LL_WARN: b.append(basic::kvp("level", "WARN")); break; - case LL_ERROR: b.append(basic::kvp("level", "ERROR")); break; - default: b.append(basic::kvp("level", "UNKN")); break; - } - b.append(basic::kvp("component", component)); - b.append(basic::kvp("time", nowd)); - b.append(basic::kvp("message", std::string("[EXCEPTION] ") + *i)); - try { - mongodb_client->database(database_)[collection_].insert_one(b.view()); - } catch (operation_exception &e) { - } // ignored - } } } diff --git a/src/plugins/mongodb_log/mongodb_log_plugin.cpp b/src/plugins/mongodb_log/mongodb_log_plugin.cpp index 3df58e6a2..97bf5fba5 100644 --- a/src/plugins/mongodb_log/mongodb_log_plugin.cpp +++ b/src/plugins/mongodb_log/mongodb_log_plugin.cpp @@ -42,57 +42,7 @@ public: */ explicit MongoLogPlugin(Configuration *config) : Plugin(config) { - bool enable_bb = true; - try { - enable_bb = config->get_bool("/plugins/mongodb-log/enable-blackboard"); - } catch (Exception &e) { - } - if (enable_bb) { - thread_list.push_back(new MongoLogBlackboardThread()); - } - - bool enable_pcls = true; - try { - enable_pcls = config->get_bool("/plugins/mongodb-log/enable-pointclouds"); - } catch (Exception &e) { - } - if (enable_pcls) { - thread_list.push_back(new MongoLogPointCloudThread()); - } - - bool enable_images = true; - try { - enable_images = config->get_bool("/plugins/mongodb-log/enable-images"); - } catch (Exception &e) { - } - if (enable_images) { - thread_list.push_back(new MongoLogImagesThread()); - } - - bool enable_logger = true; - try { - enable_logger = config->get_bool("/plugins/mongodb-log/enable-logger"); - } catch (Exception &e) { - } - if (enable_logger) { - thread_list.push_back(new MongoLogLoggerThread()); - } - - bool enable_tf = true; - try { - enable_tf = config->get_bool("/plugins/mongodb-log/enable-transforms"); - } catch (Exception &e) { - } - if (enable_tf) { - thread_list.push_back(new MongoLogTransformsThread()); - } - - if (thread_list.empty()) { - throw Exception("MongoLogPlugin: no logging thread enabled"); - } - - std::string database = config->get_string("/plugins/mongodb-log/database"); - config->set_string("/plugins/mongorrd/databases/mongodb-log", database); + thread_list.push_back(new MongoLogLoggerThread()); } ~MongoLogPlugin() - *commit* 41542385d92045953441af3658820c42d2254461 - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Sat Oct 24 17:52:36 2020 +0200 Subject: mongodb_log: track world fact history in DB from logs .../mongodb_log/mongodb_log_logger_thread.cpp | 92 +++++++++++++++++++--- .../mongodb_log/mongodb_log_logger_thread.h | 7 +- 2 files changed, 86 insertions(+), 13 deletions(-) _Diff for modified files_: diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp index b71634bc3..11ae6f337 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp @@ -4,6 +4,7 @@ * * Created: Tue Dec 07 22:59:47 2010 * Copyright 2006-2017 Tim Niemueller [www.niemueller.de] + * 2020 Daniel Swoboda [[email protected]] ****************************************************************************/ /* This program is free software; you can redistribute it and/or modify @@ -24,16 +25,23 @@ #include <core/threading/mutex.h> #include <core/threading/mutex_locker.h> +#include <bsoncxx/builder/basic/array.hpp> #include <bsoncxx/builder/basic/document.hpp> -#include <mongocxx/client.hpp> -#include <mongocxx/exception/operation_exception.hpp> +#include <bsoncxx/builder/basic/kvp.hpp> #include <bsoncxx/json.hpp> - #include <iostream> +#include <mongocxx/client.hpp> +#include <mongocxx/exception/operation_exception.hpp> +#include <mongocxx/instance.hpp> +#include <mongocxx/options/find.hpp> +#include <mongocxx/uri.hpp> using namespace mongocxx; using namespace fawkes; +using bsoncxx::builder::basic::kvp; +using bsoncxx::builder::basic::make_document; + /** @class MongoLogLoggerThread "mongodb_log_logger_thread.h" * Thread that provides a logger writing to MongoDB. * This thread provides a logger, which writes log information to a @@ -90,7 +98,6 @@ MongoLogLoggerThread::insert_message(LogLevel ll, return; } - using namespace bsoncxx::builder; basic::document b; switch (ll) { @@ -104,13 +111,78 @@ MongoLogLoggerThread::insert_message(LogLevel ll, b.append(basic::kvp("component", component)); b.append(basic::kvp("time", nowd)); b.append(basic::kvp("message", msg)); - - free(msg); + b.append(basic::kvp("game", gametime_)); try { mongodb_client->database(database_)[collection_].insert_one(b.view()); } catch (operation_exception &e) { } // ignored + + std::string msg_s(msg); + + //track assertion + if (msg_s.find("(wm-fact (id \"/domain/") != std::string::npos + && msg_s.find("==>") != std::string::npos) { + basic::document df; + basic::document dfc; + df.append( + basic::kvp("id", + msg_s.substr(msg_s.find("(id \"") + 5, + msg_s.find("\")") - msg_s.find("(id \"") - 5))); + df.append(basic::kvp( + "is-list", + msg_s.substr(msg_s.find("(is-list ") + 9) + .substr(0, msg_s.substr(msg_s.find("(is-list ") + 9).find(")")))); + df.append(basic::kvp("source", + config->get_string_or_default("fawkes/agent/name", "UNKN"))); + df.append( + basic::kvp("type", + msg_s.substr(msg_s.find("(type ") + 6) + .substr(0, + msg_s.substr(msg_s.find("(type ") + 6).find(")")))); + if (msg_s.substr(msg_s.find("(is-list ") + 9) + .substr(0, msg_s.substr(msg_s.find("(is-list ") + 9).find(")")) + == "TRUE") { + auto array_builder = basic::array{}; + + std::string values_string = msg_s.substr(msg_s.find("(values") + 8) + .substr(0, msg_s.substr(msg_s.find("(values") + 8).find(")")); + + size_t pos = 0; + std::string token; + while ((pos = values_string.find(" ")) != std::string::npos) { + token = values_string.substr(0, pos); + array_builder.append(token); + values_string.erase(0, pos + 1); + } + df.append(basic::kvp("values", array_builder.extract())); + } else { + df.append(basic::kvp("value", + msg_s.substr(msg_s.find("(value ") + 7) + .substr(0, msg_s.substr(msg_s.find("(value ") + 7).find(")")))); + } + df.append(basic::kvp("update-timestamp", nowd)); + + dfc.append(basic::kvp("game", gametime_)); + dfc.append(basic::kvp("asserted", nowd)); + dfc.append(basic::kvp("retracted", "FALSE")); + dfc.append(basic::kvp("fact", df)); + dfc.append(basic::kvp("msg", msg_s)); + dfc.append( + basic::kvp("clips-id", msg_s.substr(msg_s.find("==> ") + 4).substr(0, msg_s.find("(") - 6))); + mongodb_client->database(database_)["gamestate_recovery_test"].insert_one(dfc.view()); + } + + //track retraction + if (msg_s.find("(wm-fact (id \"/domain/") != std::string::npos + && msg_s.find("<==") != std::string::npos) { + std::string clips_id = msg_s.substr(msg_s.find("<== ") + 4).substr(0, msg_s.find("(") - 6); + + mongodb_client->database(database_)["gamestate_recovery_test"].update_one( + make_document(kvp("clips-id", clips_id)), + make_document(kvp("$set", make_document(kvp("retracted", nowd))))); + } + free(msg); } void @@ -237,8 +309,8 @@ MongoLogLoggerThread::tlog_insert_message(LogLevel ll, } bsoncxx::types::b_date nowd{ - std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds>{ - std::chrono::milliseconds{t->tv_sec * 1000 + t->tv_usec / 1000}}}; + std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds>{ + std::chrono::milliseconds{t->tv_sec * 1000 + t->tv_usec / 1000}}}; using namespace bsoncxx::builder; basic::document b; @@ -270,8 +342,8 @@ MongoLogLoggerThread::tlog_insert_message(LogLevel ll, { MutexLocker lock(mutex_); bsoncxx::types::b_date nowd{ - std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds>{ - std::chrono::milliseconds{t->tv_sec * 1000 + t->tv_usec / 1000}}}; + std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds>{ + std::chrono::milliseconds{t->tv_sec * 1000 + t->tv_usec / 1000}}}; for (Exception::iterator i = e.begin(); i != e.end(); ++i) { using namespace bsoncxx::builder; basic::document b; diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.h b/src/plugins/mongodb_log/mongodb_log_logger_thread.h index c4ed666da..f3a37a394 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.h +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.h @@ -104,9 +104,10 @@ private: tlog_insert_message(LogLevel ll, struct timeval *t, const char *component, fawkes::Exception &); private: - std::string database_; - std::string collection_; - fawkes::Mutex *mutex_; + std::string database_; + std::string collection_; + bsoncxx::types::b_date gametime_{std::chrono::high_resolution_clock::now()}; + fawkes::Mutex * mutex_; }; #endif - *commit* 4acbbd43d260280394378fa5922b8ee315490bf6 - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Sun Oct 25 15:51:47 2020 +0100 Subject: mongodb_log: fix error in string parsing src/plugins/mongodb_log/mongodb_log_logger_thread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) _Diff for modified files_: diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp index 11ae6f337..43157d852 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp @@ -169,14 +169,14 @@ MongoLogLoggerThread::insert_message(LogLevel ll, dfc.append(basic::kvp("fact", df)); dfc.append(basic::kvp("msg", msg_s)); dfc.append( - basic::kvp("clips-id", msg_s.substr(msg_s.find("==> ") + 4).substr(0, msg_s.find("(") - 6))); + basic::kvp("clips-id", msg_s.substr(msg_s.find("==> ") + 4).substr(0, msg_s.find("(") - 5))); mongodb_client->database(database_)["gamestate_recovery_test"].insert_one(dfc.view()); } //track retraction if (msg_s.find("(wm-fact (id \"/domain/") != std::string::npos && msg_s.find("<==") != std::string::npos) { - std::string clips_id = msg_s.substr(msg_s.find("<== ") + 4).substr(0, msg_s.find("(") - 6); + std::string clips_id = msg_s.substr(msg_s.find("<== ") + 4).substr(0, msg_s.find("(") - 5); mongodb_client->database(database_)["gamestate_recovery_test"].update_one( make_document(kvp("clips-id", clips_id)), - *commit* a5112e3a53636b658e20214854487879d90c4bae - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Thu Oct 29 11:56:00 2020 +0100 Subject: Merge remote-tracking branch 'origin/tviehmann/repair-pddl-robot-memory' into dswoboda/game-state-loading .../libs/webview/microhttpd_compat.h | 17 +++++ src/libs/webview/request.cpp | 9 +-- src/libs/webview/request_dispatcher.cpp | 28 +++++---- src/libs/webview/request_dispatcher.h | 40 ++++++------ src/libs/webview/server.cpp | 3 +- src/plugins/pddl-planner/Makefile | 8 +-- src/plugins/pddl-planner/pddl-planner_thread.cpp | 25 +++++--- src/plugins/pddl-robot-memory/Makefile | 12 ++-- .../pddl-robot-memory/pddl_robot_memory_thread.cpp | 58 +++++++++++------ src/plugins/robot-memory/Makefile | 2 +- src/plugins/robot-memory/aspect/Makefile | 11 +++- src/plugins/robot-memory/robot_memory.cpp | 73 ++++------------------ src/plugins/robot-memory/robot_memory.h | 10 ++- 13 files changed, 153 insertions(+), 143 deletions(-) _Diff for modified files_: - *commit* 3c8d49aebfff6a528d58e8d96e7d9e7ffb01e881 - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Sun Nov 8 16:45:20 2020 +0100 Subject: Merge remote-tracking branch 'origin/master' into dswoboda/game-state-loading etc/buildsys/fvconf.mk | 9 +-- etc/buildsys/lua.mk | 2 +- etc/buildsys/ros.mk | 2 +- src/libs/config/config.tolua | 3 + src/libs/logging/fd_redirect.cpp | 2 +- src/libs/webview/webview.mk | 6 ++ .../clips_robot_memory_thread.cpp | 75 +++++++++------------- .../clips-robot-memory/clips_robot_memory_thread.h | 4 +- src/plugins/gazebo/gazebo.mk | 5 ++ .../gazebo/gazsim-localization/gazebo-plugin/gps.h | 2 +- .../gazsim-robotino/gazebo-plugin-gyro/gyro.h | 2 +- .../gazsim-robotino/gazebo-plugin-motor/motor.h | 2 +- src/plugins/laser/sick_tim55x_ethernet_aqt.cpp | 2 +- src/plugins/nao/button_thread.cpp | 2 +- src/plugins/nao/dcm_thread.cpp | 2 +- src/plugins/openprs/openprs_thread.cpp | 2 +- src/plugins/openprs/utils/openprs_mp_proxy.cpp | 2 +- src/plugins/openprs/utils/openprs_server_proxy.cpp | 2 +- src/plugins/openrave/environment.cpp | 2 +- src/plugins/plexil/protobuf_adapter.cpp | 1 + src/plugins/robot-memory/event_trigger_manager.cpp | 2 +- src/plugins/robotino/direct_com_thread.cpp | 2 +- src/plugins/webview/Makefile | 4 +- 23 files changed, 68 insertions(+), 69 deletions(-) _Diff for modified files_: - *commit* 630e1e0047f24a082b5fabdf615300e9e29e3fc5 - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Sun Nov 8 17:14:26 2020 +0100 Subject: mongodb_log: fix port .../mongodb_log/mongodb_log_logger_thread.cpp | 27 +++++++++------------- 1 file changed, 11 insertions(+), 16 deletions(-) _Diff for modified files_: diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp index 43157d852..d760e1801 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp @@ -69,7 +69,7 @@ MongoLogLoggerThread::init() { database_ = config->get_string_or_default("/plugins/mongodb/logger/database", "fawkes"); collection_ = config->get_string_or_default("/plugins/mongodb/logger/collection", "msglog"); - mongocxx::uri uri("mongodb://localhost:27017"); + mongocxx::uri uri("mongodb://localhost:27021"); mongodb_client = new mongocxx::client(uri); } @@ -125,21 +125,16 @@ MongoLogLoggerThread::insert_message(LogLevel ll, && msg_s.find("==>") != std::string::npos) { basic::document df; basic::document dfc; - df.append( - basic::kvp("id", - msg_s.substr(msg_s.find("(id \"") + 5, - msg_s.find("\")") - msg_s.find("(id \"") - 5))); - df.append(basic::kvp( - "is-list", - msg_s.substr(msg_s.find("(is-list ") + 9) - .substr(0, msg_s.substr(msg_s.find("(is-list ") + 9).find(")")))); - df.append(basic::kvp("source", - config->get_string_or_default("fawkes/agent/name", "UNKN"))); - df.append( - basic::kvp("type", - msg_s.substr(msg_s.find("(type ") + 6) - .substr(0, - msg_s.substr(msg_s.find("(type ") + 6).find(")")))); + df.append(basic::kvp("id", + msg_s.substr(msg_s.find("(id \"") + 5, + msg_s.find("\")") - msg_s.find("(id \"") - 5))); + df.append(basic::kvp("is-list", + msg_s.substr(msg_s.find("(is-list ") + 9) + .substr(0, msg_s.substr(msg_s.find("(is-list ") + 9).find(")")))); + df.append(basic::kvp("source", config->get_string_or_default("fawkes/agent/name", "UNKN"))); + df.append(basic::kvp("type", + msg_s.substr(msg_s.find("(type ") + 6) + .substr(0, msg_s.substr(msg_s.find("(type ") + 6).find(")")))); if (msg_s.substr(msg_s.find("(is-list ") + 9) .substr(0, msg_s.substr(msg_s.find("(is-list ") + 9).find(")")) == "TRUE") { - *commit* a0cd56298cf834a2b0eb7c91058afd0e7f149bb7 - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Sun Nov 8 17:26:32 2020 +0100 Subject: mongodb: add date object from iso 8601 string to bson doc .../clips_robot_memory_thread.cpp | 31 ++++++++++++++++++++++ .../clips-robot-memory/clips_robot_memory_thread.h | 1 + 2 files changed, 32 insertions(+) _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 ce04a0b68..5d5a4b603 100644 --- a/src/plugins/clips-robot-memory/clips_robot_memory_thread.cpp +++ b/src/plugins/clips-robot-memory/clips_robot_memory_thread.cpp @@ -239,6 +239,10 @@ ClipsRobotMemoryThread::clips_context_init(const std::string & env_name sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_robotmemory_mutex_expire_locks_async), env_name))); + clips->add_function("bson-append-time-iso", + sigc::slot<void, void *, std::string, std::string>( + sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_append_iso_time))); + clips->build("(deffacts have-feature-mongodb (have-feature MongoDB))"); //load helper functions written in CLIPS @@ -451,6 +455,33 @@ ClipsRobotMemoryThread::clips_bson_append_time(void * bson, } void +ClipsRobotMemoryThread::clips_bson_append_iso_time(void * bson, + std::string field_name, + std::string time_string) +{ + int y, M, d, h, m; + float s; + std::string dateStr = time_string; + sscanf(dateStr.c_str(), "%d-%d-%d %d:%d:%fZ", &y, &M, &d, &h, &m, &s); + tm time; + time.tm_year = y - 1900; // Year since 1900 + time.tm_mon = M - 1; // 0-11 + time.tm_mday = d; // 1-31 + time.tm_hour = h; // 0-23 + time.tm_min = m; // 0-59 + time.tm_sec = (int)s; // 0-61 (0-60 in C++11) + time_t timeSinceEpoch = timegm(&time); + + auto res = std::chrono::system_clock::from_time_t(timeSinceEpoch); + auto tms = std::chrono::milliseconds(std::stoi(time_string.substr(20, 3))); + auto chrono_time = res + tms; + + bsoncxx::types::b_date bson_time{chrono_time}; + auto b = static_cast<bsoncxx::builder::basic::document *>(bson); + b->append(bsoncxx::builder::basic::kvp(field_name, bson_time)); +} + +void ClipsRobotMemoryThread::clips_robotmemory_insert(std::string collection, void *bson) { auto b = static_cast<bsoncxx::builder::basic::document *>(bson); 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 31dc385fd..69c3e7ae2 100644 --- a/src/plugins/clips-robot-memory/clips_robot_memory_thread.h +++ b/src/plugins/clips-robot-memory/clips_robot_memory_thread.h @@ -78,6 +78,7 @@ private: void clips_bson_append_regex(void *bson, std::string field_name, CLIPS::Value regex_string); void clips_bson_append_array(void *bson, std::string field_name, CLIPS::Values values); void clips_bson_append_time(void *bson, std::string field_name, CLIPS::Values time); + void clips_bson_append_iso_time(void *bson, std::string field_name, std::string time); CLIPS::Value clips_bson_array_start(); void clips_bson_array_finish(void *bson, std::string field_name, void *array); void clips_bson_array_append(void *barr, CLIPS::Value value); - *commit* de0fa1bbeb50aaf383d67ac36f4c728c2e877856 - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Sun Nov 8 17:29:07 2020 +0100 Subject: mongodb: add methods to perform aggregate queries in CLIPS .../clips_robot_memory_thread.cpp | 80 ++++++++++++++++++++++ .../clips-robot-memory/clips_robot_memory_thread.h | 10 +++ 2 files changed, 90 insertions(+) _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 5d5a4b603..3eb58b072 100644 --- a/src/plugins/clips-robot-memory/clips_robot_memory_thread.cpp +++ b/src/plugins/clips-robot-memory/clips_robot_memory_thread.cpp @@ -239,6 +239,24 @@ ClipsRobotMemoryThread::clips_context_init(const std::string & env_name sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_robotmemory_mutex_expire_locks_async), env_name))); + clips->add_function("robmem-pipeline-create", + sigc::slot<CLIPS::Value>( + sigc::mem_fun(*this, + &ClipsRobotMemoryThread::clips_robotmemory_pipeline_create))); + clips->add_function("robmem-pipeline-destroy", + sigc::slot<void, CLIPS::Value>(sigc::mem_fun( + *this, &ClipsRobotMemoryThread::clips_robotmemory_pipeline_destroy))); + clips->add_function("robmem-pipeline-add-match", + sigc::slot<CLIPS::Value, void *, void *>(sigc::mem_fun( + *this, &ClipsRobotMemoryThread::clips_robotmemory_pipeline_add_match))); + clips->add_function( + "robmem-pipeline-add-projection", + sigc::slot<CLIPS::Value, void *, void *>( + sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_robotmemory_pipeline_add_projection))); + clips->add_function("robmem-aggregate", + sigc::slot<CLIPS::Value, std::string, void *>( + sigc::mem_fun(*this, + &ClipsRobotMemoryThread::clips_robotmemory_aggregate))); clips->add_function("bson-append-time-iso", sigc::slot<void, void *, std::string, std::string>( sigc::mem_fun(*this, &ClipsRobotMemoryThread::clips_bson_append_iso_time))); @@ -1174,3 +1192,65 @@ ClipsRobotMemoryThread::clips_robotmemory_mutex_expire_locks_async(std::string e return CLIPS::Value("TRUE", CLIPS::TYPE_SYMBOL); } + +CLIPS::Value +ClipsRobotMemoryThread::clips_robotmemory_pipeline_create() +{ + return CLIPS::Value(new mongocxx::pipeline()); +} + +void +ClipsRobotMemoryThread::clips_robotmemory_pipeline_destroy(void *pipeline) +{ + auto b = static_cast<mongocxx::pipeline *>(pipeline); + delete b; +} + +CLIPS::Value +ClipsRobotMemoryThread::clips_robotmemory_pipeline_add_match(void *pipeline, void *match) +{ + try { + auto pipeline_obj = static_cast<mongocxx::pipeline *>(pipeline); + auto match_obj = static_cast<bsoncxx::builder::basic::document *>(match); + + pipeline_obj->match(match_obj->view()); + + return CLIPS::Value(pipeline_obj); + } catch (std::system_error &e) { + logger->log_warn("MongoDB", "Pipeline add match failed: %s", e.what()); + return CLIPS::Value("FALSE", CLIPS::TYPE_SYMBOL); + } +} + +CLIPS::Value +ClipsRobotMemoryThread::clips_robotmemory_pipeline_add_projection(void *pipeline, void *projection) +{ + try { + auto pipeline_obj = static_cast<mongocxx::pipeline *>(pipeline); + auto proj_obj = static_cast<bsoncxx::builder::basic::document *>(projection); + + pipeline_obj->project(proj_obj->view()); + + return CLIPS::Value(pipeline_obj); + } catch (std::system_error &e) { + logger->log_warn("MongoDB", "Pipline add projection failed: %s", e.what()); + return CLIPS::Value("FALSE", CLIPS::TYPE_SYMBOL); + } +} + +CLIPS::Value +ClipsRobotMemoryThread::clips_robotmemory_aggregate(std::string collection, void *pipeline) +{ + auto pipeline_obj = static_cast<mongocxx::pipeline *>(pipeline); + + try { + auto cursor = robot_memory->aggregate(*pipeline_obj, collection); + + return CLIPS::Value(new std::unique_ptr<mongocxx::cursor>( + new mongocxx::cursor(std::move(cursor))), + CLIPS::TYPE_EXTERNAL_ADDRESS); + } catch (std::system_error &e) { + logger->log_warn("MongoDB", "Aggregate failed: %s", e.what()); + return CLIPS::Value("FALSE", CLIPS::TYPE_SYMBOL); + } +} \ No newline at end of file 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 69c3e7ae2..c7a86484f 100644 --- a/src/plugins/clips-robot-memory/clips_robot_memory_thread.h +++ b/src/plugins/clips-robot-memory/clips_robot_memory_thread.h @@ -139,6 +139,16 @@ private: bool mutex_future_ready(const std::string &name); + CLIPS::Value clips_robotmemory_pipeline_create(); + void clips_robotmemory_pipeline_destroy(void *pipeline); + CLIPS::Value clips_robotmemory_pipeline_add_match(void *pipeline, void *match); + CLIPS::Value clips_robotmemory_pipeline_add_projection(void *pipeline, void *projection); + CLIPS::Value clips_robotmemory_aggregate(std::string collection, void *); + void clips_bson_append_array_test(void * bson, + std::string field_name, + CLIPS::Value value1, + CLIPS::Value value2); + private: std::list<ClipsRmTrigger *> clips_triggers_; fawkes::Mutex clips_triggers_mutex_; - *commit* 3ea36f19b6932904c28fad63db03375b6d79b7fd - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Sun Nov 8 17:31:09 2020 +0100 Subject: cx: load a stored games tate from a mongodb collection .../clips-executive/clips/wm-robmem-sync.clp | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) _Diff for modified files_: diff --git a/src/plugins/clips-executive/clips/wm-robmem-sync.clp b/src/plugins/clips-executive/clips/wm-robmem-sync.clp index f9263004f..f60efeb96 100644 --- a/src/plugins/clips-executive/clips/wm-robmem-sync.clp +++ b/src/plugins/clips-executive/clips/wm-robmem-sync.clp @@ -231,6 +231,51 @@ (bson-destroy ?query) ) +(deffunction wm-robmem-load-from-storage (?game ?timepoint) + (bind ?match (bson-create)) + (bind ?match-lte-timestamp (bson-create)) + (bind ?project (bson-create)) + (bind ?doc1 (bson-create)) + (bind ?doc2 (bson-create)) + (bind ?doc21 (bson-create)) + + (bson-append ?doc1 "retracted" "FALSE") + (bson-append-time-iso ?doc21 "$gte" ?timepoint) + (bson-append ?doc2 "retracted" ?doc21) + (bson-append-time-iso ?match "game" ?game) + (bson-append-time-iso ?match-lte-timestamp "$lte" ?timepoint) + (bson-append ?match "asserted" ?match-lte-timestamp) + + (bind ?limit-arr (bson-array-start)) + (bson-array-append ?limit-arr ?doc1) + (bson-array-append ?limit-arr ?doc2) + (bson-array-finish ?match "$or" ?limit-arr) + + + (bson-append ?project "id" "$fact.id") + (bson-append ?project "source" "$fact.source") + (bson-append ?project "type" "$fact.type") + (bson-append ?project "is-list" "$fact.is-list") + (bson-append ?project "update-timestamp" "$fact.update-timestamp") + (bson-append ?project "value" "$fact.value") + (bson-append ?project "values" "$fact.values") + + (bind ?pipeline (robmem-pipeline-create)) + (robmem-pipeline-add-match ?pipeline ?match) + (robmem-pipeline-add-projection ?pipeline ?project) + (bind ?cursor (robmem-aggregate "fawkes.gamestate_recovery_test" ?pipeline)) + + (robmem-pipeline-destroy ?pipeline) + (bson-destroy ?match) + (bson-destroy ?match-lte-timestamp) + (bson-destroy ?project) + (bson-destroy ?doc1) + (bson-destroy ?doc2) + (bson-destroy ?doc21) + + (return ?doc) +) + (defrule wm-robmem-sync-fact-added (wm-fact (key cx identity) (value ?identity)) (wm-robmem-sync-conf (wm-fact-key-prefix $?key-prefix) (enabled TRUE)) - *commit* 9126e1e75387bfba1296edd358edf7e9406c0a0b - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Sun Nov 15 11:39:33 2020 +0100 Subject: cx: fix wrong return value in wm-robmem-load-from-storage src/plugins/clips-executive/clips/wm-robmem-sync.clp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) _Diff for modified files_: diff --git a/src/plugins/clips-executive/clips/wm-robmem-sync.clp b/src/plugins/clips-executive/clips/wm-robmem-sync.clp index f60efeb96..f4b3dab3a 100644 --- a/src/plugins/clips-executive/clips/wm-robmem-sync.clp +++ b/src/plugins/clips-executive/clips/wm-robmem-sync.clp @@ -273,7 +273,7 @@ (bson-destroy ?doc2) (bson-destroy ?doc21) - (return ?doc) + (return ?cursor) ) (defrule wm-robmem-sync-fact-added - *commit* 414003de9fd87309a60a19f7c3743d6b668a5e28 - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Mon Dec 21 00:25:35 2020 +0100 Subject: mongodb_log: use gametime and clips id to update already saved facts src/plugins/mongodb_log/mongodb_log_logger_thread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) _Diff for modified files_: diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp index d760e1801..ae66a5dcd 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp @@ -172,9 +172,9 @@ MongoLogLoggerThread::insert_message(LogLevel ll, if (msg_s.find("(wm-fact (id \"/domain/") != std::string::npos && msg_s.find("<==") != std::string::npos) { std::string clips_id = msg_s.substr(msg_s.find("<== ") + 4).substr(0, msg_s.find("(") - 5); - + mongodb_client->database(database_)["gamestate_recovery_test"].update_one( - make_document(kvp("clips-id", clips_id)), + make_document(kvp("clips-id", clips_id),kvp("game", gametime_)),//add gametime for synchronization purposes :D make_document(kvp("$set", make_document(kvp("retracted", nowd))))); } free(msg); - *commit* 3f2b1dd312228cf64c866979462ee900791c14e6 - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Mon Dec 21 00:42:19 2020 +0100 Subject: cx: add missing check of modification wm-sync-domain-object-added src/plugins/clips-executive/clips/wm-domain-sync.clp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) _Diff for modified files_: diff --git a/src/plugins/clips-executive/clips/wm-domain-sync.clp b/src/plugins/clips-executive/clips/wm-domain-sync.clp index 751dc60f5..7e2ecd063 100644 --- a/src/plugins/clips-executive/clips/wm-domain-sync.clp +++ b/src/plugins/clips-executive/clips/wm-domain-sync.clp @@ -465,7 +465,9 @@ (test (<= (fact-index ?wf) ?wf-idx)) => (bind ?new-wf (modify ?wf (values (append$ ?objs ?name)))) - (modify ?wm (wm-fact-idx (fact-index ?new-wf))) + (if ?new-wf then + (modify ?wm (wm-fact-idx (fact-index ?new-wf))) + ) ) (defrule wm-sync-domain-object-removed - *commit* 105df432eb6b5d11480baa69810e71cd47aa6f9d - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Wed Jan 20 19:35:33 2021 +0100 Subject: mongodb_log: set to log only on Icks src/plugins/mongodb_log/mongodb_log_logger_thread.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) _Diff for modified files_: diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp index ae66a5dcd..35507fd96 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp @@ -90,6 +90,9 @@ MongoLogLoggerThread::insert_message(LogLevel ll, va_list va) { MutexLocker lock(mutex_); + if(config->get_string("fawkes/agent/name") != "Icks") { + return; + } bsoncxx::types::b_date nowd{std::chrono::high_resolution_clock::now()}; char *msg; @@ -174,7 +177,7 @@ MongoLogLoggerThread::insert_message(LogLevel ll, std::string clips_id = msg_s.substr(msg_s.find("<== ") + 4).substr(0, msg_s.find("(") - 5); mongodb_client->database(database_)["gamestate_recovery_test"].update_one( - make_document(kvp("clips-id", clips_id),kvp("game", gametime_)),//add gametime for synchronization purposes :D + make_document(kvp("clips-id", clips_id),kvp("game", gametime_)), make_document(kvp("$set", make_document(kvp("retracted", nowd))))); } free(msg); - *commit* 34ed069f98db9a211f508d479e40c13bfb193beb - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Wed Jan 27 13:48:43 2021 +0100 Subject: mongodb_log: add gamestate to logged data src/plugins/mongodb_log/mongodb_log_logger_thread.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) _Diff for modified files_: diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp index 35507fd96..a0b0c0dc3 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp @@ -123,6 +123,14 @@ MongoLogLoggerThread::insert_message(LogLevel ll, std::string msg_s(msg); + //track gamestate set to running + if(msg_s.find("(key refbox state)") != std::string::npos || msg_s.find("(key refbox phase)") != std::string::npos) { + basic::document df; + df.append(basic::kvp("gamestate", msg_s.substr(msg_s.find("(value ") + 7, msg_s.substr(msg_s.find("(value ") + 7).find(")")))); + df.append(basic::kvp("set", nowd)); + df.append(basic::kvp("game", gametime_)); + mongodb_client->database(database_)["gamestate_recovery_test"].insert_one(df.view()); + } //track assertion if (msg_s.find("(wm-fact (id \"/domain/") != std::string::npos && msg_s.find("==>") != std::string::npos) { - *commit* fcc16e80c9308f4ac41a16889f64ddf6d7ef9b4b - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Wed Jan 27 13:51:29 2021 +0100 Subject: mongodb_log: add rule firing to logged data src/plugins/mongodb_log/mongodb_log_logger_thread.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) _Diff for modified files_: diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp index a0b0c0dc3..977a143fa 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp @@ -131,6 +131,18 @@ MongoLogLoggerThread::insert_message(LogLevel ll, df.append(basic::kvp("game", gametime_)); mongodb_client->database(database_)["gamestate_recovery_test"].insert_one(df.view()); } + + //track rule firing + if (msg_s.find("FIRE") != std::string::npos) { + basic::document df; + df.append(basic::kvp("rule", + msg_s.substr(msg_s.find("FIRE") + 10, + msg_s.find("f-") - 2 - msg_s.find("FIRE") - 10))); + df.append(basic::kvp("fired", nowd)); + df.append(basic::kvp("game", gametime_)); + mongodb_client->database(database_)["gamestate_recovery_test"].insert_one(df.view()); + } + //track assertion if (msg_s.find("(wm-fact (id \"/domain/") != std::string::npos && msg_s.find("==>") != std::string::npos) { - *commit* c018158b8491bd1b7e52fbc469034ebc088fe23c - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Thu Feb 18 23:04:12 2021 +0100 Subject: mongodb_log: fix bug that skipped last entry of values array src/plugins/mongodb_log/mongodb_log_logger_thread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) _Diff for modified files_: diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp index 977a143fa..48af503c4 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp @@ -165,7 +165,6 @@ MongoLogLoggerThread::insert_message(LogLevel ll, std::string values_string = msg_s.substr(msg_s.find("(values") + 8) .substr(0, msg_s.substr(msg_s.find("(values") + 8).find(")")); - size_t pos = 0; std::string token; while ((pos = values_string.find(" ")) != std::string::npos) { @@ -173,6 +172,7 @@ MongoLogLoggerThread::insert_message(LogLevel ll, array_builder.append(token); values_string.erase(0, pos + 1); } + array_builder.append(values_string); df.append(basic::kvp("values", array_builder.extract())); } else { df.append(basic::kvp("value", - *commit* f1b6fad2b0b9d5d9d13ab7f3ab685d66be8fdfc6 - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Thu Feb 18 23:05:09 2021 +0100 Subject: mongodb_log: add refbox and order facts to logging src/plugins/mongodb_log/mongodb_log_logger_thread.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) _Diff for modified files_: diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp index 48af503c4..7b2a3a37f 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp @@ -144,7 +144,9 @@ MongoLogLoggerThread::insert_message(LogLevel ll, } //track assertion - if (msg_s.find("(wm-fact (id \"/domain/") != std::string::npos + if ((msg_s.find("(wm-fact (id \"/domain/") != std::string::npos + || msg_s.find("(wm-fact (id \"/refbox/") != std::string::npos + || msg_s.find("(wm-fact (id \"/order/") != std::string::npos) && msg_s.find("==>") != std::string::npos) { basic::document df; basic::document dfc; - *commit* 52a37b83737d91803a6dc1f34db3d591513e2c9d - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Thu Feb 18 23:06:10 2021 +0100 Subject: mongodb_log: add different categories for gamephase and gamestate src/plugins/mongodb_log/mongodb_log_logger_thread.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) _Diff for modified files_: diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp index 7b2a3a37f..f9aa4a035 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp @@ -126,7 +126,12 @@ MongoLogLoggerThread::insert_message(LogLevel ll, //track gamestate set to running if(msg_s.find("(key refbox state)") != std::string::npos || msg_s.find("(key refbox phase)") != std::string::npos) { basic::document df; - df.append(basic::kvp("gamestate", msg_s.substr(msg_s.find("(value ") + 7, msg_s.substr(msg_s.find("(value ") + 7).find(")")))); + std::string value = msg_s.substr(msg_s.find("(value ") + 7, msg_s.substr(msg_s.find("(value ") + 7).find(")")); + if (value == "PRE_GAME" || value == "PRODUCTION" || value == "SETUP" || value == "POST_GAME") { + df.append(basic::kvp("gamephase", value)); + } else { + df.append(basic::kvp("gamestate", value)); + } df.append(basic::kvp("set", nowd)); df.append(basic::kvp("game", gametime_)); mongodb_client->database(database_)["gamestate_recovery_test"].insert_one(df.view()); - *commit* db4192bdeb8005c119b905ba92ddeb584009c5c0 - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Wed Mar 24 16:03:28 2021 +0100 Subject: mongodb_log: add refbox/comm to tracked facts src/plugins/mongodb_log/mongodb_log_logger_thread.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) _Diff for modified files_: diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp index f9aa4a035..d8a3147e2 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp @@ -152,7 +152,8 @@ MongoLogLoggerThread::insert_message(LogLevel ll, if ((msg_s.find("(wm-fact (id \"/domain/") != std::string::npos || msg_s.find("(wm-fact (id \"/refbox/") != std::string::npos || msg_s.find("(wm-fact (id \"/order/") != std::string::npos) - && msg_s.find("==>") != std::string::npos) { + && msg_s.find("==>") != std::string::npos + && msg_s.find("(wm-fact (id \"/refbox/comm") == std::string::npos) { basic::document df; basic::document dfc; df.append(basic::kvp("id", - *commit* 24419bed3fac5ee8fe7187f753f96ee37fd683ac - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Wed Mar 24 16:04:15 2021 +0100 Subject: mongodb_log: fix broken retraction tracking src/plugins/mongodb_log/mongodb_log_logger_thread.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) _Diff for modified files_: diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp index d8a3147e2..0efff6351 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp @@ -200,8 +200,11 @@ MongoLogLoggerThread::insert_message(LogLevel ll, } //track retraction - if (msg_s.find("(wm-fact (id \"/domain/") != std::string::npos - && msg_s.find("<==") != std::string::npos) { + if ((msg_s.find("(wm-fact (id \"/domain/") != std::string::npos + || msg_s.find("(wm-fact (id \"/refbox/") != std::string::npos + || msg_s.find("(wm-fact (id \"/order/") != std::string::npos) + && msg_s.find("<==") != std::string::npos + && msg_s.find("(wm-fact (id \"/refbox/comm") == std::string::npos) { std::string clips_id = msg_s.substr(msg_s.find("<== ") + 4).substr(0, msg_s.find("(") - 5); mongodb_client->database(database_)["gamestate_recovery_test"].update_one( - *commit* 879bc80bc45ede8ac46d9dc17da85db15e8bff3f - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Sat Mar 27 20:11:14 2021 +0100 Subject: mongodb_log: switch to regex based comparison src/plugins/mongodb_log/mongodb_log_logger_thread.cpp | 15 +++++---------- src/plugins/mongodb_log/mongodb_log_logger_thread.h | 3 +++ 2 files changed, 8 insertions(+), 10 deletions(-) _Diff for modified files_: diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp index 0efff6351..7e26006b8 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp @@ -71,6 +71,9 @@ MongoLogLoggerThread::init() collection_ = config->get_string_or_default("/plugins/mongodb/logger/collection", "msglog"); mongocxx::uri uri("mongodb://localhost:27021"); mongodb_client = new mongocxx::client(uri); + + assert_regex = std::regex("==> f-[0-9]*\\s*\\(wm-fact \\(id \\\"\\/((refbox)|(order)|(domain))\\/(?!comm)"); + retract_regex = std::regex("<== f-[0-9]*\\s*\\(wm-fact \\(id \\\"\\/((refbox)|(order)|(domain))\\/(?!comm)"); } void @@ -149,11 +152,7 @@ MongoLogLoggerThread::insert_message(LogLevel ll, } //track assertion - if ((msg_s.find("(wm-fact (id \"/domain/") != std::string::npos - || msg_s.find("(wm-fact (id \"/refbox/") != std::string::npos - || msg_s.find("(wm-fact (id \"/order/") != std::string::npos) - && msg_s.find("==>") != std::string::npos - && msg_s.find("(wm-fact (id \"/refbox/comm") == std::string::npos) { + if (std::regex_search(msg_s, assert_regex)) { basic::document df; basic::document dfc; df.append(basic::kvp("id", @@ -200,11 +199,7 @@ MongoLogLoggerThread::insert_message(LogLevel ll, } //track retraction - if ((msg_s.find("(wm-fact (id \"/domain/") != std::string::npos - || msg_s.find("(wm-fact (id \"/refbox/") != std::string::npos - || msg_s.find("(wm-fact (id \"/order/") != std::string::npos) - && msg_s.find("<==") != std::string::npos - && msg_s.find("(wm-fact (id \"/refbox/comm") == std::string::npos) { + if (std::regex_search(msg_s, retract_regex)) { std::string clips_id = msg_s.substr(msg_s.find("<== ") + 4).substr(0, msg_s.find("(") - 5); mongodb_client->database(database_)["gamestate_recovery_test"].update_one( diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.h b/src/plugins/mongodb_log/mongodb_log_logger_thread.h index f3a37a394..4433700ba 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.h +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.h @@ -31,6 +31,7 @@ #include <plugins/mongodb/aspect/mongodb.h> #include <string> +#include <regex> namespace fawkes { class Mutex; @@ -108,6 +109,8 @@ private: std::string collection_; bsoncxx::types::b_date gametime_{std::chrono::high_resolution_clock::now()}; fawkes::Mutex * mutex_; + std::regex assert_regex; + std::regex retract_regex; }; #endif - *commit* e992ccb77e8a0d679f48ee79b4740ae6ab866f0f - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Sat Mar 27 20:20:39 2021 +0100 Subject: mongodb_log: use variable for collection name src/plugins/mongodb_log/mongodb_log_logger_thread.cpp | 8 ++++---- src/plugins/mongodb_log/mongodb_log_logger_thread.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) _Diff for modified files_: diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp index 7e26006b8..1c28160ad 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp @@ -137,7 +137,7 @@ MongoLogLoggerThread::insert_message(LogLevel ll, } df.append(basic::kvp("set", nowd)); df.append(basic::kvp("game", gametime_)); - mongodb_client->database(database_)["gamestate_recovery_test"].insert_one(df.view()); + mongodb_client->database(database_)[collection_name].insert_one(df.view()); } //track rule firing @@ -148,7 +148,7 @@ MongoLogLoggerThread::insert_message(LogLevel ll, msg_s.find("f-") - 2 - msg_s.find("FIRE") - 10))); df.append(basic::kvp("fired", nowd)); df.append(basic::kvp("game", gametime_)); - mongodb_client->database(database_)["gamestate_recovery_test"].insert_one(df.view()); + mongodb_client->database(database_)[collection_name].insert_one(df.view()); } //track assertion @@ -195,14 +195,14 @@ MongoLogLoggerThread::insert_message(LogLevel ll, dfc.append(basic::kvp("msg", msg_s)); dfc.append( basic::kvp("clips-id", msg_s.substr(msg_s.find("==> ") + 4).substr(0, msg_s.find("(") - 5))); - mongodb_client->database(database_)["gamestate_recovery_test"].insert_one(dfc.view()); + mongodb_client->database(database_)[collection_name].insert_one(dfc.view()); } //track retraction if (std::regex_search(msg_s, retract_regex)) { std::string clips_id = msg_s.substr(msg_s.find("<== ") + 4).substr(0, msg_s.find("(") - 5); - mongodb_client->database(database_)["gamestate_recovery_test"].update_one( + mongodb_client->database(database_)[collection_name].update_one( make_document(kvp("clips-id", clips_id),kvp("game", gametime_)), make_document(kvp("$set", make_document(kvp("retracted", nowd))))); } diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.h b/src/plugins/mongodb_log/mongodb_log_logger_thread.h index 4433700ba..3d82f57d7 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.h +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.h @@ -111,6 +111,7 @@ private: fawkes::Mutex * mutex_; std::regex assert_regex; std::regex retract_regex; + std::string collection_name = "gamestate_recovery"; }; #endif - *commit* 917429adb61cec0f21ec8517fba58dab320245d2 - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Sat Mar 27 20:34:45 2021 +0100 Subject: mongodb_log: fix formatting .../mongodb_log/mongodb_log_logger_thread.cpp | 30 ++++++++++++---------- .../mongodb_log/mongodb_log_logger_thread.h | 10 ++++---- 2 files changed, 22 insertions(+), 18 deletions(-) _Diff for modified files_: diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp index 1c28160ad..44b849acb 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.cpp @@ -72,8 +72,10 @@ MongoLogLoggerThread::init() mongocxx::uri uri("mongodb://localhost:27021"); mongodb_client = new mongocxx::client(uri); - assert_regex = std::regex("==> f-[0-9]*\\s*\\(wm-fact \\(id \\\"\\/((refbox)|(order)|(domain))\\/(?!comm)"); - retract_regex = std::regex("<== f-[0-9]*\\s*\\(wm-fact \\(id \\\"\\/((refbox)|(order)|(domain))\\/(?!comm)"); + assert_regex = + std::regex("==> f-[0-9]*\\s*\\(wm-fact \\(id \\\"\\/((refbox)|(order)|(domain))\\/(?!comm)"); + retract_regex = + std::regex("<== f-[0-9]*\\s*\\(wm-fact \\(id \\\"\\/((refbox)|(order)|(domain))\\/(?!comm)"); } void @@ -92,8 +94,8 @@ MongoLogLoggerThread::insert_message(LogLevel ll, const char *format, va_list va) { - MutexLocker lock(mutex_); - if(config->get_string("fawkes/agent/name") != "Icks") { + MutexLocker lock(mutex_); + if (config->get_string("fawkes/agent/name") != "Icks") { return; } bsoncxx::types::b_date nowd{std::chrono::high_resolution_clock::now()}; @@ -127,13 +129,15 @@ MongoLogLoggerThread::insert_message(LogLevel ll, std::string msg_s(msg); //track gamestate set to running - if(msg_s.find("(key refbox state)") != std::string::npos || msg_s.find("(key refbox phase)") != std::string::npos) { + if (msg_s.find("(key refbox state)") != std::string::npos + || msg_s.find("(key refbox phase)") != std::string::npos) { basic::document df; - std::string value = msg_s.substr(msg_s.find("(value ") + 7, msg_s.substr(msg_s.find("(value ") + 7).find(")")); - if (value == "PRE_GAME" || value == "PRODUCTION" || value == "SETUP" || value == "POST_GAME") { - df.append(basic::kvp("gamephase", value)); + std::string value = + msg_s.substr(msg_s.find("(value ") + 7, msg_s.substr(msg_s.find("(value ") + 7).find(")")); + if (value == "PRE_GAME" || value == "PRODUCTION" || value == "SETUP" || value == "POST_GAME") { + df.append(basic::kvp("gamephase", value)); } else { - df.append(basic::kvp("gamestate", value)); + df.append(basic::kvp("gamestate", value)); } df.append(basic::kvp("set", nowd)); df.append(basic::kvp("game", gametime_)); @@ -152,7 +156,7 @@ MongoLogLoggerThread::insert_message(LogLevel ll, } //track assertion - if (std::regex_search(msg_s, assert_regex)) { + if (std::regex_search(msg_s, assert_regex)) { basic::document df; basic::document dfc; df.append(basic::kvp("id", @@ -199,11 +203,11 @@ MongoLogLoggerThread::insert_message(LogLevel ll, } //track retraction - if (std::regex_search(msg_s, retract_regex)) { + if (std::regex_search(msg_s, retract_regex)) { std::string clips_id = msg_s.substr(msg_s.find("<== ") + 4).substr(0, msg_s.find("(") - 5); - + mongodb_client->database(database_)[collection_name].update_one( - make_document(kvp("clips-id", clips_id),kvp("game", gametime_)), + make_document(kvp("clips-id", clips_id), kvp("game", gametime_)), make_document(kvp("$set", make_document(kvp("retracted", nowd))))); } free(msg); diff --git a/src/plugins/mongodb_log/mongodb_log_logger_thread.h b/src/plugins/mongodb_log/mongodb_log_logger_thread.h index 3d82f57d7..9147e0464 100644 --- a/src/plugins/mongodb_log/mongodb_log_logger_thread.h +++ b/src/plugins/mongodb_log/mongodb_log_logger_thread.h @@ -30,8 +30,8 @@ #include <core/threading/thread.h> #include <plugins/mongodb/aspect/mongodb.h> -#include <string> #include <regex> +#include <string> namespace fawkes { class Mutex; @@ -79,7 +79,7 @@ public: virtual void tlog_error(struct timeval *t, const char *component, fawkes::Exception &e); virtual void - vtlog_debug(struct timeval *t, const char *component, const char *format, va_list va); + vtlog_debug(struct timeval *t, const char *component, const char *format, va_list va); virtual void vtlog_info(struct timeval *t, const char *component, const char *format, va_list va); virtual void vtlog_warn(struct timeval *t, const char *component, const char *format, va_list va); virtual void @@ -109,9 +109,9 @@ private: std::string collection_; bsoncxx::types::b_date gametime_{std::chrono::high_resolution_clock::now()}; fawkes::Mutex * mutex_; - std::regex assert_regex; - std::regex retract_regex; - std::string collection_name = "gamestate_recovery"; + std::regex assert_regex; + std::regex retract_regex; + std::string collection_name = "gamestate_recovery"; }; #endif - *commit* e1915c5f3b59bee79c1ff62491e7d838211d68a5 - - - - - - - - - - Author: Daniel Swoboda <[email protected]> Date: Sat Mar 27 21:06:29 2021 +0100 Subject: Merge branch 'master' into dswoboda/game-state-loading .buildkite/pipeline.yml | 28 +--- .buildkite/steps.d/10-freebsd.sh | 44 ------ .buildkite/steps.d/10-freebsd.yml | 11 -- .buildkite/steps.d/20-webview-frontend.yml | 6 +- cfg/conf.d/clips-executive.yaml | 1 + etc/buildsys/btypes/config_fawkes.mk | 2 +- etc/buildsys/interface.mk | 4 +- etc/buildsys/pcl.mk | 2 +- src/libs/Makefile | 2 +- src/libs/baseapp/init_options.h | 2 +- src/libs/blackboard/interface_list_maintainer.cpp | 4 +- src/libs/blackboard/interface_list_maintainer.h | 5 +- src/libs/blackboard/interface_listener.cpp | 34 +++-- src/libs/blackboard/interface_listener.h | 13 +- src/libs/blackboard/internal/interface_manager.cpp | 20 +-- src/libs/blackboard/internal/interface_manager.h | 9 +- src/libs/blackboard/internal/memory_manager.cpp | 6 +- src/libs/blackboard/internal/notifier.cpp | 16 ++- src/libs/blackboard/internal/notifier.h | 15 +- src/libs/blackboard/local.h | 2 +- src/libs/blackboard/net/handler.cpp | 58 +++++--- src/libs/blackboard/net/handler.h | 11 +- src/libs/blackboard/net/interface_listener.cpp | 56 +++++--- src/libs/blackboard/net/interface_listener.h | 15 +- src/libs/blackboard/net/interface_proxy.cpp | 76 ++++++---- src/libs/blackboard/net/interface_proxy.h | 27 ++-- src/libs/blackboard/net/messages.h | 48 +++---- src/libs/blackboard/ownership.h | 2 +- src/libs/blackboard/qa/qa_bb_notify.cpp | 2 +- src/libs/blackboard/qa/qa_bb_remote.cpp | 2 +- src/libs/blackboard/remote.cpp | 28 ++-- src/libs/blackboard/remote.h | 21 +-- src/libs/blackboard/utils/on_update_waker.cpp | 2 +- src/libs/blackboard/utils/on_update_waker.h | 2 +- src/libs/config/config.h | 9 +- src/libs/config/yaml.h | 2 +- src/libs/core/tests/Makefile | 2 +- .../core/tests/catch2_main.cpp} | 15 +- src/libs/core/tests/test_circular_buffer.cpp | 25 +++- src/libs/core/threading/spinlock.cpp | 2 +- src/libs/core/utils/circular_buffer.h | 20 +++ src/libs/fvcams/v4l1.cpp | 4 +- src/libs/fvclassifiers/classifier.h | 2 +- src/libs/fvmodels/color/thresholds_black.cpp | 4 +- src/libs/fvmodels/mirror/mirror_calib.h | 4 +- src/libs/fvutils/draw/drawer.h | 2 +- src/libs/fvutils/draw/field_drawer.h | 2 +- src/libs/fvutils/draw/mono_drawer.h | 2 +- src/libs/gui_utils/interface_dispatcher.cpp | 14 +- src/libs/gui_utils/interface_dispatcher.h | 14 +- src/libs/gui_utils/service_model.h | 2 +- src/libs/gui_utils/twolines_cellrenderer.h | 2 +- src/libs/interface/Makefile | 2 +- src/libs/interface/change_field.h | 92 +++++++++++++ src/libs/interface/field_iterator.cpp | 54 ++++---- src/libs/interface/interface.cpp | 79 +++++++---- src/libs/interface/interface.h | 49 ++++++- src/libs/interface/interface.tolua | 8 +- src/libs/interface/mediators/interface_mediator.h | 4 +- src/libs/interface/message.cpp | 49 ++++++- src/libs/interface/message.h | 100 +++++--------- src/libs/interface/message.tolua | 3 +- src/libs/interfaces/SkillerInterface.xml | 3 +- src/libs/interfaces/generator/cpp_generator.cpp | 20 +-- src/libs/interfaces/generator/cpp_generator.h | 5 +- src/libs/interfaces/generator/tolua_generator.cpp | 5 +- src/libs/interfaces/generator/tolua_generator.h | 2 +- src/libs/logging/cache.h | 2 +- src/libs/logging/console.h | 2 +- src/libs/logging/file.h | 2 +- src/libs/logging/multi.h | 4 +- src/libs/logging/syslog.h | 2 +- src/libs/lua/context.h | 2 +- src/libs/netcomm/fawkes/server_thread.h | 2 +- src/libs/netcomm/utils/resolver_thread.h | 2 +- src/libs/network_logger/network_logger.h | 2 +- src/libs/protoboard/protobuf_to_bb.h | 5 + src/libs/protobuf_clips/communicator.cpp | 2 +- src/libs/protobuf_clips/communicator.h | 2 +- src/libs/protobuf_comm/server.h | 2 +- src/libs/syncpoint/syncpoint.cpp | 19 ++- src/libs/tf/time_cache.h | 10 +- src/libs/tf/transform_listener.cpp | 12 +- src/libs/tf/transform_listener.h | 8 +- src/libs/utils/Makefile | 4 +- src/libs/utils/ipc/shm.h | 2 +- .../tests}/Makefile | 39 ++---- .../utils/tests/catch2_main.cpp} | 14 +- src/libs/utils/tests/test_uuid.cpp | 77 +++++++++++ src/libs/utils/uuid.cpp | 147 ++++++++++++++++++++ .../{syncpoint/syncpoint_call.h => utils/uuid.h} | 39 +++--- src/lua/skiller/fawkes/init.lua | 17 +-- src/plugins/amcl/amcl_thread.cpp | 2 +- src/plugins/bblogger/log_thread.cpp | 8 +- src/plugins/bblogger/log_thread.h | 7 +- src/plugins/bbsync/sync_listener.cpp | 16 ++- src/plugins/bbsync/sync_listener.h | 2 +- src/plugins/bbsync/sync_thread.cpp | 3 + src/plugins/bbsync/writer_listener.cpp | 4 +- src/plugins/bbsync/writer_listener.h | 4 +- .../clips-executive/clips/coordination-mutex.clp | 38 +++-- src/plugins/clips-executive/clips/domain.clp | 38 +++-- src/plugins/clips-executive/clips/goal-tree.clp | 47 +++++++ .../clips-executive/clips/goals/run-all.clp | 2 +- .../clips-executive/clips/goals/run-parallel.clp | 153 +++++++++++++++++++++ .../clips-executive/clips/goals/try-all.clp | 6 +- src/plugins/clips-executive/clips/lock-actions.clp | 15 +- .../clips/test-scenario/domain.pddl | 4 + .../clips/test-scenario/goal-reasoner.clp | 29 +++- .../clips/test-scenario/goals/talk.clp | 11 +- .../clips/test-scenario/plans/talk-plan.clp | 19 +++ .../clips/test-scenario/print-action.clp | 7 + .../clips-executive/clips/wm-robmem-sync.clp | 2 +- src/plugins/clips-tf/clips_tf_thread.h | 2 +- src/plugins/clips/clips/blackboard.clp | 2 +- src/plugins/clips/feature_blackboard.cpp | 10 +- src/plugins/eclipse-clp/externals/blackboard.cpp | 4 +- .../gazebo/gazsim-laser/gazsim_laser_thread.cpp | 2 +- .../gazsim-robotino/gazsim_robotino_thread.cpp | 77 +++++++---- src/plugins/gazebo/node_thread.cpp | 37 ++--- src/plugins/gazebo/node_thread.h | 5 +- src/plugins/gologpp/exog_manager.cpp | 2 +- src/plugins/gologpp/exog_manager.h | 2 +- src/plugins/gologpp/skiller_action_executor.cpp | 2 +- src/plugins/gologpp/skiller_action_executor.h | 2 +- src/plugins/jaco/arm_dummy.h | 2 +- src/plugins/jaco/arm_kindrv.h | 2 +- src/plugins/joystick/ffjoystick.cpp | 2 +- src/plugins/katana/controller_kni.h | 2 +- src/plugins/katana/controller_openrave.h | 2 +- src/plugins/katana/goto_openrave_thread.h | 2 +- src/plugins/laser-filter/deadspots/deadspots.cpp | 2 +- src/plugins/laser-lines/line_info.h | 4 +- .../laser-pointclouds/laser_pointcloud_thread.cpp | 6 +- .../laser-pointclouds/laser_pointcloud_thread.h | 4 +- src/plugins/metrics/metrics_thread.cpp | 2 +- src/plugins/metrics/metrics_thread.h | 2 +- src/plugins/mongodb/mongodb_instance_config.cpp | 28 +++- src/plugins/mongodb/mongodb_instance_config.h | 1 + src/plugins/mongodb/mongodb_replicaset_config.cpp | 2 +- src/plugins/mongodb_log/mongodb_log_bb_thread.cpp | 3 +- src/plugins/mongodb_log/mongodb_log_bb_thread.h | 2 +- .../navgraph-clusters/navgraph_clusters_thread.cpp | 4 +- .../navgraph-clusters/navgraph_clusters_thread.h | 4 +- src/plugins/openprs/mod_blackboard.cpp | 2 +- src/plugins/openrave/environment.h | 2 +- src/plugins/openrave/openrave_thread.h | 4 +- src/plugins/openrave/robot.h | 2 +- src/plugins/perception/tabletop-objects/Makefile | 4 - .../tabletop-objects/tabletop_objects_thread.h | 2 +- src/plugins/plexil/be_adapter.cpp | 2 +- src/plugins/plexil/be_adapter.h | 2 +- src/plugins/plexil/blackboard_adapter.cpp | 4 +- src/plugins/plexil/blackboard_adapter.h | 2 +- src/plugins/plexil/plexil.mk | 2 +- src/plugins/plexil/protobuf_adapter.h | 2 +- src/plugins/realsense/Makefile | 42 +++--- src/plugins/refboxcomm/processor/spl.h | 6 +- .../robot_state_publisher_thread.cpp | 10 +- .../robot_state_publisher_thread.h | 6 +- src/plugins/robotino/act_thread.cpp | 2 +- src/plugins/robotino/com_thread.h | 4 +- src/plugins/robotino/direct_com_thread.h | 2 +- src/plugins/robotino/ir_pcl_thread.cpp | 2 +- src/plugins/robotino/openrobotino_com_thread.h | 2 +- src/plugins/robotino/ros_joints_thread.cpp | 2 +- src/plugins/roomba/roombajoy_thread.cpp | 2 +- src/plugins/ros/imu_thread.cpp | 2 +- src/plugins/ros/imu_thread.h | 2 +- src/plugins/ros/joint_thread.cpp | 8 +- src/plugins/ros/joint_thread.h | 6 +- src/plugins/ros/laserscan_thread.cpp | 6 +- src/plugins/ros/laserscan_thread.h | 6 +- src/plugins/ros/position_3d_thread.cpp | 8 +- src/plugins/ros/position_3d_thread.h | 6 +- src/plugins/ros/skiller_thread.cpp | 2 +- src/plugins/ros/tf_thread.cpp | 6 +- src/plugins/ros/tf_thread.h | 6 +- src/plugins/skiller-simulator/exec_thread.cpp | 22 +-- src/plugins/skiller/exec_thread.cpp | 8 +- src/plugins/skiller/exec_thread.h | 4 +- src/plugins/skiller/rest-api/api.yaml | 3 +- src/plugins/skiller/rest-api/model/Skill.cpp | 6 +- src/plugins/skiller/rest-api/model/Skill.h | 8 +- src/plugins/stn-generator/stn-generator_thread.cpp | 2 +- src/plugins/stn-generator/stn-generator_thread.h | 2 +- src/tools/laser_calibration/Makefile | 6 +- src/tools/lasergui/visdisplay.cpp | 10 +- src/tools/lasergui/visdisplay.h | 14 +- src/tools/skillgui/graph_drawing_area.h | 2 +- src/tools/skillgui/skillgui.h | 2 +- src/tools/vision/firestation/firestation.cpp | 2 +- 192 files changed, 1623 insertions(+), 873 deletions(-) _Diff for modified files_: _______________________________________________ fawkes-commits mailing list [email protected] https://lists.kbsg.rwth-aachen.de/listinfo/fawkes-commits
