Skip to main content

PublishTF Class

Publishes a dynamic transform on /tf at a configured rate. More...

Declaration

class moveit_pro::behaviors::PublishTF { ... }

Included Headers

#include <publish_tf.hpp>

Base class

classSharedResourcesNode<BehaviorTreeNodeT>

The SharedResourcesNode class provides a BehaviorContext object when constructing a BehaviorTree.Cpp node. More...

Derived Classes

classPublishStaticFrame

Deprecated alias for PublishTF. More...

Public Constructors Index

PublishTF (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)

Public Member Functions Index

BT::NodeStatusonStart () override
BT::NodeStatusonRunning () override
voidonHalted () override

Private Member Functions Index

tl::expected< ValidatedInputs, std::string >validateInputs () const
voidpublishTransform ()

Private Member Attributes Index

rclcpp::TimerBase::SharedPtrtimer_
geometry_msgs::msg::TransformStampedtransform_

Public Static Functions Index

static BT::PortsListprovidedPorts ()
static BT::KeyValueVectormetadata ()

Description

Publishes a dynamic transform on /tf at a configured rate.

The transform is republished by a timer at the requested rate for as long as this node is running, and stops being published when the node is halted. Wrap this in a Parallel or a long-lived decorator (e.g. KeepRunningUntilFailure) for the frame to remain available to downstream Behaviors. For a truly static frame that persists after the node halts and is broadcast on /tf_static, a future PublishStaticTF Behavior should be used instead — this one is unsuitable for static frames despite its previous misleading name PublishStaticFrame.

Data Port NamePort TypeObject Type
poseinputgeometry_msgs::msg::PoseStamped
child_frame_idinputstd::string
publish_rateinputint

Definition at line 36 of file publish_tf.hpp.

Public Constructors

PublishTF()

moveit_pro::behaviors::PublishTF::PublishTF (const std::string & name, const BT::NodeConfiguration & config, const std::shared_ptr< BehaviorContext > & shared_resources)

Declaration at line 39 of file publish_tf.hpp, definition at line 35 of file publish_tf.cpp.

Public Member Functions

onHalted()

void moveit_pro::behaviors::PublishTF::onHalted ()

Declaration at line 53 of file publish_tf.hpp, definition at line 123 of file publish_tf.cpp.

onRunning()

BT::NodeStatus moveit_pro::behaviors::PublishTF::onRunning ()

Declaration at line 50 of file publish_tf.hpp, definition at line 118 of file publish_tf.cpp.

onStart()

BT::NodeStatus moveit_pro::behaviors::PublishTF::onStart ()

Declaration at line 47 of file publish_tf.hpp, definition at line 80 of file publish_tf.cpp.

Private Member Functions

publishTransform()

void moveit_pro::behaviors::PublishTF::publishTransform ()

Declaration at line 67 of file publish_tf.hpp, definition at line 111 of file publish_tf.cpp.

validateInputs()

tl::expected< PublishTF::ValidatedInputs, std::string > moveit_pro::behaviors::PublishTF::validateInputs ()

Declaration at line 64 of file publish_tf.hpp, definition at line 56 of file publish_tf.cpp.

Private Member Attributes

timer_

rclcpp::TimerBase::SharedPtr moveit_pro::behaviors::PublishTF::timer_

Definition at line 69 of file publish_tf.hpp.

transform_

geometry_msgs::msg::TransformStamped moveit_pro::behaviors::PublishTF::transform_

Definition at line 70 of file publish_tf.hpp.

Public Static Functions

metadata()

BT::KeyValueVector moveit_pro::behaviors::PublishTF::metadata ()
static

Declaration at line 44 of file publish_tf.hpp, definition at line 51 of file publish_tf.cpp.

providedPorts()

BT::PortsList moveit_pro::behaviors::PublishTF::providedPorts ()
static

Declaration at line 42 of file publish_tf.hpp, definition at line 41 of file publish_tf.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.