Apollo 11.0
自动驾驶开放平台
apollo::transform::BufferInterface类 参考abstract

#include <buffer_interface.h>

类 apollo::transform::BufferInterface 继承关系图:
apollo::transform::BufferInterface 的协作图:

Public 成员函数

virtual TransformStamped lookupTransform (const std::string &target_frame, const std::string &source_frame, const cyber::Time &time, const float timeout_second=0.01f) const =0
 Get the transform between two frames by frame ID.
 
virtual TransformStamped lookupTransform (const std::string &target_frame, const cyber::Time &target_time, const std::string &source_frame, const cyber::Time &source_time, const std::string &fixed_frame, const float timeout_second=0.01f) const =0
 Get the transform between two frames by frame ID assuming fixed frame.
 
virtual bool canTransform (const std::string &target_frame, const std::string &source_frame, const cyber::Time &time, const float timeout_second=0.01f, std::string *errstr=nullptr) const =0
 Test if a transform is possible
 
virtual bool canTransform (const std::string &target_frame, const cyber::Time &target_time, const std::string &source_frame, const cyber::Time &source_time, const std::string &fixed_frame, const float timeout_second=0.01f, std::string *errstr=nullptr) const =0
 Test if a transform is possible
 
template<typename T >
T & transform (const T &in, T &out, const std::string &target_frame, float timeout=0.0f) const
 
template<typename T >
T transform (const T &in, const std::string &target_frame, float timeout=0.0f) const
 
template<typename A , typename B >
B & transform (const A &in, B &out, const std::string &target_frame, float timeout=0.0f) const
 
template<typename T >
T & transform (const T &in, T &out, const std::string &target_frame, const cyber::Time &target_time, const std::string &fixed_frame, float timeout=0.0f) const
 
template<typename T >
T transform (const T &in, const std::string &target_frame, const cyber::Time &target_time, const std::string &fixed_frame, float timeout=0.0f) const
 
template<typename A , typename B >
B & transform (const A &in, B &out, const std::string &target_frame, const cyber::Time &target_time, const std::string &fixed_frame, float timeout=0.0f) const
 

详细描述

在文件 buffer_interface.h 第 28 行定义.

成员函数说明

◆ canTransform() [1/2]

virtual bool apollo::transform::BufferInterface::canTransform ( const std::string &  target_frame,
const cyber::Time &  target_time,
const std::string &  source_frame,
const cyber::Time &  source_time,
const std::string &  fixed_frame,
const float  timeout_second = 0.01f,
std::string *  errstr = nullptr 
) const
pure virtual

Test if a transform is possible

参数
target_frameThe frame into which to transform
target_timeThe time into which to transform
source_frameThe frame from which to transform
source_timeThe time from which to transform
fixed_frameThe frame in which to treat the transform as constant in time
timeoutHow long to block before failing
errstrA pointer to a string which will be filled with why the transform failed, if not nullptr
返回
True if the transform is possible, false otherwise

在 apollo::transform::Buffer 内被实现.

◆ canTransform() [2/2]

virtual bool apollo::transform::BufferInterface::canTransform ( const std::string &  target_frame,
const std::string &  source_frame,
const cyber::Time &  time,
const float  timeout_second = 0.01f,
std::string *  errstr = nullptr 
) const
pure virtual

Test if a transform is possible

参数
target_frameThe frame into which to transform
source_frameThe frame from which to transform
timeThe time at which to transform
timeoutHow long to block before failing
errstrA pointer to a string which will be filled with why the transform failed, if not nullptr
返回
True if the transform is possible, false otherwise

在 apollo::transform::Buffer 内被实现.

◆ lookupTransform() [1/2]

virtual TransformStamped apollo::transform::BufferInterface::lookupTransform ( const std::string &  target_frame,
const cyber::Time &  target_time,
const std::string &  source_frame,
const cyber::Time &  source_time,
const std::string &  fixed_frame,
const float  timeout_second = 0.01f 
) const
pure virtual

Get the transform between two frames by frame ID assuming fixed frame.

参数
target_frameThe frame to which data should be transformed
target_timeThe time to which the data should be transformed. (0 will get the latest)
source_frameThe frame where the data originated
source_timeThe time at which the source_frame should be evaluated. (0 will get the latest)
fixed_frameThe frame in which to assume the transform is constant in time.
timeoutHow long to block before failing
返回
The transform between the frames

Possible exceptions tf2::LookupException, tf2::ConnectivityException, tf2::ExtrapolationException, tf2::InvalidArgumentException

在 apollo::transform::Buffer 内被实现.

◆ lookupTransform() [2/2]

virtual TransformStamped apollo::transform::BufferInterface::lookupTransform ( const std::string &  target_frame,
const std::string &  source_frame,
const cyber::Time &  time,
const float  timeout_second = 0.01f 
) const
pure virtual

Get the transform between two frames by frame ID.

参数
target_frameThe frame to which data should be transformed
source_frameThe frame where the data originated
timeThe time at which the value of the transform is desired. (0 will get the latest)
timeoutHow long to block before failing
返回
The transform between the frames

Possible exceptions tf2::LookupException, tf2::ConnectivityException, tf2::ExtrapolationException, tf2::InvalidArgumentException

在 apollo::transform::Buffer 内被实现.

◆ transform() [1/6]

template<typename A , typename B >
B & apollo::transform::BufferInterface::transform ( const A &  in,
B &  out,
const std::string &  target_frame,
const cyber::Time &  target_time,
const std::string &  fixed_frame,
float  timeout = 0.0f 
) const
inline

在文件 buffer_interface.h 第 154 行定义.

156 {
157 // do the transform
158 A copy = transform(in, target_frame, target_time, fixed_frame, timeout);
159 tf2::convert(copy, out);
160 return out;
161 }
T & transform(const T &in, T &out, const std::string &target_frame, float timeout=0.0f) const
const size_t A
Definition util.h:178

◆ transform() [2/6]

template<typename A , typename B >
B & apollo::transform::BufferInterface::transform ( const A &  in,
B &  out,
const std::string &  target_frame,
float  timeout = 0.0f 
) const
inline

在文件 buffer_interface.h 第 123 行定义.

124 {
125 A copy = transform(in, target_frame, timeout);
126 tf2::convert(copy, out);
127 return out;
128 }

◆ transform() [3/6]

template<typename T >
T apollo::transform::BufferInterface::transform ( const T &  in,
const std::string &  target_frame,
const cyber::Time &  target_time,
const std::string &  fixed_frame,
float  timeout = 0.0f 
) const
inline

在文件 buffer_interface.h 第 145 行定义.

147 {
148 T out;
149 return transform(in, out, target_frame, target_time, fixed_frame, timeout);
150 }

◆ transform() [4/6]

template<typename T >
T apollo::transform::BufferInterface::transform ( const T &  in,
const std::string &  target_frame,
float  timeout = 0.0f 
) const
inline

在文件 buffer_interface.h 第 115 行定义.

116 {
117 T out;
118 return transform(in, out, target_frame, timeout);
119 }

◆ transform() [5/6]

template<typename T >
T & apollo::transform::BufferInterface::transform ( const T &  in,
T &  out,
const std::string &  target_frame,
const cyber::Time &  target_time,
const std::string &  fixed_frame,
float  timeout = 0.0f 
) const
inline

在文件 buffer_interface.h 第 132 行定义.

134 {
135 // do the transform
136 tf2::doTransform(
137 in, out,
138 lookupTransform(target_frame, target_time, tf2::getFrameId(in),
139 tf2::getTimestamp(in), fixed_frame, timeout));
140 return out;
141 }
virtual TransformStamped lookupTransform(const std::string &target_frame, const std::string &source_frame, const cyber::Time &time, const float timeout_second=0.01f) const =0
Get the transform between two frames by frame ID.

◆ transform() [6/6]

template<typename T >
T & apollo::transform::BufferInterface::transform ( const T &  in,
T &  out,
const std::string &  target_frame,
float  timeout = 0.0f 
) const
inline

在文件 buffer_interface.h 第 104 行定义.

105 {
106 // do the transform
107 tf2::doTransform(in, out,
108 lookupTransform(target_frame, tf2::getFrameId(in),
109 tf2::getTimestamp(in), timeout));
110 return out;
111 }

该类的文档由以下文件生成: