[Fawkes Git] branch/fzwilling/robot-memory: 2 revs updated. (0.5.0-3463-g50e70e2)

Frederik Zwilling zwilling at kbsg.rwth-aachen.de
Mon Dec 12 21:07:07 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  50e70e2a620b9b4ab02c16cbcb0c31aaee26ebbc (commit)
       via  61f47a195f14bfe899c1abcbaa565b350c212c72 (commit)
      from  4eb6e2b97f9b41166ead27fb76a3896f34aefc76 (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 61f47a195f14bfe899c1abcbaa565b350c212c72
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Mon Dec 12 19:41:49 2016 +0100
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Mon Dec 12 21:07:00 2016 +0100

    pddl-planner: wait before reading a new plan

http://git.fawkesrobotics.org/fawkes.git/commit/61f47a1
http://trac.fawkesrobotics.org/changeset/61f47a1

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 50e70e2a620b9b4ab02c16cbcb0c31aaee26ebbc
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Mon Dec 12 19:43:11 2016 +0100
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Mon Dec 12 21:07:04 2016 +0100

    openrave-robot-memory: added rotation of objects in the scene

http://git.fawkesrobotics.org/fawkes.git/commit/50e70e2
http://trac.fawkesrobotics.org/changeset/50e70e2

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


- *Summary* -----------------------------------------------------------
 .../openrave-robot-memory_thread.cpp               |    8 ++++++++
 src/plugins/pddl-planner/pddl-planner_thread.cpp   |    8 +++++---
 2 files changed, 13 insertions(+), 3 deletions(-)


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

- *commit* 61f47a195f14bfe899c1abcbaa565b350c212c72 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Mon Dec 12 19:41:49 2016 +0100
Subject: pddl-planner: wait before reading a new plan

 src/plugins/pddl-planner/pddl-planner_thread.cpp |    8 +++++---
 1 files changed, 5 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 5292abc..af09bb6 100644
--- a/src/plugins/pddl-planner/pddl-planner_thread.cpp
+++ b/src/plugins/pddl-planner/pddl-planner_thread.cpp
@@ -81,6 +81,8 @@ PddlPlannerThread::loop()
   }
   logger->log_info(name(), "Finished planning");
 
+  sleep(2);
+
   //Parse Result and write it into the robot memory
   logger->log_info(name(), "Parsing result");
   std::string result;
@@ -93,14 +95,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);
+    robot_memory->update(fromjson("{plan:{$exists:true}}"), fromjson("{plan:1,fail:1,steps:[]}"), 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: %s", result.c_str());
-    robot_memory->update(fromjson("{plan:{$exists:true}}"), fromjson("{plan:'failed'}"), collection, true);
+    robot_memory->update(fromjson("{plan:{$exists:true}}"), fromjson("{plan:1,fail:1,steps:[]}"), collection, true);
     return;
   }
   //remove stuff that could confuse us later
@@ -108,7 +110,7 @@ PddlPlannerThread::loop()
 
   cur_pos = result.find("step", cur_pos) + 4;
   BSONObjBuilder plan_builder;
-  plan_builder << "plan" << "success";
+  plan_builder << "plan" << 1;
   BSONArrayBuilder steps_arr_builder;
   while(result.find(": ", cur_pos) != std::string::npos)
   {

- *commit* 50e70e2a620b9b4ab02c16cbcb0c31aaee26ebbc - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Mon Dec 12 19:43:11 2016 +0100
Subject: openrave-robot-memory: added rotation of objects in the scene

 .../openrave-robot-memory_thread.cpp               |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/openrave-robot-memory/openrave-robot-memory_thread.cpp b/src/plugins/openrave-robot-memory/openrave-robot-memory_thread.cpp
index 7405558..3d199db 100644
--- a/src/plugins/openrave-robot-memory/openrave-robot-memory_thread.cpp
+++ b/src/plugins/openrave-robot-memory/openrave-robot-memory_thread.cpp
@@ -113,6 +113,14 @@ OpenraveRobotMemoryThread::construct_scene()
       move_msg.set_y(block.getField("translation").Array()[1].Double());
       move_msg.set_z(block.getField("translation").Array()[2].Double());
       openrave_if_->msgq_enqueue_copy(&move_msg);
+      //rotate object
+      OpenRaveInterface::RotateObjectQuatMessage rotate_msg;
+      rotate_msg.set_name(block_name.c_str());
+      rotate_msg.set_x(block.getField("rotation").Array()[0].Double());
+      rotate_msg.set_y(block.getField("rotation").Array()[1].Double());
+      rotate_msg.set_z(block.getField("rotation").Array()[2].Double());
+      rotate_msg.set_w(block.getField("rotation").Array()[3].Double());
+      openrave_if_->msgq_enqueue_copy(&rotate_msg);
     }
   }
   added_object_types_.clear();




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


More information about the fawkes-commits mailing list