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

Utility class to send transforms. More...

#include <>>

List of all members.

Public Member Functions

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

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

Constructor & Destructor Documentation

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 93 of file transform_publisher.cpp.

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

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

Destructor.

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

Definition at line 109 of file transform_publisher.cpp.

References fawkes::BlackBoard::close().


Member Function Documentation

void fawkes::tf::TransformPublisher::send_transform ( const Transform &  transform,
const fawkes::Time time,
const std::string  frame,
const std::string  child_frame 
) [inline, virtual]

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

Definition at line 78 of file transform_publisher.h.

References send_transform().

Referenced by send_transform().


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