Fawkes API
Fawkes Development Version
|
#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) |
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.
Definition at line 69 of file transform_publisher.h.
fawkes::tf::TransformPublisher::TransformPublisher | ( | BlackBoard * | bb, |
const char * | bb_iface_id | ||
) |
Constructor.
bb | blackboard 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_id | the blackboard interface ID to be used for the opened TransformInterface. Note that the name is prefixed with "/tf/". |
Definition at line 96 of file transform_publisher.cpp.
|
virtual |
Destructor.
Closes TransformInterface, hence BlackBoard must still be alive and valid.
Definition at line 110 of file transform_publisher.cpp.
|
virtual |
Publish transform.
transform | transform to publish |
is_static | true to mark transform as static, false otherwise |
Definition at line 122 of file transform_publisher.cpp.
Referenced by TfExampleThread::loop(), LocalizationSimThread::loop(), MapLaserGenThread::loop(), Bumblebee2Thread::loop(), and send_transform().
|
inlinevirtual |
Convenience wrapper to send a transform. This simply calls send_transform() with a StampedTransform created from the data pased into this method.
transform | transform to publish |
time | time of the transform to publish |
frame | reference frame ID |
child_frame | child frame ID |
is_static | true 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().