Fawkes API
Fawkes Development Version
transform_publisher.h
1
/***************************************************************************
2
* transform_publisher.h - Fawkes transform publisher (based on ROS tf)
3
*
4
* Created: Tue Oct 25 22:17:54 2011
5
* Copyright 2011 Tim Niemueller [www.niemueller.de]
6
****************************************************************************/
7
8
/* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
11
* (at your option) any later version. A runtime exception applies to
12
* this software (see LICENSE.GPL_WRE file mentioned below for details).
13
*
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU Library General Public License for more details.
18
*
19
* Read the full text in the LICENSE.GPL_WRE file in the doc directory.
20
*/
21
22
/* This code is based on ROS tf with the following copyright and license:
23
*
24
* Copyright (c) 2008, Willow Garage, Inc.
25
* All rights reserved.
26
*
27
* Redistribution and use in source and binary forms, with or without
28
* modification, are permitted provided that the following conditions are met:
29
*
30
* * Redistributions of source code must retain the above copyright
31
* notice, this list of conditions and the following disclaimer.
32
* * Redistributions in binary form must reproduce the above copyright
33
* notice, this list of conditions and the following disclaimer in the
34
* documentation and/or other materials provided with the distribution.
35
* * Neither the name of the Willow Garage, Inc. nor the names of its
36
* contributors may be used to endorse or promote products derived from
37
* this software without specific prior written permission.
38
*
39
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
40
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
41
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
42
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
43
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
44
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
45
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
46
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
47
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
48
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
49
* POSSIBILITY OF SUCH DAMAGE.
50
*/
51
52
#ifndef _LIBS_TF_TRANSFORM_PUBLISHER_H_
53
#define _LIBS_TF_TRANSFORM_PUBLISHER_H_
54
55
#include <tf/types.h>
56
#include <utils/time/time.h>
57
58
namespace
fawkes
{
59
60
class
BlackBoard;
61
class
TransformInterface;
62
class
Mutex;
63
64
namespace
tf {
65
66
class
TransformPublisher
67
{
68
public
:
69
TransformPublisher
(BlackBoard *bb,
const
char
*bb_iface_id);
70
virtual
~TransformPublisher
();
71
72
virtual
void
send_transform
(
const
StampedTransform
&transform,
const
bool
is_static =
false
);
73
74
virtual
void
75
send_transform
(
const
Transform & transform,
76
const
fawkes::Time
&time,
77
const
std::string frame,
78
const
std::string child_frame,
79
const
bool
is_static =
false
)
80
{
81
send_transform
(
StampedTransform
(transform, time, frame, child_frame), is_static);
82
}
83
84
private
:
85
BlackBoard
* bb_;
86
TransformInterface
*tfif_;
87
Mutex
* mutex_;
88
};
89
90
}
// end namespace tf
91
}
// end namespace fawkes
92
93
#endif
fawkes::tf::StampedTransform
Transform that contains a timestamp and frame IDs.
Definition:
types.h:101
fawkes::Mutex
Definition:
mutex.h:38
fawkes::BlackBoard
Definition:
blackboard.h:50
fawkes
fawkes::tf::TransformPublisher::send_transform
virtual void send_transform(const StampedTransform &transform, const bool is_static=false)
Publish transform.
Definition:
transform_publisher.cpp:125
fawkes::tf::TransformPublisher::~TransformPublisher
virtual ~TransformPublisher()
Destructor.
Definition:
transform_publisher.cpp:113
fawkes::Time
Definition:
time.h:98
fawkes::TransformInterface
Definition:
TransformInterface.h:39
fawkes::tf::TransformPublisher::TransformPublisher
TransformPublisher(BlackBoard *bb, const char *bb_iface_id)
Constructor.
Definition:
transform_publisher.cpp:99
src
libs
tf
transform_publisher.h
Generated by
1.8.17