Class NodeletAwareTFBuffer

Inheritance Relationships

Base Type

Class Documentation

class NodeletAwareTFBuffer : public cras::InterruptibleTFBuffer

Provides overrides of canTransform() that correctly end when the nodelet is asked to unload.

See issue https://github.com/ros/geometry2/issues/381 for more details.

Public Functions

explicit NodeletAwareTFBuffer(const ::nodelet::Nodelet &nodelet, const ::ros::Duration &cacheTime = ::ros::Duration(::tf2::BufferCore::DEFAULT_CACHE_TIME))

Create the buffer.

Parameters:
  • nodelet[in] The stateful nodelet to be aware of.

  • cacheTime[in] How long to keep a history of transforms

NodeletAwareTFBuffer(const ::nodelet::Nodelet &nodelet, const ::std::shared_ptr<::tf2::BufferCore> &parentBuffer)

Create the buffer that relays lookups to the given parentBuffer.

Parameters:
  • nodelet[in] The stateful nodelet to be aware of.

  • parentBuffer[in] The buffer to relay lookups to. It may be null.

~NodeletAwareTFBuffer() override
virtual bool ok() const override

Whether it is OK to continue. If false, all pending lookups should stop as soon as possible.

Returns:

Whether it is OK to continue.

Protected Attributes

const ::nodelet::Nodelet &nodelet

The stateful nodelet to be aware of.