[Fawkes Git] branch/fzwilling/align_at_table-transform: created (0.5.0-3081-gb227689)

Frederik Zwilling zwilling at kbsg.rwth-aachen.de
Thu Mar 3 11:48:54 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/align_at_table-transform has been created
        at  b2276899d3eb8c41106ad2c052db011533eaa494 (commit)

http://git.fawkesrobotics.org/fawkes.git/fzwilling/align_at_table-transform

- *Log* ---------------------------------------------------------------
commit b2276899d3eb8c41106ad2c052db011533eaa494
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Thu Mar 3 11:41:56 2016 +0100
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Thu Mar 3 11:48:08 2016 +0100

    align_at_table: added missing transform_object function
    
    The function was missing in this skill, but present in other skills such
    as athome/advanced/katana_put_down.lua. I just copied it.

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

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


- *Summary* -----------------------------------------------------------


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

- *commit* b2276899d3eb8c41106ad2c052db011533eaa494 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Thu Mar 3 11:41:56 2016 +0100
Subject: align_at_table: added missing transform_object function

 src/lua/skills/generic/align_at_table.lua |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/lua/skills/generic/align_at_table.lua b/src/lua/skills/generic/align_at_table.lua
index f268f3c..a14668a 100644
--- a/src/lua/skills/generic/align_at_table.lua
+++ b/src/lua/skills/generic/align_at_table.lua
@@ -33,7 +33,7 @@ depends_interfaces = {
    {v = "navigator", type="NavigatorInterface", id="Navigator"}
 }
 
---local tfutils = require("fawkes.tfutils")
+local tfutils = require("fawkes.tfutils")
 
 documentation      = [==[Align at table skill
 This skill brings the robot into position in front of a table. The position
@@ -80,6 +80,22 @@ function can_transform(source_frame)
    return tf:can_transform(FRAMES.TARGET, source_frame, fawkes.Time:new(0,0))
 end
 
+function transform_point(source_frame, x, y, z)
+   local p  = fawkes.tf.Point:new(x, y, z)
+   local sp = fawkes.tf.StampedPoint:new(p, fawkes.Time:new(0,0), source_frame)
+   local tp = fawkes.tf.StampedPoint:new()
+   tf:transform_point(FRAMES.TARGET, sp, tp)
+
+   return tp:x(), tp:y(), tp:z()
+end
+
+function transform_object(obj)
+   return transform_point(obj:frame(),
+                          obj:translation(0),
+                          obj:translation(1),
+                          obj:translation(2))
+end
+
 -- Jumpconditions
 function table_detected(state)
    if table_pos:has_writer() then




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


More information about the fawkes-commits mailing list