Fawkes API  Fawkes Development Version
tf.h
1 
2 /***************************************************************************
3  * tf.h - Transform aspect for Fawkes
4  *
5  * Created: Tue Oct 25 21:33:21 2011
6  * Copyright 2006-2011 Tim Niemueller [www.niemueller.de]
7  ****************************************************************************/
8 
9 /* This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version. A runtime exception applies to
13  * this software (see LICENSE.GPL_WRE file mentioned below for details).
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
21  */
22 
23 #ifndef __ASPECT_TF_H_
24 #define __ASPECT_TF_H_
25 
26 #include <aspect/aspect.h>
27 #include <tf/transform_listener.h>
28 #include <tf/transform_publisher.h>
29 
30 namespace fawkes {
31 
32  class BlackBoard;
33 
34 #if 0 /* just to make Emacs auto-indent happy */
35 }
36 #endif
37 
38 class TransformAspect : public virtual Aspect
39 {
40  public:
41  /** Enumeration describing the desired mode of operation. */
42  typedef enum {
43  ONLY_LISTENER, ///< only create a transform listener
44  ONLY_PUBLISHER, ///< only create a transform publisher
45  BOTH ///< create both, transform listener and publisher
46  } Mode;
47 
48  TransformAspect(Mode mode = ONLY_LISTENER, const char *tf_bb_iface_id = 0);
49  virtual ~TransformAspect();
50 
51  void init_TransformAspect(BlackBoard *blackboard);
53 
54  protected:
57 
58  private:
59  Mode __tf_aspect_mode;
60  char *__tf_aspect_bb_iface_id;
61 };
62 
63 } // end namespace fawkes
64 
65 #endif
only create a transform publisher
Definition: tf.h:44
tf::TransformPublisher * tf_publisher
This is the transform publisher which can be used to publish transforms via the blackboard.
Definition: tf.h:56
Fawkes aspect base class.
Definition: aspect.h:34
Receive transforms and answer queries.
Fawkes library namespace.
void init_TransformAspect(BlackBoard *blackboard)
Init transform aspect.
Definition: tf.cpp:88
Mode
Enumeration describing the desired mode of operation.
Definition: tf.h:42
Thread aspect to access the transform system.
Definition: tf.h:38
TransformAspect(Mode mode=ONLY_LISTENER, const char *tf_bb_iface_id=0)
Constructor.
Definition: tf.cpp:64
virtual ~TransformAspect()
Virtual empty destructor.
Definition: tf.cpp:77
only create a transform listener
Definition: tf.h:43
create both, transform listener and publisher
Definition: tf.h:45
Utility class to send transforms.
void finalize_TransformAspect()
Finalize transform aspect.
Definition: tf.cpp:118
The BlackBoard abstract class.
Definition: blackboard.h:49
tf::TransformListener * tf_listener
This is the transform listener which saves transforms published by other threads in the system...
Definition: tf.h:55