tf2_ros  master
This package contains the ROS bindings for the tf2 library, for both Python and C++.
Public Member Functions | List of all members
tf2_ros::TransformBroadcaster Class Reference

This class provides an easy way to publish coordinate frame transform information. It will handle all the messaging and stuffing of messages. And the function prototypes lay out all the necessary data needed for each message.
More...

#include <transform_broadcaster.h>

Public Member Functions

template<class NodeT , class AllocatorT = std::allocator<void>>
 TransformBroadcaster (NodeT &&node, const rclcpp::QoS &qos=DynamicBroadcasterQoS(), const rclcpp::PublisherOptionsWithAllocator< AllocatorT > &options=[]() { rclcpp::PublisherOptionsWithAllocator< AllocatorT > options;options.qos_overriding_options=rclcpp::QosOverridingOptions{ rclcpp::QosPolicyKind::Depth, rclcpp::QosPolicyKind::Durability, rclcpp::QosPolicyKind::History, rclcpp::QosPolicyKind::Reliability};return options;}())
 Node interface constructor. More...
 
TF2_ROS_PUBLIC void sendTransform (const geometry_msgs::msg::TransformStamped &transform)
 Send a TransformStamped message. More...
 
TF2_ROS_PUBLIC void sendTransform (const std::vector< geometry_msgs::msg::TransformStamped > &transforms)
 Send a vector of TransformStamped messages. More...
 

Detailed Description

This class provides an easy way to publish coordinate frame transform information. It will handle all the messaging and stuffing of messages. And the function prototypes lay out all the necessary data needed for each message.

Constructor & Destructor Documentation

◆ TransformBroadcaster()

template<class NodeT , class AllocatorT = std::allocator<void>>
tf2_ros::TransformBroadcaster::TransformBroadcaster ( NodeT &&  node,
const rclcpp::QoS &  qos = DynamicBroadcasterQoS(),
const rclcpp::PublisherOptionsWithAllocator< AllocatorT > &  options = []() { rclcpp::PublisherOptionsWithAllocator<AllocatorT> options; options.qos_overriding_options = rclcpp::QosOverridingOptions{ rclcpp::QosPolicyKind::Depth, rclcpp::QosPolicyKind::Durability, rclcpp::QosPolicyKind::History, rclcpp::QosPolicyKind::Reliability}; return options; } () 
)
inline

Node interface constructor.

Member Function Documentation

◆ sendTransform() [1/2]

TF2_ROS_PUBLIC void tf2_ros::TransformBroadcaster::sendTransform ( const geometry_msgs::msg::TransformStamped &  transform)

Send a TransformStamped message.

The transform ʰTₐ added is from child_frame_id, a to header.frame_id, h. That is, position in child_frame_id ᵃp can be transformed to position in header.frame_id ʰp such that ʰp = ʰTₐ ᵃp .

◆ sendTransform() [2/2]

TF2_ROS_PUBLIC void tf2_ros::TransformBroadcaster::sendTransform ( const std::vector< geometry_msgs::msg::TransformStamped > &  transforms)

Send a vector of TransformStamped messages.

The transforms ʰTₐ added are from child_frame_id, a to header.frame_id, h. That is, position in child_frame_id ᵃp can be transformed to position in header.frame_id ʰp such that ʰp = ʰTₐ ᵃp .


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