Changes have been pushed for the repository "fawkesrobotics/fawkes".

Clone:  https://github.com/fawkesrobotics/fawkes.git
Gitweb: https://github.com/fawkesrobotics/fawkes

The branch, common/gologpp has been updated
        to  acef6de0dfa642c1027d2f7cef2286b43e802645 (commit)
       via  fd698e9a356befe40dde1e9a6d4936d3f887871e (commit)
      from  f0b609f4374699b4f23471911ba9ab5a6f56666c (commit)

https://github.com/fawkesrobotics/fawkes/tree/common/gologpp

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 fd698e9a356befe40dde1e9a6d4936d3f887871e
Author:     Till Hofmann <hofm...@kbsg.rwth-aachen.de>
AuthorDate: Tue Nov 26 15:34:57 2019 +0100
Commit:     Till Hofmann <hofm...@kbsg.rwth-aachen.de>
CommitDate: Tue Nov 26 15:34:57 2019 +0100

    gologpp: allow multiple log levels in print executor

https://github.com/fawkesrobotics/fawkes/commit/fd698e9a3

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit acef6de0dfa642c1027d2f7cef2286b43e802645
Author:     Till Hofmann <hofm...@kbsg.rwth-aachen.de>
AuthorDate: Tue Nov 26 15:35:38 2019 +0100
Commit:     Till Hofmann <hofm...@kbsg.rwth-aachen.de>
CommitDate: Tue Nov 26 15:35:38 2019 +0100

    gologpp: extend blocksworld scenario with log messages

https://github.com/fawkesrobotics/fawkes/commit/acef6de0d

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


- *Summary* -----------------------------------------------------------
 src/plugins/gologpp/print_action_executor.cpp      | 20 +++++++++++---
 .../test-scenarios/blocksworld/blocksworld.gpp     | 13 +++------
 .../gologpp/test-scenarios/blocksworld/logger.gpp  | 31 ++++++++++++++++++++++
 3 files changed, 52 insertions(+), 12 deletions(-)
 create mode 100644 src/plugins/gologpp/test-scenarios/blocksworld/logger.gpp


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

- *commit* fd698e9a356befe40dde1e9a6d4936d3f887871e - - - - - - - - - -
Author:  Till Hofmann <hofm...@kbsg.rwth-aachen.de>
Date:    Tue Nov 26 15:34:57 2019 +0100
Subject: gologpp: allow multiple log levels in print executor

 src/plugins/gologpp/print_action_executor.cpp | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/gologpp/print_action_executor.cpp 
b/src/plugins/gologpp/print_action_executor.cpp
index 1bf700dd8..5da272ef6 100644
--- a/src/plugins/gologpp/print_action_executor.cpp
+++ b/src/plugins/gologpp/print_action_executor.cpp
@@ -54,9 +54,23 @@ void
 PrintActionExecutor::start(std::shared_ptr<gologpp::Activity> activity)
 {
        activity->update(gologpp::Transition::Hook::START);
-       logger_->log_info("Golog++",
-                         "%s",
-                         
static_cast<std::string>(activity->mapped_arg_value("message")).c_str());
+       std::map<std::string, Logger::LogLevel> log_levels = {{"debug", 
Logger::LL_DEBUG},
+                                                             {"info", 
Logger::LL_INFO},
+                                                             {"warn", 
Logger::LL_WARN},
+                                                             {"error", 
Logger::LL_ERROR},
+                                                             {"none", 
Logger::LL_NONE}};
+       Logger::LogLevel                        log_level  = Logger::LL_INFO;
+       if (activity->target()->mapping().arg_mapping().count("level") > 0) {
+               std::string level_str = 
static_cast<std::string>(activity->mapped_arg_value("level"));
+               if (log_levels.count(level_str) > 0) {
+                       log_level = log_levels[level_str];
+               }
+       }
+
+       logger_->log(log_level,
+                    "Golog++",
+                    "%s",
+                    
static_cast<std::string>(activity->mapped_arg_value("message")).c_str());
        activity->update(gologpp::Transition::Hook::FINISH);
 }
 

- *commit* acef6de0dfa642c1027d2f7cef2286b43e802645 - - - - - - - - - -
Author:  Till Hofmann <hofm...@kbsg.rwth-aachen.de>
Date:    Tue Nov 26 15:35:38 2019 +0100
Subject: gologpp: extend blocksworld scenario with log messages

 .../test-scenarios/blocksworld/blocksworld.gpp     | 13 +++------
 .../gologpp/test-scenarios/blocksworld/logger.gpp  | 31 ++++++++++++++++++++++
 2 files changed, 35 insertions(+), 9 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/gologpp/test-scenarios/blocksworld/blocksworld.gpp 
b/src/plugins/gologpp/test-scenarios/blocksworld/blocksworld.gpp
index 14cfa4f50..b85f4c7f4 100644
--- a/src/plugins/gologpp/test-scenarios/blocksworld/blocksworld.gpp
+++ b/src/plugins/gologpp/test-scenarios/blocksworld/blocksworld.gpp
@@ -1,3 +1,5 @@
+#include "logger.gpp"
+
 symbol domain blocks = {a, b, c}
 symbol domain locations = blocks | {table, hand}
 
@@ -70,21 +72,14 @@ number function reward() {
                return -1;
 }
 
-action msg(string msg) {
-mapping:
-  "print" {
-    message = msg
-  }
-}
-
 
 {
        solve(20, reward()) {
-               msg("hello");
+               log_info("hello");
                while (!goal())
                        pick (symbol x in {a, b, c})
                                pick(symbol y in {table, a, b, c}) {
-                                       msg("Unstacking " + to_string(x));
+                                       log_warn("Unstacking " + to_string(x));
                                        unstack(x);
                                        stack(x, y);
         }



_______________________________________________
fawkes-commits mailing list
fawkes-commits@lists.kbsg.rwth-aachen.de
https://lists.kbsg.rwth-aachen.de/listinfo/fawkes-commits

Reply via email to