Fawkes API  Fawkes Development Version
fawkes::TransformAspect Class Reference

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

#include <>>

Inheritance diagram for fawkes::TransformAspect:

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. More...
 
virtual ~TransformAspect ()
 Virtual empty destructor. More...
 
void init_TransformAspect (BlackBoard *blackboard)
 Init transform aspect. More...
 
void finalize_TransformAspect ()
 Finalize transform aspect. More...
 
- Public Member Functions inherited from fawkes::Aspect
const std::list< const char * > & get_aspects () const
 Get list of aspect names attached to a aspected thread. More...
 

Protected Attributes

tf::TransformListenertf_listener
 This is the transform listener which saves transforms published by other threads in the system. More...
 
tf::TransformPublishertf_publisher
 This is the transform publisher which can be used to publish transforms via the blackboard. More...
 

Additional Inherited Members

- Protected Member Functions inherited from fawkes::Aspect
void add_aspect (const char *name)
 Add an aspect to a thread. More...
 

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

Definition at line 38 of file tf.h.

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(), BOTH, and ONLY_PUBLISHER.

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 BOTH, ONLY_LISTENER, ONLY_PUBLISHER, tf_listener, and tf_publisher.

Referenced by fawkes::TransformAspectIniFin::init().

Member Data Documentation

tf::TransformListener * fawkes::TransformAspect::tf_listener
protected
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 finalize_TransformAspect(), init_TransformAspect(), StaticTransformsThread::loop(), MapLaserGenThread::loop(), RosTfThread::loop(), AmclThread::loop(), and KatanaActThread::once().


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