Fawkes API
Fawkes Development Version
|
Thread aspect to access the transform system. More...
#include <>>
Public Types | |
enum | Mode { ONLY_LISTENER, ONLY_PUBLISHER, BOTH } |
Enumeration describing the desired mode of operation. More... | |
Public Member Functions | |
TransformAspect (Mode mode=ONLY_LISTENER, const char *tf_bb_iface_id=0) | |
Constructor. | |
virtual | ~TransformAspect () |
Virtual empty destructor. | |
void | init_TransformAspect (BlackBoard *blackboard) |
Init transform aspect. | |
void | finalize_TransformAspect () |
Finalize transform aspect. | |
Protected Attributes | |
tf::TransformListener * | tf_listener |
This is the transform listener which saves transforms published by other threads in the system. | |
tf::TransformPublisher * | tf_publisher |
This is the transform publisher which can be used to publish transforms via the blackboard. |
Thread aspect to access the transform system.
Give this aspect to your thread to gain access to the transform library. Depending on the parameters to the ctor only the listener or additionaly the publisher is created. It is guaranteed that if used properly from within plugins that the blackboard member has been initialized properly.
fawkes::TransformAspect::TransformAspect | ( | Mode | mode = ONLY_LISTENER , |
const char * | tf_bb_iface_id = 0 |
||
) |
Constructor.
mode | mode of operation |
tf_bb_iface_id | interface ID to be used for the transform publisher. Note that this will be prefixed with "TF ". |
Definition at line 64 of file tf.cpp.
References fawkes::Aspect::add_aspect(), ONLY_PUBLISHER, and BOTH.
fawkes::TransformAspect::~TransformAspect | ( | ) | [virtual] |
void fawkes::TransformAspect::finalize_TransformAspect | ( | ) |
Finalize transform aspect.
This deletes the transform listener and publisher.
Definition at line 118 of file tf.cpp.
References tf_listener, and tf_publisher.
Referenced by fawkes::TransformAspectIniFin::finalize().
void fawkes::TransformAspect::init_TransformAspect | ( | BlackBoard * | blackboard | ) |
Init transform aspect.
This creates the listener and potentially publisher.
blackboard | blackboard used to create listener and/or publisher. |
Definition at line 88 of file tf.cpp.
References ONLY_PUBLISHER, BOTH, ONLY_LISTENER, tf_listener, and tf_publisher.
Referenced by fawkes::TransformAspectIniFin::init().
tf::TransformListener * fawkes::TransformAspect::tf_listener [protected] |
This is the transform listener which saves transforms published by other threads in the system.
Definition at line 55 of file tf.h.
Referenced by init_TransformAspect(), finalize_TransformAspect(), AmclThread::loop(), TfExampleThread::loop(), KatanaActThread::loop(), TabletopObjectsThread::loop(), and TabletopVisualizationThread::loop().
tf::TransformPublisher * fawkes::TransformAspect::tf_publisher [protected] |
This is the transform publisher which can be used to publish transforms via the blackboard.
It is only created if the constructor taking the blackboard interface ID parameter is used!
Definition at line 56 of file tf.h.
Referenced by init_TransformAspect(), finalize_TransformAspect(), AmclThread::loop(), MapLaserGenThread::loop(), RosTfThread::loop(), and StaticTransformsThread::loop().