tf2  master
tf2 maintains the relationship between coordinate frames in a tree structure buffered in time, and lets the user transform points, vectors, etc between any two coordinate frames at any desired point in time.
buffer_core_interface.h
Go to the documentation of this file.
1 // Copyright 2019, Open Source Robotics Foundation, Inc. All rights reserved.
2 //
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are met:
5 //
6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer.
8 //
9 // * Redistributions in binary form must reproduce the above copyright
10 // notice, this list of conditions and the following disclaimer in the
11 // documentation and/or other materials provided with the distribution.
12 //
13 // * Neither the name of the Open Source Robotics Foundation nor the names of its
14 // contributors may be used to endorse or promote products derived from
15 // this software without specific prior written permission.
16 //
17 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
21 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 // POSSIBILITY OF SUCH DAMAGE.
28 #ifndef TF2__BUFFER_CORE_INTERFACE_H_
29 #define TF2__BUFFER_CORE_INTERFACE_H_
30 
31 #include <string>
32 #include <vector>
33 
34 #include "geometry_msgs/msg/transform_stamped.hpp"
35 
36 #include "tf2/time.h"
37 #include "tf2/visibility_control.h"
38 
39 namespace tf2
40 {
41 
49 {
50 public:
52  virtual
53  ~BufferCoreInterface() = default;
54 
59  virtual void
60  clear() = 0;
61 
70  virtual geometry_msgs::msg::TransformStamped
72  const std::string & target_frame,
73  const std::string & source_frame,
74  const tf2::TimePoint & time) const = 0;
75 
87  virtual geometry_msgs::msg::TransformStamped
89  const std::string & target_frame,
90  const tf2::TimePoint & target_time,
91  const std::string & source_frame,
92  const tf2::TimePoint & source_time,
93  const std::string & fixed_frame) const = 0;
94 
104  TF2_PUBLIC
105  virtual bool
106  canTransform(
107  const std::string & target_frame,
108  const std::string & source_frame,
109  const tf2::TimePoint & time,
110  std::string * error_msg) const = 0;
111 
123  TF2_PUBLIC
124  virtual bool
125  canTransform(
126  const std::string & target_frame,
127  const tf2::TimePoint & target_time,
128  const std::string & source_frame,
129  const tf2::TimePoint & source_time,
130  const std::string & fixed_frame,
131  std::string * error_msg) const = 0;
132 
137  TF2_PUBLIC
139  getAllFrameNames() const = 0;
140 }; // class BufferCoreInterface
141 
142 } // namespace tf2
143 
144 #endif // TF2__BUFFER_CORE_INTERFACE_H_
std::string
std::vector< std::string >
tf2::BufferCoreInterface
Interface for providing coordinate transforms between any two frames in a system.
Definition: buffer_core_interface.h:48
tf2::BufferCoreInterface::getAllFrameNames
virtual std::vector< std::string > getAllFrameNames() const =0
Get all frames that exist in the system.
time.h
tf2::BufferCoreInterface::canTransform
virtual bool canTransform(const std::string &target_frame, const std::string &source_frame, const tf2::TimePoint &time, std::string *error_msg) const =0
Test if a transform is possible.
std::chrono::time_point< std::chrono::system_clock, Duration >
tf2::BufferCoreInterface::clear
virtual void clear()=0
Clear internal state data.
visibility_control.h
tf2::BufferCoreInterface::lookupTransform
virtual geometry_msgs::msg::TransformStamped lookupTransform(const std::string &target_frame, const std::string &source_frame, const tf2::TimePoint &time) const =0
Get the transform between two frames by frame ID.
tf2
Definition: buffer_core.h:53
TF2_PUBLIC
#define TF2_PUBLIC
Definition: visibility_control.h:57
tf2::BufferCoreInterface::~BufferCoreInterface
virtual ~BufferCoreInterface()=default