mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
mrs_lib::TransformBroadcaster Class Reference

Wrapper for the tf2_ros::TransformBroadcaster. With each sendTransform() command, the message is checked against the last message with the same frame IDs. If the transform was already published in this ros::Time step, then the transform is skipped. Prevents endless stream of warnings from spamming the console output. More...

#include <transform_broadcaster.h>

Public Member Functions

 TransformBroadcaster ()
 constructor, internally starts the TransformBroadcaster
 
void sendTransform (const geometry_msgs::TransformStamped &transform)
 check if the transform is newer than the last published one and publish it. Transform is skipped if a duplicit timestamp is found More...
 
void sendTransform (const std::vector< geometry_msgs::TransformStamped > &transforms)
 check if the transforms are newer than the last published ones and publish them. A transform is skipped if a duplicit timestamp is found More...
 

Detailed Description

Wrapper for the tf2_ros::TransformBroadcaster. With each sendTransform() command, the message is checked against the last message with the same frame IDs. If the transform was already published in this ros::Time step, then the transform is skipped. Prevents endless stream of warnings from spamming the console output.

Member Function Documentation

◆ sendTransform() [1/2]

void mrs_lib::TransformBroadcaster::sendTransform ( const geometry_msgs::TransformStamped &  transform)

check if the transform is newer than the last published one and publish it. Transform is skipped if a duplicit timestamp is found

Parameters
transformto be published

◆ sendTransform() [2/2]

void mrs_lib::TransformBroadcaster::sendTransform ( const std::vector< geometry_msgs::TransformStamped > &  transforms)

check if the transforms are newer than the last published ones and publish them. A transform is skipped if a duplicit timestamp is found

Parameters
transformsvector of transforms to be published

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