22 #ifndef _PLUGINS_ROS_TF_THREAD_H_
23 #define _PLUGINS_ROS_TF_THREAD_H_
25 #include <aspect/blackboard.h>
26 #include <aspect/blocked_timing.h>
27 #include <aspect/clock.h>
28 #include <aspect/configurable.h>
29 #include <aspect/logging.h>
30 #include <aspect/tf.h>
31 #include <blackboard/interface_listener.h>
32 #include <blackboard/interface_observer.h>
33 #include <core/threading/mutex.h>
34 #include <core/threading/thread.h>
35 #include <interfaces/TransformInterface.h>
36 #include <plugins/ros/aspect/ros.h>
42 #include <ros/common.h>
43 #include <ros/node_handle.h>
44 #include <tf/tfMessage.h>
46 # include <tf2_msgs/TFMessage.h>
74 unsigned int instance_serial)
throw();
76 unsigned int instance_serial)
throw();
79 void tf_message_cb(
const ros::MessageEvent<::tf::tfMessage const> &msg_evt);
81 void tf_message_cb_dynamic(
const ros::MessageEvent<tf2_msgs::TFMessage const> &msg_evt);
82 void tf_message_cb_static(
const ros::MessageEvent<tf2_msgs::TFMessage const> &msg_evt);
83 void tf_message_cb(
const ros::MessageEvent<tf2_msgs::TFMessage const> &msg_evt,
bool static_tf);
87 void publish_static_transforms_to_ros();
88 void publish_transform_to_fawkes(
const geometry_msgs::TransformStamped &ts,
89 bool static_tf =
false);
103 float cfg_update_interval_;
105 std::list<std::string> ros_frames_;
106 std::list<fawkes::TransformInterface *> tfifs_;
108 ros::Subscriber sub_tf_;
109 ros::Subscriber sub_static_tf_;
110 ros::Publisher pub_tf_;
111 ros::Publisher pub_static_tf_;
114 unsigned int active_queue_;
115 std::queue<::tf::tfMessage::ConstPtr> tf_msg_queues_[2];
117 std::queue<std::pair<bool, tf2_msgs::TFMessage::ConstPtr>> tf2_msg_queues_[2];
121 unsigned int seq_num_;