|
mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
|
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. The sendTransform() methods can be called from multiple threads at the same time. More...
#include <transform_broadcaster.h>
Classes | |
| struct | NotInitializedException |
| is thrown when calculating of heading is not possible due to atan2 exception More... | |
Public Member Functions | |
| TransformBroadcaster () | |
| constructor, internally starts the TransformBroadcaster | |
| TransformBroadcaster (const rclcpp::Node::SharedPtr &node) | |
| constructor, internally starts the TransformBroadcaster | |
| TransformBroadcaster & | operator= (TransformBroadcaster &&other) |
| A convenience move assignment operator. | |
| void | sendTransform (const geometry_msgs::msg::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 | |
| void | sendTransform (const std::vector< geometry_msgs::msg::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 | |
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. The sendTransform() methods can be called from multiple threads at the same time.
| TransformBroadcaster & mrs_lib::TransformBroadcaster::operator= | ( | TransformBroadcaster && | other | ) |
A convenience move assignment operator.
This operator moves all data from the object that is being assigned from, invalidating it.
| other | the object to assign from. It will be invalid after this method returns. |
| void mrs_lib::TransformBroadcaster::sendTransform | ( | const geometry_msgs::msg::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
| transform | to be published |
| void mrs_lib::TransformBroadcaster::sendTransform | ( | const std::vector< geometry_msgs::msg::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
The transforms that pass the check are published together in a single tf message.
| transforms | vector of transforms to be published |