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, thofmann/tabletop-obj has been created at ec0673db9936cd9dfd60941a77bb9b83ab452784 (commit) http://git.fawkesrobotics.org/fawkes.git/thofmann/tabletop-obj - *Log* --------------------------------------------------------------- commit b8087562163d55b87f927693b75df85bed1385f5 Author: Till Hofmann <hofm...@kbsg.rwth-aachen.de> AuthorDate: Mon Mar 10 12:53:16 2014 +0100 Commit: Till Hofmann <hofm...@kbsg.rwth-aachen.de> CommitDate: Mon Mar 10 12:53:16 2014 +0100 tabletop-obj: set table position also if table modle isn't used http://git.fawkesrobotics.org/fawkes.git/commit/b808756 http://trac.fawkesrobotics.org/changeset/b808756 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit ec0673db9936cd9dfd60941a77bb9b83ab452784 Author: Till Hofmann <hofm...@kbsg.rwth-aachen.de> AuthorDate: Mon Mar 10 12:56:23 2014 +0100 Commit: Till Hofmann <hofm...@kbsg.rwth-aachen.de> CommitDate: Mon Mar 10 12:56:23 2014 +0100 tabletop-obj: add optional parameter 'source frame' to set_position Not all positions are in the same frame as the input (e.g. object centroids are transformed to /base_link to do cylinder fitting), therefore add the parameter source_frame to set_position. http://git.fawkesrobotics.org/fawkes.git/commit/ec0673d http://trac.fawkesrobotics.org/changeset/ec0673d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *Summary* ----------------------------------------------------------- .../tabletop-objects/tabletop_objects_thread.cpp | 13 ++++--------- .../tabletop-objects/tabletop_objects_thread.h | 7 ++----- 2 files changed, 6 insertions(+), 14 deletions(-) - *Diffs* ------------------------------------------------------------- - *commit* b8087562163d55b87f927693b75df85bed1385f5 - - - - - - - - - - Author: Till Hofmann <hofm...@kbsg.rwth-aachen.de> Date: Mon Mar 10 12:53:16 2014 +0100 Subject: tabletop-obj: set table position also if table modle isn't used .../tabletop-objects/tabletop_objects_thread.cpp | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) _Diff for modified files_: diff --git a/src/plugins/perception/tabletop-objects/tabletop_objects_thread.cpp b/src/plugins/perception/tabletop-objects/tabletop_objects_thread.cpp index 2f0a36d..c8b926b 100644 --- a/src/plugins/perception/tabletop-objects/tabletop_objects_thread.cpp +++ b/src/plugins/perception/tabletop-objects/tabletop_objects_thread.cpp @@ -1001,6 +1001,9 @@ TabletopObjectsThread::loop() TIMETRACK_END(ttc_transform_model_); } + else { // !cfg_table_model_enable_ + set_position(table_pos_if_, true, table_centroid); + } } catch (Exception &e) { set_position(table_pos_if_, false); - *commit* ec0673db9936cd9dfd60941a77bb9b83ab452784 - - - - - - - - - - Author: Till Hofmann <hofm...@kbsg.rwth-aachen.de> Date: Mon Mar 10 12:56:23 2014 +0100 Subject: tabletop-obj: add optional parameter 'source frame' to set_position .../tabletop-objects/tabletop_objects_thread.cpp | 13 +++++++++---- .../tabletop-objects/tabletop_objects_thread.h | 7 +++++-- 2 files changed, 14 insertions(+), 6 deletions(-) _Diff for modified files_: diff --git a/src/plugins/perception/tabletop-objects/tabletop_objects_thread.cpp b/src/plugins/perception/tabletop-objects/tabletop_objects_thread.cpp index c8b926b..dfc79ee 100644 --- a/src/plugins/perception/tabletop-objects/tabletop_objects_thread.cpp +++ b/src/plugins/perception/tabletop-objects/tabletop_objects_thread.cpp @@ -1151,7 +1151,7 @@ TabletopObjectsThread::loop() // set positions of all visible centroids for (CentroidMap::iterator it = centroids_.begin(); it != centroids_.end(); it++) { - set_position(pos_ifs_[it->first], true, it->second); + set_position(pos_ifs_[it->first], true, it->second, Eigen::Quaternionf(1, 0, 0, 0), "/base_link"); } TIMETRACK_INTER(ttc_cluster_objects_, ttc_visualization_) @@ -1436,15 +1436,20 @@ TabletopObjectsThread::compute_similarity(double d1, double d2) void TabletopObjectsThread::set_position(fawkes::Position3DInterface *iface, - bool is_visible, const Eigen::Vector4f ¢roid, - const Eigen::Quaternionf &attitude) + bool is_visible, + const Eigen::Vector4f ¢roid, + const Eigen::Quaternionf &attitude, + string source_frame) { + if (source_frame == "") { + source_frame = input_->header.frame_id; + } tf::Stamped<tf::Pose> baserel_pose; try{ tf::Stamped<tf::Pose> spose(tf::Pose(tf::Quaternion(attitude.x(), attitude.y(), attitude.z(), attitude.w()), tf::Vector3(centroid[0], centroid[1], centroid[2])), - fawkes::Time(0, 0), input_->header.frame_id); + fawkes::Time(0, 0), source_frame); tf_listener->transform_pose(cfg_result_frame_, spose, baserel_pose); iface->set_frame(cfg_result_frame_.c_str()); } catch (Exception &e) { diff --git a/src/plugins/perception/tabletop-objects/tabletop_objects_thread.h b/src/plugins/perception/tabletop-objects/tabletop_objects_thread.h index f9ba268..e97575c 100644 --- a/src/plugins/perception/tabletop-objects/tabletop_objects_thread.h +++ b/src/plugins/perception/tabletop-objects/tabletop_objects_thread.h @@ -49,6 +49,7 @@ #include <map> #include <list> +#include <string> namespace fawkes { class Position3DInterface; @@ -145,8 +146,10 @@ class TabletopObjectsThread private: void set_position(fawkes::Position3DInterface *iface, - bool is_visible, const Eigen::Vector4f ¢roid = Eigen::Vector4f(0, 0, 0, 0), - const Eigen::Quaternionf &rotation = Eigen::Quaternionf(1, 0, 0, 0)); + bool is_visible, + const Eigen::Vector4f ¢roid = Eigen::Vector4f(0, 0, 0, 0), + const Eigen::Quaternionf &rotation = Eigen::Quaternionf(1, 0, 0, 0), + std::string source_frame = ""); CloudPtr simplify_polygon(CloudPtr polygon, float sqr_dist_threshold); CloudPtr generate_table_model(const float length, const float width, -- 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