Fawkes API
Fawkes Development Version
static_transforms_thread.h
1
2
/***************************************************************************
3
* static_transform_thread.h - Static transform publisher thread
4
*
5
* Created: Tue Oct 25 16:32:04 2011
6
* Copyright 2011 Tim Niemueller [www.niemueller.de]
7
* 2014 Tobias Neumann
8
****************************************************************************/
9
10
/* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
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 file in the doc directory.
21
*/
22
23
#ifndef _PLUGINS_STATIC_TRANSFORMS_STATIC_TRANSFORMS_THREAD_H_
24
#define _PLUGINS_STATIC_TRANSFORMS_STATIC_TRANSFORMS_THREAD_H_
25
26
#include <aspect/blackboard.h>
27
#include <aspect/blocked_timing.h>
28
#include <aspect/clock.h>
29
#include <aspect/configurable.h>
30
#include <aspect/logging.h>
31
#include <aspect/tf.h>
32
#include <config/change_handler.h>
33
#include <core/threading/thread.h>
34
35
namespace
fawkes
{
36
class
Time;
37
}
38
39
class
StaticTransformsThread
:
public
fawkes::Thread
,
40
public
fawkes::ClockAspect
,
41
public
fawkes::LoggingAspect
,
42
public
fawkes::ConfigurableAspect
,
43
public
fawkes::BlackBoardAspect
,
44
public
fawkes::TransformAspect
,
45
public
fawkes::ConfigurationChangeHandler
46
{
47
public
:
48
StaticTransformsThread
();
49
virtual
~StaticTransformsThread
();
50
51
virtual
void
init
();
52
virtual
void
loop
();
53
virtual
void
finalize
();
54
55
/** Stub to see name in backtrace for easier debugging. @see Thread::run() */
56
protected
:
57
virtual
void
58
run
()
59
{
60
Thread::run();
61
}
62
63
private
:
64
/** Static transform entry to publish. */
65
typedef
struct
66
{
67
std::string
name
;
/**< Transform name */
68
fawkes::tf::StampedTransform
*transform;
/**< Transform. */
69
} Entry;
70
71
std::list<Entry> entries_;
72
73
void
entries_delete();
74
void
entries_get_from_config();
75
76
virtual
void
config_tag_changed(
const
char
*new_tag){};
77
virtual
void
config_comment_changed(
const
fawkes::Configuration::ValueIterator
*v){};
78
virtual
void
config_value_changed(
const
fawkes::Configuration::ValueIterator
*v);
79
virtual
void
config_value_erased(
const
char
*path){};
80
};
81
82
#endif
fawkes::tf::StampedTransform
Transform that contains a timestamp and frame IDs.
Definition:
types.h:101
StaticTransformsThread::loop
virtual void loop()
Code to execute in the thread.
Definition:
static_transforms_thread.cpp:243
fawkes::ConfigurationChangeHandler
Definition:
change_handler.h:37
fawkes::Thread::name
const char * name() const
Definition:
thread.h:100
StaticTransformsThread::StaticTransformsThread
StaticTransformsThread()
Constructor.
Definition:
static_transforms_thread.cpp:45
fawkes::Configuration::ValueIterator
Definition:
config.h:77
StaticTransformsThread::run
virtual void run()
Stub to see name in backtrace for easier debugging.
Definition:
static_transforms_thread.h:58
fawkes::BlackBoardAspect
Definition:
blackboard.h:38
fawkes
fawkes::LoggingAspect
Definition:
logging.h:38
StaticTransformsThread::init
virtual void init()
Initialize the thread.
Definition:
static_transforms_thread.cpp:58
fawkes::TransformAspect
Definition:
tf.h:43
fawkes::Thread
Definition:
thread.h:45
StaticTransformsThread::~StaticTransformsThread
virtual ~StaticTransformsThread()
Destructor.
Definition:
static_transforms_thread.cpp:53
fawkes::ConfigurableAspect
Definition:
configurable.h:38
StaticTransformsThread
Definition:
static_transforms_thread.h:39
fawkes::ClockAspect
Definition:
clock.h:40
StaticTransformsThread::finalize
virtual void finalize()
Finalize the thread.
Definition:
static_transforms_thread.cpp:66
src
plugins
static_transforms
static_transforms_thread.h
Generated by
1.8.17