[Fawkes Git] branch/fzwilling/robot-memory: 4 revs updated. (0.5.0-3460-gbf33a68)

Frederik Zwilling zwilling at kbsg.rwth-aachen.de
Thu Dec 8 00:45:26 CET 2016


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

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

The branch, fzwilling/robot-memory has been updated
        to  bf33a688694f1bf9b4a79399b474f4a00791ba0a (commit)
       via  883c9ec801fe8bb6d8b4204bb9c31a99192219d4 (commit)
       via  a6efd5bd2b80334f2f7ce901e9f7bf246c1a6610 (commit)
       via  de3bfcbc5aff46e36a214a845e57b8f5abb9758a (commit)
      from  843d44ef8d1ecea204f491ec677f5ff32d0e1e0d (commit)

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

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

- *Log* ---------------------------------------------------------------
commit de3bfcbc5aff46e36a214a845e57b8f5abb9758a
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Wed Dec 7 21:43:34 2016 +0100
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Thu Dec 8 00:44:59 2016 +0100

    pddl-planner: plugin runs ff, parses and writes result into robot memory
    
    This plugin is a first prototype for running the ff planner (files
    specified in config), parses the resulting plan and asserts it with its
    steps into the robot memory. You can start the planner by sending an
    interface message.

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit a6efd5bd2b80334f2f7ce901e9f7bf246c1a6610
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Wed Dec 7 23:53:53 2016 +0100
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Thu Dec 8 00:45:07 2016 +0100

    robot-memory: use random seed for computable check collections

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 883c9ec801fe8bb6d8b4204bb9c31a99192219d4
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Thu Dec 8 00:42:41 2016 +0100
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Thu Dec 8 00:45:13 2016 +0100

    pddl-planner: also inform about planning failure

http://git.fawkesrobotics.org/fawkes.git/commit/883c9ec
http://trac.fawkesrobotics.org/changeset/883c9ec

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit bf33a688694f1bf9b4a79399b474f4a00791ba0a
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Thu Dec 8 00:43:34 2016 +0100
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Thu Dec 8 00:45:18 2016 +0100

    openrave: added mondel for block

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

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


- *Summary* -----------------------------------------------------------
 .../{cylinder.kinbody.xml => block.kinbody.xml}    |    7 +-
 .../interfaces/PddlPlannerInterface.h}             |   44 +++---
 src/plugins/Makefile                               |    4 +-
 .../{pddl-robot-memory => pddl-planner}/Makefile   |   26 +--
 .../interfaces/Makefile                            |    0
 .../interfaces/PddlPlannerInterface.cpp}           |  120 +++++++-------
 .../interfaces/PddlPlannerInterface.h_ext}         |   44 +++---
 .../interfaces/PddlPlannerInterface.tolua}         |   24 ++--
 .../interfaces/PddlPlannerInterface.xml}           |   14 +-
 .../pddl-planner_plugin.cpp}                       |   24 ++--
 src/plugins/pddl-planner/pddl-planner_thread.cpp   |  168 ++++++++++++++++++++
 .../pddl-planner_thread.h}                         |   36 ++---
 src/plugins/pddl-robot-memory/Makefile             |    2 +-
 .../pddl-robot-memory/pddl_robot_memory_thread.cpp |    2 +-
 .../computables/computables_manager.cpp            |    2 +
 15 files changed, 332 insertions(+), 185 deletions(-)
 copy res/openrave/{cylinder.kinbody.xml => block.kinbody.xml} (67%)
 copy src/{plugins/pddl-robot-memory/interfaces/PddlGenInterface.h_ext => libs/interfaces/PddlPlannerInterface.h} (75%)
 copy src/plugins/{pddl-robot-memory => pddl-planner}/Makefile (61%)
 copy src/plugins/{pddl-robot-memory => pddl-planner}/interfaces/Makefile (100%)
 copy src/plugins/{pddl-robot-memory/interfaces/PddlGenInterface.cpp => pddl-planner/interfaces/PddlPlannerInterface.cpp} (56%)
 copy src/plugins/{pddl-robot-memory/interfaces/PddlGenInterface.h_ext => pddl-planner/interfaces/PddlPlannerInterface.h_ext} (75%)
 copy src/plugins/{pddl-robot-memory/interfaces/PddlGenInterface.tolua => pddl-planner/interfaces/PddlPlannerInterface.tolua} (82%)
 copy src/plugins/{pddl-robot-memory/interfaces/PddlGenInterface.xml => pddl-planner/interfaces/PddlPlannerInterface.xml} (52%)
 copy src/plugins/{clips-robot-memory/clips_robot_memory_plugin.cpp => pddl-planner/pddl-planner_plugin.cpp} (64%)
 create mode 100644 src/plugins/pddl-planner/pddl-planner_thread.cpp
 copy src/plugins/{pddl-robot-memory/pddl_robot_memory_thread.h => pddl-planner/pddl-planner_thread.h} (73%)


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

- *commit* de3bfcbc5aff46e36a214a845e57b8f5abb9758a - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Wed Dec 7 21:43:34 2016 +0100
Subject: pddl-planner: plugin runs ff, parses and writes result into robot memory

 .../interfaces/PddlPlannerInterface.h}             |   44 +++---
 src/plugins/Makefile                               |    4 +-
 .../{pddl-robot-memory => pddl-planner}/Makefile   |   26 +--
 .../interfaces/Makefile                            |    0
 .../interfaces/PddlPlannerInterface.cpp}           |  120 +++++++-------
 .../interfaces/PddlPlannerInterface.h_ext}         |   44 +++---
 .../interfaces/PddlPlannerInterface.tolua}         |   24 ++--
 .../interfaces/PddlPlannerInterface.xml}           |   14 +-
 .../pddl-planner_plugin.cpp}                       |   24 ++--
 src/plugins/pddl-planner/pddl-planner_thread.cpp   |  165 ++++++++++++++++++++
 .../pddl-planner_thread.h}                         |   37 ++---
 src/plugins/pddl-robot-memory/Makefile             |    2 +-
 .../pddl-robot-memory/pddl_robot_memory_thread.cpp |    2 +-
 13 files changed, 324 insertions(+), 182 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/Makefile b/src/plugins/Makefile
index 55433d9..5029a37 100644
--- a/src/plugins/Makefile
+++ b/src/plugins/Makefile
@@ -28,7 +28,8 @@ SUBDIRS	= bbsync bblogger webview ttmainloop rrd rrdweb \
 	  clips-tf openprs openprs-agent eclipse-clp \
 	  mongodb mongodb_log robot-memory clips-robot-memory pddl-robot-memory \
 	  openni refboxcomm ros player xmlrpc gossip \
-	  robot_state_publisher gazebo dynamixel navgraph-interactive
+	  robot_state_publisher gazebo dynamixel navgraph-interactive \
+	  pddl-planner
 
 include $(BUILDSYSDIR)/rules.mk
 
@@ -44,6 +45,7 @@ clips-webview: clips webview
 clips-ros: clips ros
 clips-robot-memory: robot-memory
 pddl-robot-memory: robot-memory
+pddl-planner: robot-memory
 gazebo: robotino
 skiller: navgraph
 perception: mongodb
diff --git a/src/plugins/pddl-robot-memory/Makefile b/src/plugins/pddl-robot-memory/Makefile
index 1cc05f9..185cc54 100644
--- a/src/plugins/pddl-robot-memory/Makefile
+++ b/src/plugins/pddl-robot-memory/Makefile
@@ -50,7 +50,7 @@ endif
 ifeq ($(OBJSSUBMAKE),1)
 all: $(WARN_TARGETS)
 
-.PHONY: warning_tf warning_ctemplate warning_cpp11
+.PHONY: warning_mongodb warning_ctemplate warning_cpp11
 warning_mongodb:
 	$(SILENT)echo -e "$(INDENT_PRINT)--> $(TRED)Omitting pddl-robot-memory plugin$(TNORMAL) (mongodb not available)"
 warning_cpp11:
diff --git a/src/plugins/pddl-robot-memory/pddl_robot_memory_thread.cpp b/src/plugins/pddl-robot-memory/pddl_robot_memory_thread.cpp
index 86bb38f..1fe679c 100644
--- a/src/plugins/pddl-robot-memory/pddl_robot_memory_thread.cpp
+++ b/src/plugins/pddl-robot-memory/pddl_robot_memory_thread.cpp
@@ -55,7 +55,7 @@ using namespace mongo;
 
 PddlRobotMemoryThread::PddlRobotMemoryThread()
  : Thread("PddlRobotMemoryThread", Thread::OPMODE_WAITFORWAKEUP),
-   BlackBoardInterfaceListener("NavGraphGeneratorThread")
+   BlackBoardInterfaceListener("PddlRobotMemoryThread")
 {
 }
 

- *commit* a6efd5bd2b80334f2f7ce901e9f7bf246c1a6610 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Wed Dec 7 23:53:53 2016 +0100
Subject: robot-memory: use random seed for computable check collections

 .../computables/computables_manager.cpp            |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/robot-memory/computables/computables_manager.cpp b/src/plugins/robot-memory/computables/computables_manager.cpp
index 655b20f..fbf45fb 100644
--- a/src/plugins/robot-memory/computables/computables_manager.cpp
+++ b/src/plugins/robot-memory/computables/computables_manager.cpp
@@ -45,6 +45,8 @@ ComputablesManager::ComputablesManager(fawkes::Logger* logger, fawkes::Configura
   try {
     matching_test_collection_ = config_->get_string("/plugins/robot-memory/database") + ".computables_matching";
   } catch (Exception &e) {}
+
+  srand(time(NULL));
 }
 
 ComputablesManager::~ComputablesManager()

- *commit* 883c9ec801fe8bb6d8b4204bb9c31a99192219d4 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Thu Dec 8 00:42:41 2016 +0100
Subject: pddl-planner: also inform about planning failure

 src/plugins/pddl-planner/pddl-planner_thread.cpp |    9 ++++++---
 src/plugins/pddl-planner/pddl-planner_thread.h   |    1 +
 2 files changed, 7 insertions(+), 3 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/pddl-planner/pddl-planner_thread.cpp b/src/plugins/pddl-planner/pddl-planner_thread.cpp
index c053762..5292abc 100644
--- a/src/plugins/pddl-planner/pddl-planner_thread.cpp
+++ b/src/plugins/pddl-planner/pddl-planner_thread.cpp
@@ -55,6 +55,7 @@ PddlPlannerThread::init()
   blackboard->register_listener(this, BlackBoard::BBIL_FLAG_MESSAGES);
 
   result_path = StringConversions::resolve_path(config->get_string("plugins/pddl-planner/description-folder") + config->get_string("plugins/pddl-planner/result-file"));
+  collection = config->get_string("plugins/pddl-planner/collection");
 }
 
 /**
@@ -92,12 +93,14 @@ PddlPlannerThread::loop()
   else
   {
     logger->log_error(name(), "Could not open %s", result_path.c_str());
+    robot_memory->update(fromjson("{plan:{$exists:true}}"), fromjson("{plan:'failed'}"), collection, true);
     return;
   }
   size_t cur_pos = 0;
   if(result.find("found legal plan as follows", cur_pos) == std::string::npos)
   {
-    logger->log_error(name(), "Planning Failed");
+    logger->log_error(name(), "Planning Failed: %s", result.c_str());
+    robot_memory->update(fromjson("{plan:{$exists:true}}"), fromjson("{plan:'failed'}"), collection, true);
     return;
   }
   //remove stuff that could confuse us later
@@ -105,7 +108,7 @@ PddlPlannerThread::loop()
 
   cur_pos = result.find("step", cur_pos) + 4;
   BSONObjBuilder plan_builder;
-  plan_builder << "plan" << 1;
+  plan_builder << "plan" << "success";
   BSONArrayBuilder steps_arr_builder;
   while(result.find(": ", cur_pos) != std::string::npos)
   {
@@ -140,7 +143,7 @@ PddlPlannerThread::loop()
   logger->log_info(name(), "Plan: %s", plan.toString().c_str());
 
   //Write result into Robot Memory
-  robot_memory->update(fromjson("{plan:1}"), plan, config->get_string("plugins/pddl-planner/collection"), true);
+  robot_memory->update(fromjson("{plan:{$exists:true}}"), plan, collection, true);
 }
 
 void
diff --git a/src/plugins/pddl-planner/pddl-planner_thread.h b/src/plugins/pddl-planner/pddl-planner_thread.h
index debab17..479b4a0 100644
--- a/src/plugins/pddl-planner/pddl-planner_thread.h
+++ b/src/plugins/pddl-planner/pddl-planner_thread.h
@@ -53,6 +53,7 @@ class PddlPlannerThread
  private:
   fawkes::PddlPlannerInterface *gen_if;
   std::string result_path;
+  std::string collection;
 
   virtual bool bb_interface_message_received(fawkes::Interface *interface,
                                              fawkes::Message *message) throw();

- *commit* bf33a688694f1bf9b4a79399b474f4a00791ba0a - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Thu Dec 8 00:43:34 2016 +0100
Subject: openrave: added mondel for block

 .../{cylinder.kinbody.xml => block.kinbody.xml}    |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)





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


More information about the fawkes-commits mailing list