Go to the documentation of this file.
21 #ifndef INCLUDE_FKIE_MESSAGE_FILTERS_TF_FILTER_H_
22 #define INCLUDE_FKIE_MESSAGE_FILTERS_TF_FILTER_H_
71 template<
class... Inputs>
72 class TfFilter :
public Filter<IO<Inputs...>, IO<Inputs...>>
178 void reset() noexcept override;
190 void receive (const Inputs&... in) override;
201 template<class... Inputs>
TfFilterResult
TF transformation results.
void set_filter_failure_function(FilterFailureCB cb)
Register callback for failed transforms.
Group multiple data types as filter input or output.
@ TransformFailed
The requested transform is unavailable.
void receive(const Inputs &... in) override
Process incoming data.
@ QueueOverflow
The message has been dropped because of a queue overflow.
@ UnknownFailure
Unknown failure reason.
void report_failure(std::unique_lock< std::mutex > &, const MessageTuple &, TfFilterResult)
void set_target_frames(const ros::V_string &target_frames)
Choose the TF target frames.
void transformable(tf2::TransformableRequestHandle request_handle, const std::string &target_frame, const std::string &source_frame, ros::Time time, tf2::TransformableResult result)
uint64_t TransformableRequestHandle
std::tuple< Inputs... > MessageTuple
Wait for TF transformations for incoming messages.
@ EmptyFrameID
The message has an empty TF frame ID and cannot be transformed.
void send_message(std::unique_lock< std::mutex > &, const MessageTuple &m)
@ TransformAvailable
Success.
void reset() noexcept override
Reset filter state.
std::shared_ptr< Impl > impl_
std::function< void(const Inputs &..., TfFilterResult)> FilterFailureCB
Callback for failed transform queries.
void init(tf2::BufferCore &bc, uint32_t queue_size, const ros::NodeHandle &nh) noexcept
Initialize the filter.
@ TransformExpired
The requested transform is no longer available, likely because the message is too old.
std::vector< std::string > V_string
TfFilter() noexcept
Empty constructor.
void set_target_frame(const std::string &target_frame)
Choose the TF target frame.