mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
transform_broadcaster.h
1 #ifndef TRANSFORM_BROADCASTER_H
2 #define TRANSFORM_BROADCASTER_H
3 
4 #include <tf2_ros/transform_broadcaster.h>
5 
6 namespace mrs_lib
7 {
8 
9 /* TransformBroadcaster //{ */
10 
18 
19 public:
24 
30  void sendTransform(const geometry_msgs::TransformStamped &transform);
31 
37  void sendTransform(const std::vector<geometry_msgs::TransformStamped> &transforms);
38 
39 private:
43  tf2_ros::TransformBroadcaster broadcaster_;
44 
51  std::map<std::string, ros::Time> last_messages_;
52 };
53 //}
54 
55 } // namespace mrs_lib
56 
57 #endif // TRANSFORM_BROADCASTER_H
mrs_lib::TransformBroadcaster::sendTransform
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...
Definition: transform_broadcaster.cpp:13
mrs_lib::TransformBroadcaster
Wrapper for the tf2_ros::TransformBroadcaster. With each sendTransform() command, the message is chec...
Definition: transform_broadcaster.h:17
mrs_lib
All mrs_lib functions, classes, variables and definitions are contained in this namespace.
Definition: attitude_converter.h:29
mrs_lib::TransformBroadcaster::TransformBroadcaster
TransformBroadcaster()
constructor, internally starts the TransformBroadcaster
Definition: transform_broadcaster.cpp:7