22#include "modules/common_msgs/transform_msgs/transform.pb.h"
42 const std::string& target_frame,
const std::string& source_frame,
43 const cyber::Time& time,
const float timeout_second = 0.01f)
const = 0;
62 const std::string& target_frame,
const cyber::Time& target_time,
63 const std::string& source_frame,
const cyber::Time& source_time,
64 const std::string& fixed_frame,
65 const float timeout_second = 0.01f)
const = 0;
77 const std::string& source_frame,
79 const float timeout_second = 0.01f,
80 std::string* errstr =
nullptr)
const = 0;
96 const std::string& source_frame,
98 const std::string& fixed_frame,
99 const float timeout_second = 0.01f,
100 std::string* errstr =
nullptr)
const = 0;
103 template <
typename T>
104 T&
transform(
const T& in, T& out,
const std::string& target_frame,
105 float timeout = 0.0f)
const {
107 tf2::doTransform(in, out,
109 tf2::getTimestamp(in), timeout));
114 template <
typename T>
115 T
transform(
const T& in,
const std::string& target_frame,
116 float timeout = 0.0f)
const {
118 return transform(in, out, target_frame, timeout);
122 template <
typename A,
typename B>
123 B&
transform(
const A& in, B& out,
const std::string& target_frame,
124 float timeout = 0.0f)
const {
125 A copy =
transform(in, target_frame, timeout);
126 tf2::convert(copy, out);
131 template <
typename T>
132 T&
transform(
const T& in, T& out,
const std::string& target_frame,
133 const cyber::Time& target_time,
const std::string& fixed_frame,
134 float timeout = 0.0f)
const {
139 tf2::getTimestamp(in), fixed_frame, timeout));
144 template <
typename T>
145 T
transform(
const T& in,
const std::string& target_frame,
146 const cyber::Time& target_time,
const std::string& fixed_frame,
147 float timeout = 0.0f)
const {
149 return transform(in, out, target_frame, target_time, fixed_frame, timeout);
153 template <
typename A,
typename B>
154 B&
transform(
const A& in, B& out,
const std::string& target_frame,
155 const cyber::Time& target_time,
const std::string& fixed_frame,
156 float timeout = 0.0f)
const {
158 A copy =
transform(in, target_frame, target_time, fixed_frame, timeout);
159 tf2::convert(copy, out);
Cyber has builtin time type Time.