Fawkes API
Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * tf.h - Transform aspect for Fawkes 00004 * 00005 * Created: Tue Oct 25 21:33:21 2011 00006 * Copyright 2006-2011 Tim Niemueller [www.niemueller.de] 00007 ****************************************************************************/ 00008 00009 /* This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. A runtime exception applies to 00013 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU Library General Public License for more details. 00019 * 00020 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 00021 */ 00022 00023 #ifndef __ASPECT_TF_H_ 00024 #define __ASPECT_TF_H_ 00025 00026 #include <aspect/aspect.h> 00027 #include <tf/transform_listener.h> 00028 #include <tf/transform_publisher.h> 00029 00030 namespace fawkes { 00031 00032 class BlackBoard; 00033 00034 #if 0 /* just to make Emacs auto-indent happy */ 00035 } 00036 #endif 00037 00038 class TransformAspect : public virtual Aspect 00039 { 00040 public: 00041 /** Enumeration describing the desired mode of operation. */ 00042 typedef enum { 00043 ONLY_LISTENER, ///< only create a transform listener 00044 ONLY_PUBLISHER, ///< only create a transform publisher 00045 BOTH ///< create both, transform listener and publisher 00046 } Mode; 00047 00048 TransformAspect(Mode mode = ONLY_LISTENER, const char *tf_bb_iface_id = 0); 00049 virtual ~TransformAspect(); 00050 00051 void init_TransformAspect(BlackBoard *blackboard); 00052 void finalize_TransformAspect(); 00053 00054 protected: 00055 tf::TransformListener * tf_listener; 00056 tf::TransformPublisher * tf_publisher; 00057 00058 private: 00059 Mode __tf_aspect_mode; 00060 char *__tf_aspect_bb_iface_id; 00061 }; 00062 00063 } // end namespace fawkes 00064 00065 #endif