Changes have been pushed for the repository "fawkes.git".
(Fawkes Robotics Software Framework)

Clone:  g...@git.fawkesrobotics.org:fawkes.git
Gitweb: http://git.fawkesrobotics.org/fawkes.git
Trac:   http://trac.fawkesrobotics.org

The branch, common/current-clips-executive-rcll has been updated
        to  c7c16a6bd648fa6d5e7b4363a22d5a14f02a6acf (commit)
       via  252239e30c02a83c2480c3bc75d09428de103b0c (commit)
       via  08879f9b70377d2e83dc2df848c9e68447149ac8 (commit)
       via  c3900529533855291b414723b61df0f0ef4786e1 (commit)
       via  a797835e4cd4c712b37aecf395473fc8289dce77 (commit)
      from  4f1c14b661bb3b51997f5f98bb2eed37eed97a4d (commit)

http://git.fawkesrobotics.org/fawkes.git/common/current-clips-executive-rcll

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 a797835e4cd4c712b37aecf395473fc8289dce77
Author:     Mostafa Gomaa <go...@kbsg.rwth-aachen.de>
AuthorDate: Thu Mar 1 00:32:29 2018 +0100
Commit:     Till Hofmann <hofm...@kbsg.rwth-aachen.de>
CommitDate: Fri Mar 9 12:52:08 2018 +0100

    clips-executive: Fix undesired late Grounding
    
    Fixed case: After actions are already completed and the
        Grounded preconds cleaned, the Grounding is
        triggered again leaving the Grounded precond
        in the factbase.
        This caused the problem that the next time
        this Action is Formulated in a plan. It attempts
        to use the old faulty Grounding.
    
    Reason: After removal of domain-wm-update after the cleaning.
        grounding rules are free to trigger again.

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit c3900529533855291b414723b61df0f0ef4786e1
Author:     Tim Niemueller <niemuel...@kbsg.rwth-aachen.de>
AuthorDate: Fri Mar 9 12:51:28 2018 +0100
Commit:     Till Hofmann <hofm...@kbsg.rwth-aachen.de>
CommitDate: Fri Mar 9 12:52:55 2018 +0100

    clips-executive: print domain errors to log
    
    Along the way, remove deffacts which never got asserted and are
    processed in a rule already.

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 08879f9b70377d2e83dc2df848c9e68447149ac8
Author:     Mostafa Gomaa <go...@kbsg.rwth-aachen.de>
AuthorDate: Wed Feb 28 19:39:33 2018 +0100
Commit:     Till Hofmann <hofm...@kbsg.rwth-aachen.de>
CommitDate: Fri Mar 9 12:55:21 2018 +0100

    clips-executive: Fix matching of Action to Operator
    
    When applying effects, domain-oprator name is not matched with the
    actions name of the plan-action
    
    Discovered case:
    Caused the Actions to always go the state SENESED-EFFECT-WAIT
    if they had a sensed predicate regardless if the wait sensed FALSE.

http://git.fawkesrobotics.org/fawkes.git/commit/08879f9
http://trac.fawkesrobotics.org/changeset/08879f9

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 252239e30c02a83c2480c3bc75d09428de103b0c
Author:     Till Hofmann <hofm...@kbsg.rwth-aachen.de>
AuthorDate: Fri Mar 9 13:07:03 2018 +0100
Commit:     Till Hofmann <hofm...@kbsg.rwth-aachen.de>
CommitDate: Fri Mar 9 13:35:01 2018 +0100

    pddl-planner: add interface field for planner success
    
    The planner does not always find a plan, so the interface field "final"
    does not suffice to determine whether the planner found a plan. Add a
    separate field "success" that is true iff the planner has found a plan.
    If the planner failed, "final" will be true, but "success" will be
    false.

http://git.fawkesrobotics.org/fawkes.git/commit/252239e
http://trac.fawkesrobotics.org/changeset/252239e

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit c7c16a6bd648fa6d5e7b4363a22d5a14f02a6acf
Author:     Till Hofmann <hofm...@kbsg.rwth-aachen.de>
AuthorDate: Fri Mar 9 13:31:42 2018 +0100
Commit:     Till Hofmann <hofm...@kbsg.rwth-aachen.de>
CommitDate: Fri Mar 9 13:35:01 2018 +0100

    clips-executive: set goal mode to FAILED if planner did not find a plan
    
    If the planner fails to compute a plan, fail properly instead of
    re-using an old, possibly invalid plan that is still in the database.

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

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


- *Summary* -----------------------------------------------------------
 src/libs/interfaces/PddlPlannerInterface.h         |    6 +++
 src/plugins/clips-executive/clips/domain.clp       |   13 +++++--
 src/plugins/clips-executive/clips/pddl.clp         |   15 +++++++-
 .../interfaces/PddlPlannerInterface.cpp            |   38 +++++++++++++++++++-
 .../interfaces/PddlPlannerInterface.h_ext          |    6 +++
 .../interfaces/PddlPlannerInterface.tolua          |    3 ++
 .../interfaces/PddlPlannerInterface.xml            |    3 ++
 src/plugins/pddl-planner/pddl-planner_thread.cpp   |    4 ++
 8 files changed, 82 insertions(+), 6 deletions(-)


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

- *commit* a797835e4cd4c712b37aecf395473fc8289dce77 - - - - - - - - - -
Author:  Mostafa Gomaa <go...@kbsg.rwth-aachen.de>
Date:    Thu Mar 1 00:32:29 2018 +0100
Subject: clips-executive: Fix undesired late Grounding

 src/plugins/clips-executive/clips/domain.clp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/clips-executive/clips/domain.clp 
b/src/plugins/clips-executive/clips/domain.clp
index dfe7183..5643069 100644
--- a/src/plugins/clips-executive/clips/domain.clp
+++ b/src/plugins/clips-executive/clips/domain.clp
@@ -187,7 +187,8 @@
   "Ground a non-atomic precondition. Grounding here merely means that we
    duplicate the precondition and tie it to one specific action-id."
   (not (domain-wm-update))
-  (plan-action (action-name ?op) (id ?action-id))
+  (plan-action (action-name ?op) (id ?action-id) 
+    (status FORMULATED|PENDING|WAITING))
   ?precond <- (domain-precondition
                 (name ?precond-name)
                 (part-of ?op)
@@ -235,6 +236,7 @@
   "Ground an atomic precondition of an operator."
   (not (domain-wm-update))
   (plan-action
+    (status FORMULATED|PENDING|WAITING)
     (action-name ?op)
     (param-names $?action-param-names)
     (id ?action-id)

- *commit* c3900529533855291b414723b61df0f0ef4786e1 - - - - - - - - - -
Author:  Tim Niemueller <niemuel...@kbsg.rwth-aachen.de>
Date:    Fri Mar 9 12:51:28 2018 +0100
Subject: clips-executive: print domain errors to log

 src/plugins/clips-executive/clips/domain.clp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/clips-executive/clips/domain.clp 
b/src/plugins/clips-executive/clips/domain.clp
index 5643069..b8b3fb4 100644
--- a/src/plugins/clips-executive/clips/domain.clp
+++ b/src/plugins/clips-executive/clips/domain.clp
@@ -581,6 +581,9 @@
   (retract ?wmu)
 )
 
-(deffacts domain-facts
-  (domain-object-type (name object))
+(defrule domain-print-error
+  (domain-error (error-type ?type) (error-msg ?msg))
+  =>
+  (printout error "Domain error '" ?type "': " ?msg crlf)
 )
+

- *commit* 08879f9b70377d2e83dc2df848c9e68447149ac8 - - - - - - - - - -
Author:  Mostafa Gomaa <go...@kbsg.rwth-aachen.de>
Date:    Wed Feb 28 19:39:33 2018 +0100
Subject: clips-executive: Fix matching of Action to Operator

 src/plugins/clips-executive/clips/domain.clp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/clips-executive/clips/domain.clp 
b/src/plugins/clips-executive/clips/domain.clp
index b8b3fb4..fd9093a 100644
--- a/src/plugins/clips-executive/clips/domain.clp
+++ b/src/plugins/clips-executive/clips/domain.clp
@@ -411,7 +411,7 @@
   "Apply effects of an action after it succeeded."
   ?pa <- (plan-action  (id ?id) (action-name ?op) (status EXECUTION-SUCCEEDED)
                                                                                
        (param-names $?action-param-names) (param-values $?action-param-values))
-       (domain-operator (name ?action-name) (wait-sensed ?wait-sensed))
+       (domain-operator (name ?op) (wait-sensed ?wait-sensed))
        =>
        (do-for-all-facts ((?e domain-effect) (?p domain-predicate))
                (and (eq ?e:part-of ?op) (eq ?e:predicate ?p:name))

- *commit* 252239e30c02a83c2480c3bc75d09428de103b0c - - - - - - - - - -
Author:  Till Hofmann <hofm...@kbsg.rwth-aachen.de>
Date:    Fri Mar 9 13:07:03 2018 +0100
Subject: pddl-planner: add interface field for planner success

 src/libs/interfaces/PddlPlannerInterface.h         |    6 +++
 .../interfaces/PddlPlannerInterface.cpp            |   38 +++++++++++++++++++-
 .../interfaces/PddlPlannerInterface.h_ext          |    6 +++
 .../interfaces/PddlPlannerInterface.tolua          |    3 ++
 .../interfaces/PddlPlannerInterface.xml            |    3 ++
 src/plugins/pddl-planner/pddl-planner_thread.cpp   |    4 ++
 6 files changed, 59 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/libs/interfaces/PddlPlannerInterface.h 
b/src/libs/interfaces/PddlPlannerInterface.h
index 7fcc8fa..2bba677 100644
--- a/src/libs/interfaces/PddlPlannerInterface.h
+++ b/src/libs/interfaces/PddlPlannerInterface.h
@@ -49,6 +49,9 @@ class PddlPlannerInterface : public Interface
     bool final; /**< 
       Is the planning finished?
      */
+    bool success; /**< 
+      True if the planner found a plan
+     */
     char active_planner[30]; /**< 
       Currently selected planner
      */
@@ -98,6 +101,9 @@ class PddlPlannerInterface : public Interface
   bool is_final() const;
   void set_final(const bool new_final);
   size_t maxlenof_final() const;
+  bool is_success() const;
+  void set_success(const bool new_success);
+  size_t maxlenof_success() const;
   char * active_planner() const;
   void set_active_planner(const char * new_active_planner);
   size_t maxlenof_active_planner() const;
diff --git a/src/plugins/pddl-planner/interfaces/PddlPlannerInterface.cpp 
b/src/plugins/pddl-planner/interfaces/PddlPlannerInterface.cpp
index 1fd3be9..b76fc81 100644
--- a/src/plugins/pddl-planner/interfaces/PddlPlannerInterface.cpp
+++ b/src/plugins/pddl-planner/interfaces/PddlPlannerInterface.cpp
@@ -52,9 +52,10 @@ PddlPlannerInterface::PddlPlannerInterface() : Interface()
   memset(data_ptr, 0, data_size);
   add_fieldinfo(IFT_UINT32, "msg_id", 1, &data->msg_id);
   add_fieldinfo(IFT_BOOL, "final", 1, &data->final);
+  add_fieldinfo(IFT_BOOL, "success", 1, &data->success);
   add_fieldinfo(IFT_STRING, "active_planner", 30, data->active_planner);
   add_messageinfo("PlanMessage");
-  unsigned char tmp_hash[] = {0xcd, 0x44, 0x52, 0xa7, 0xfa, 0xb2, 0xaf, 0xfe, 
0xe2, 0xc5, 0x4, 0x6b, 0xe0, 0x97, 0x2b, 0x69};
+  unsigned char tmp_hash[] = {0x47, 0x74, 0xd7, 0xcf, 0x3d, 0xe5, 0x68, 0xa6, 
0x44, 0xf1, 0x1f, 0x54, 0x5d, 0xc0, 0x4d, 0xd8};
   set_hash(tmp_hash);
 }
 
@@ -134,6 +135,41 @@ PddlPlannerInterface::set_final(const bool new_final)
   data_changed = true;
 }
 
+/** Get success value.
+ * 
+      True if the planner found a plan
+    
+ * @return success value
+ */
+bool
+PddlPlannerInterface::is_success() const
+{
+  return data->success;
+}
+
+/** Get maximum length of success value.
+ * @return length of success value, can be length of the array or number of 
+ * maximum number of characters for a string
+ */
+size_t
+PddlPlannerInterface::maxlenof_success() const
+{
+  return 1;
+}
+
+/** Set success value.
+ * 
+      True if the planner found a plan
+    
+ * @param new_success new success value
+ */
+void
+PddlPlannerInterface::set_success(const bool new_success)
+{
+  data->success = new_success;
+  data_changed = true;
+}
+
 /** Get active_planner value.
  * 
       Currently selected planner
diff --git a/src/plugins/pddl-planner/interfaces/PddlPlannerInterface.h_ext 
b/src/plugins/pddl-planner/interfaces/PddlPlannerInterface.h_ext
index 7fcc8fa..2bba677 100644
--- a/src/plugins/pddl-planner/interfaces/PddlPlannerInterface.h_ext
+++ b/src/plugins/pddl-planner/interfaces/PddlPlannerInterface.h_ext
@@ -49,6 +49,9 @@ class PddlPlannerInterface : public Interface
     bool final; /**< 
       Is the planning finished?
      */
+    bool success; /**< 
+      True if the planner found a plan
+     */
     char active_planner[30]; /**< 
       Currently selected planner
      */
@@ -98,6 +101,9 @@ class PddlPlannerInterface : public Interface
   bool is_final() const;
   void set_final(const bool new_final);
   size_t maxlenof_final() const;
+  bool is_success() const;
+  void set_success(const bool new_success);
+  size_t maxlenof_success() const;
   char * active_planner() const;
   void set_active_planner(const char * new_active_planner);
   size_t maxlenof_active_planner() const;
diff --git a/src/plugins/pddl-planner/interfaces/PddlPlannerInterface.tolua 
b/src/plugins/pddl-planner/interfaces/PddlPlannerInterface.tolua
index b156da2..2d7f2ea 100644
--- a/src/plugins/pddl-planner/interfaces/PddlPlannerInterface.tolua
+++ b/src/plugins/pddl-planner/interfaces/PddlPlannerInterface.tolua
@@ -40,6 +40,9 @@ class PddlPlannerInterface : public Interface
   bool is_final();
   void set_final(const bool new_final);
   int maxlenof_final() const;
+  bool is_success();
+  void set_success(const bool new_success);
+  int maxlenof_success() const;
   char * active_planner();
   void set_active_planner(const char * new_active_planner);
   int maxlenof_active_planner() const;
diff --git a/src/plugins/pddl-planner/interfaces/PddlPlannerInterface.xml 
b/src/plugins/pddl-planner/interfaces/PddlPlannerInterface.xml
index 8ea34b1..7343b34 100644
--- a/src/plugins/pddl-planner/interfaces/PddlPlannerInterface.xml
+++ b/src/plugins/pddl-planner/interfaces/PddlPlannerInterface.xml
@@ -11,6 +11,9 @@
     <field type="bool" name="final">
       Is the planning finished?
     </field>
+    <field type="bool" name="success">
+      True if the planner found a plan
+    </field>
     <field type="string" length="30" name="active_planner">
       Currently selected planner
     </field>
diff --git a/src/plugins/pddl-planner/pddl-planner_thread.cpp 
b/src/plugins/pddl-planner/pddl-planner_thread.cpp
index a84bd2b..0da5bf3 100644
--- a/src/plugins/pddl-planner/pddl-planner_thread.cpp
+++ b/src/plugins/pddl-planner/pddl-planner_thread.cpp
@@ -78,6 +78,7 @@ PddlPlannerThread::init()
   plan_if_->set_active_planner(planner_string.c_str());
   plan_if_->set_msg_id(0);
   plan_if_->set_final(false);
+  plan_if_->set_success(false);
   plan_if_->write();
 
   //setup interface listener
@@ -104,9 +105,11 @@ PddlPlannerThread::loop()
     BSONObj plan = BSONFromActionList();
     robot_memory->update(fromjson("{plan:{$exists:true}}"), plan, 
cfg_collection_, true);
     print_action_list();
+    plan_if_->set_success(true);
   } else {
     logger->log_error(name(),"Updating plan failed, action list empty!");
     robot_memory->update(fromjson("{plan:{$exists:true}}"), 
fromjson("{plan:0}"), cfg_collection_, true);
+    plan_if_->set_success(false);
   }
 
   plan_if_->set_final(true);
@@ -343,6 +346,7 @@ PddlPlannerThread::bb_interface_message_received(Interface 
*interface, fawkes::M
   if (message->is_of_type<PddlPlannerInterface::PlanMessage>()) {
     PddlPlannerInterface::PlanMessage* msg = 
(PddlPlannerInterface::PlanMessage*) message;
     plan_if_->set_msg_id(msg->id());
+    plan_if_->set_success(false);
     plan_if_->set_final(false);
     plan_if_->write();
     wakeup(); //activates loop where the generation is done

- *commit* c7c16a6bd648fa6d5e7b4363a22d5a14f02a6acf - - - - - - - - - -
Author:  Till Hofmann <hofm...@kbsg.rwth-aachen.de>
Date:    Fri Mar 9 13:31:42 2018 +0100
Subject: clips-executive: set goal mode to FAILED if planner did not find a plan

 src/plugins/clips-executive/clips/pddl.clp |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/clips-executive/clips/pddl.clp 
b/src/plugins/clips-executive/clips/pddl.clp
index a543fe4..9d86184 100644
--- a/src/plugins/clips-executive/clips/pddl.clp
+++ b/src/plugins/clips-executive/clips/pddl.clp
@@ -77,11 +77,24 @@
 (defrule pddl-check-if-planner-finished
   "Check whether the planner finished planning."
   ?p <- (pddl-plan (status RUNNING) (plan-id ?plan-id))
-  (PddlPlannerInterface (id "pddl-planner") (msg_id ?plan-id) (final TRUE))
+  (PddlPlannerInterface (id "pddl-planner") (msg_id ?plan-id) (final TRUE)
+    (success TRUE))
   =>
   (modify ?p (status PLANNED))
 )
 
+(defrule pddl-check-if-planner-failed
+  "Check whether the planner finished but has not found a plan."
+  ?g <- (goal (id ?goal-id))
+  ?p <- (pddl-plan (status RUNNING) (goal-id ?goal-id) (plan-id ?plan-id))
+  (PddlPlannerInterface (id "pddl-planner") (msg_id ?plan-id) (final TRUE)
+    (success FALSE))
+  =>
+  (printout error "Planning failed for goal " ?goal-id crlf)
+  (modify ?g (mode FAILED))
+  (retract ?p)
+)
+
 (deffunction pddl-get-max-action-id ()
   "Get the max ID of all current action"
   (bind ?i 0)




-- 
Fawkes Robotics Framework                 http://www.fawkesrobotics.org
_______________________________________________
fawkes-commits mailing list
fawkes-commits@lists.kbsg.rwth-aachen.de
https://lists.kbsg.rwth-aachen.de/listinfo/fawkes-commits

Reply via email to