Fawkes API  Fawkes Development Version
fawkes::TransformAspect Class Reference

Thread aspect to access the transform system. More...

#include <>>

Inheritance diagram for fawkes::TransformAspect:

List of all members.

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::TransformListenertf_listener
 This is the transform listener which saves transforms published by other threads in the system.
tf::TransformPublishertf_publisher
 This is the transform publisher which can be used to publish transforms via the blackboard.

Detailed Description

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.

Author:
Tim Niemueller

Member Enumeration Documentation

Enumeration describing the desired mode of operation.

Enumerator:
ONLY_LISTENER 

only create a transform listener

ONLY_PUBLISHER 

only create a transform publisher

BOTH 

create both, transform listener and publisher

Definition at line 42 of file tf.h.


Constructor & Destructor Documentation

fawkes::TransformAspect::TransformAspect ( Mode  mode = ONLY_LISTENER,
const char *  tf_bb_iface_id = 0 
)

Constructor.

Parameters:
modemode of operation
tf_bb_iface_idinterface 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]

Virtual empty destructor.

Definition at line 77 of file tf.cpp.


Member Function Documentation

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.

Parameters:
blackboardblackboard 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().


Member Data Documentation

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().

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().


The documentation for this class was generated from the following files: