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/joint-pantilt has been updated discards 1c7e7ac297aa28a3f83395bdaa251f9378f71b61 (commit) to 328b4b1e0661fe2756818ae09b535186abc22eac (commit) This update added new revisions after undoing existing revisions. That is to say, the old revision is not a strict subset of the new revision. This situation occurs when you --force push a change and generate a repository containing something like this: * -- * -- B -- O -- O -- O (1c7e7ac297aa28a3f83395bdaa251f9378f71b61) \ N -- N -- N (328b4b1e0661fe2756818ae09b535186abc22eac) When this happens we assume that you've already had alert emails for all of the O revisions, and so we here report only the revisions in the N branch from the common base, B. http://git.fawkesrobotics.org/fawkes.git/thofmann/joint-pantilt 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 328b4b1e0661fe2756818ae09b535186abc22eac Author: Till Hofmann <hofm...@kbsg.rwth-aachen.de> AuthorDate: Wed Jan 15 12:58:14 2014 +0100 Commit: Till Hofmann <hofm...@kbsg.rwth-aachen.de> CommitDate: Wed Jan 15 13:05:55 2014 +0100 pantilt: publish joint values in all drivers add JointInterface writers to dirperc and sony driver http://git.fawkesrobotics.org/fawkes.git/commit/328b4b1 http://trac.fawkesrobotics.org/changeset/328b4b1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *Summary* ----------------------------------------------------------- src/plugins/pantilt/sony/evid100p_thread.h | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) - *Diffs* ------------------------------------------------------------- - *commit* 328b4b1e0661fe2756818ae09b535186abc22eac - - - - - - - - - - Author: Till Hofmann <hofm...@kbsg.rwth-aachen.de> Date: Wed Jan 15 12:58:14 2014 +0100 Subject: pantilt: publish joint values in all drivers src/plugins/pantilt/dirperc/dp_thread.cpp | 32 ++++++++++++++++++++++++++ src/plugins/pantilt/dirperc/dp_thread.h | 3 ++ src/plugins/pantilt/sony/evid100p_thread.cpp | 29 +++++++++++++++++++++++ src/plugins/pantilt/sony/evid100p_thread.h | 3 ++ 4 files changed, 67 insertions(+), 0 deletions(-) _Diff for modified files_: diff --git a/src/plugins/pantilt/dirperc/dp_thread.cpp b/src/plugins/pantilt/dirperc/dp_thread.cpp index 0c9796d..14275fa 100644 --- a/src/plugins/pantilt/dirperc/dp_thread.cpp +++ b/src/plugins/pantilt/dirperc/dp_thread.cpp @@ -25,6 +25,7 @@ #include <core/threading/mutex_locker.h> #include <interfaces/PanTiltInterface.h> +#include <interfaces/JointInterface.h> #include <cstdarg> #include <cmath> @@ -89,10 +90,29 @@ PanTiltDirectedPerceptionThread::init() //__pantilt_if->set_tilt_velocity(0); __pantilt_if->write(); + float init_pan = 0.f; + float init_tilt = 0.f; + float init_pan_velocity = 0.f; + float init_tilt_velocity = 0.f; + + std::string panid = __ptu_name + " pan"; + __panjoint_if = blackboard->open_for_writing<JointInterface>(panid.c_str()); + __panjoint_if->set_position(init_pan); + __panjoint_if->set_velocity(init_pan_velocity); + __panjoint_if->write(); + + std::string tiltid = __ptu_name + " tilt"; + __tiltjoint_if = blackboard->open_for_writing<JointInterface>(tiltid.c_str()); + __tiltjoint_if->set_position(init_tilt); + __tiltjoint_if->set_velocity(init_tilt_velocity); + __tiltjoint_if->write(); + __wt = new WorkerThread(__ptu_name, logger, __ptu); __wt->start(); bbil_add_message_interface(__pantilt_if); + bbil_add_message_interface(__panjoint_if); + bbil_add_message_interface(__tiltjoint_if); blackboard->register_listener(this); #ifdef USE_TIMETRACKER @@ -109,6 +129,8 @@ PanTiltDirectedPerceptionThread::finalize() { blackboard->unregister_listener(this); blackboard->close(__pantilt_if); + blackboard->close(__panjoint_if); + blackboard->close(__tiltjoint_if); __wt->cancel(); __wt->join(); @@ -133,6 +155,12 @@ PanTiltDirectedPerceptionThread::update_sensor_values() __pantilt_if->set_tilt(tilt); __pantilt_if->set_final(__wt->is_final()); __pantilt_if->write(); + + __panjoint_if->set_position(pan); + __panjoint_if->write(); + + __tiltjoint_if->set_position(tilt); + __tiltjoint_if->write(); } } @@ -181,6 +209,10 @@ PanTiltDirectedPerceptionThread::loop() __wt->set_velocities(msg->pan_velocity(), msg->tilt_velocity()); __pantilt_if->set_pan_velocity(msg->pan_velocity()); __pantilt_if->set_tilt_velocity(msg->tilt_velocity()); + __panjoint_if->set_velocity(msg->pan_velocity()); + __panjoint_if->write(); + __tiltjoint_if->set_velocity(msg->tilt_velocity()); + __tiltjoint_if->write(); } */ diff --git a/src/plugins/pantilt/dirperc/dp_thread.h b/src/plugins/pantilt/dirperc/dp_thread.h index 3179979..718dd78 100644 --- a/src/plugins/pantilt/dirperc/dp_thread.h +++ b/src/plugins/pantilt/dirperc/dp_thread.h @@ -35,6 +35,7 @@ namespace fawkes { class PanTiltInterface; + class JointInterface; } class DirectedPerceptionPTU; @@ -63,6 +64,8 @@ class PanTiltDirectedPerceptionThread private: fawkes::PanTiltInterface *__pantilt_if; + fawkes::JointInterface *__panjoint_if; + fawkes::JointInterface *__tiltjoint_if; fawkes::RefPtr<DirectedPerceptionPTU> __ptu; diff --git a/src/plugins/pantilt/sony/evid100p_thread.cpp b/src/plugins/pantilt/sony/evid100p_thread.cpp index e13af10..2653156 100644 --- a/src/plugins/pantilt/sony/evid100p_thread.cpp +++ b/src/plugins/pantilt/sony/evid100p_thread.cpp @@ -25,6 +25,7 @@ #include <core/threading/mutex_locker.h> #include <interfaces/PanTiltInterface.h> +#include <interfaces/JointInterface.h> #include <cstdarg> #include <cmath> @@ -77,6 +78,8 @@ PanTiltSonyEviD100PThread::init() throw; } + float init_pan = 0.f; + float init_tilt = 0.f; float init_pan_velocity = 0.f; float init_tilt_velocity = 0.f; @@ -98,6 +101,18 @@ PanTiltSonyEviD100PThread::init() __pantilt_if->set_tilt_velocity(init_tilt_velocity); __pantilt_if->write(); + std::string panid = __ptu_name + " pan"; + __panjoint_if = blackboard->open_for_writing<JointInterface>(panid.c_str()); + __panjoint_if->set_position(init_pan); + __panjoint_if->set_velocity(init_pan_velocity); + __panjoint_if->write(); + + std::string tiltid = __ptu_name + " tilt"; + __tiltjoint_if = blackboard->open_for_writing<JointInterface>(tiltid.c_str()); + __tiltjoint_if->set_position(init_tilt); + __tiltjoint_if->set_velocity(init_tilt_velocity); + __tiltjoint_if->write(); + __wt = new WorkerThread(__ptu_name, logger, __cam, SonyEviD100PVisca::MIN_PAN_RAD, SonyEviD100PVisca::MAX_PAN_RAD, SonyEviD100PVisca::MIN_TILT_RAD, SonyEviD100PVisca::MAX_TILT_RAD); @@ -106,6 +121,8 @@ PanTiltSonyEviD100PThread::init() __wt->set_velocities(pan_smax, tilt_smax); bbil_add_message_interface(__pantilt_if); + bbil_add_message_interface(__panjoint_if); + bbil_add_message_interface(__tiltjoint_if); blackboard->register_listener(this); #ifdef USE_TIMETRACKER @@ -122,6 +139,8 @@ PanTiltSonyEviD100PThread::finalize() { blackboard->unregister_listener(this); blackboard->close(__pantilt_if); + blackboard->close(__panjoint_if); + blackboard->close(__tiltjoint_if); __wt->cancel(); __wt->join(); @@ -146,6 +165,12 @@ PanTiltSonyEviD100PThread::update_sensor_values() __pantilt_if->set_tilt(tilt); __pantilt_if->set_final(__wt->is_final()); __pantilt_if->write(); + + __panjoint_if->set_position(pan); + __panjoint_if->write(); + + __tiltjoint_if->set_position(tilt); + __tiltjoint_if->write(); } } @@ -196,6 +221,10 @@ PanTiltSonyEviD100PThread::loop() __wt->set_velocities(msg->pan_velocity(), msg->tilt_velocity()); __pantilt_if->set_pan_velocity(msg->pan_velocity()); __pantilt_if->set_tilt_velocity(msg->tilt_velocity()); + __panjoint_if->set_velocity(msg->pan_velocity()); + __panjoint_if->write(); + __tiltjoint_if->set_velocity(msg->tilt_velocity()); + __tiltjoint_if->write(); } } else { diff --git a/src/plugins/pantilt/sony/evid100p_thread.h b/src/plugins/pantilt/sony/evid100p_thread.h index be933dc..2c8c741 100644 --- a/src/plugins/pantilt/sony/evid100p_thread.h +++ b/src/plugins/pantilt/sony/evid100p_thread.h @@ -35,6 +35,7 @@ namespace fawkes { class PanTiltInterface; + class JointInterface; } class SonyEviD100PVisca; @@ -63,6 +64,8 @@ class PanTiltSonyEviD100PThread private: fawkes::PanTiltInterface *__pantilt_if; + fawkes::JointInterface *__panjoint_if; + fawkes::JointInterface *__tiltjoint_if; fawkes::RefPtr<SonyEviD100PVisca> __cam; -- 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