Fawkes API  Fawkes Development Version
fawkes::tf::TransformPublisher Class Reference

Utility class to send transforms. More...

#include <>>

Public Member Functions

 TransformPublisher (BlackBoard *bb, const char *bb_iface_id)
 Constructor. More...
 
virtual ~TransformPublisher ()
 Destructor. More...
 
virtual void send_transform (const StampedTransform &transform, const bool is_static=false)
 Publish transform. More...
 
virtual void send_transform (const Transform &transform, const fawkes::Time &time, const std::string frame, const std::string child_frame, const bool is_static=false)
 Convenience wrapper to send a transform. More...
 

Detailed Description

Utility class to send transforms.

The transform publisher opens an instance of TransformInterface on the blackboard for writing and publishes every transform through that interface. Assuming that the event-based listener is used it will catch all updates even though we might send them in quick succession.

Author
Tim Niemueller

Definition at line 70 of file transform_publisher.h.

Constructor & Destructor Documentation

◆ TransformPublisher()

fawkes::tf::TransformPublisher::TransformPublisher ( BlackBoard bb,
const char *  bb_iface_id 
)

Constructor.

Parameters
bbblackboard to open transform interface on, if 0 the publisher will be disabled. Trying to send a transform will result in a DisabledException being thrown.
bb_iface_idthe blackboard interface ID to be used for the opened TransformInterface. Note that the name is prefixed with "/tf/".

Definition at line 95 of file transform_publisher.cpp.

References fawkes::BlackBoard::open_for_writing(), and fawkes::Interface::set_auto_timestamping().

◆ ~TransformPublisher()

fawkes::tf::TransformPublisher::~TransformPublisher ( )
virtual

Destructor.

Closes TransformInterface, hence BlackBoard must still be alive and valid.

Definition at line 111 of file transform_publisher.cpp.

References fawkes::BlackBoard::close().

Member Function Documentation

◆ send_transform() [1/2]

◆ send_transform() [2/2]

void fawkes::tf::TransformPublisher::send_transform ( const Transform &  transform,
const fawkes::Time time,
const std::string  frame,
const std::string  child_frame,
const bool  is_static = false 
)
inlinevirtual

Convenience wrapper to send a transform.

This simply calls send_transform() with a StampedTransform created from the data pased into this method.

Parameters
transformtransform to publish
timetime of the transform to publish
framereference frame ID
child_framechild frame ID
is_statictrue if the transform is static, i.e., it does not change over time, false otherwise

Definition at line 78 of file transform_publisher.h.

References send_transform().


The documentation for this class was generated from the following files: