tfvisualizer.h
Go to the documentation of this file.
1 
18 #ifndef TFVISUALIZER_H
19 #define TFVISUALIZER_H
20 #include <QThread>
21 
22 #ifndef Q_MOC_RUN
23 #include <ros/ros.h>
24 #include <ros/init.h>
25 #include <boost/shared_ptr.hpp>
26 #include <opencv/cv.h>
27 #include <sensor_msgs/Image.h>
28 #include <sensor_msgs/image_encodings.h>
29 #include <sensor_msgs/CameraInfo.h>
30 #include <tf/transform_broadcaster.h>
31 #include <image_transport/image_transport.h>
32 #include <image_geometry/pinhole_camera_model.h>
33 #include <tf/transform_listener.h>
34 #endif
35 
36 
37 class TF_Visualizer : public QThread
38 {
39  Q_OBJECT
40 public:
41  explicit TF_Visualizer(const std::vector<std::string>& frame_ids, std::string camera_input_topic, std::string camera_output_topic);
42  void imageCb(const sensor_msgs::ImageConstPtr& image_msg, const sensor_msgs::CameraInfoConstPtr& info_msg);
43 
44  void stop();
45 protected:
46 
48  image_transport::ImageTransport it_;
49  image_transport::CameraSubscriber sub_;
50  image_transport::Publisher pub_;
51  tf::TransformListener tf_listener_;
52  image_geometry::PinholeCameraModel cam_model_;
53  std::vector<std::string> frame_ids_;
54  std::string camera_input_topic_;
55  std::string camera_output_topic_;
56  CvFont font_;
57 
58  void run();
59 };
60 
61 
62 #endif // TFVISUALIZER_H
image_transport::Publisher pub_
Definition: tfvisualizer.h:50
std::vector< std::string > frame_ids_
Definition: tfvisualizer.h:53
image_geometry::PinholeCameraModel cam_model_
Definition: tfvisualizer.h:52
void imageCb(const sensor_msgs::ImageConstPtr &image_msg, const sensor_msgs::CameraInfoConstPtr &info_msg)
std::string camera_input_topic_
Definition: tfvisualizer.h:54
image_transport::ImageTransport it_
Definition: tfvisualizer.h:48
tf::TransformListener tf_listener_
Definition: tfvisualizer.h:51
std::string camera_output_topic_
Definition: tfvisualizer.h:55
ros::NodeHandle nh_
Definition: tfvisualizer.h:47
image_transport::CameraSubscriber sub_
Definition: tfvisualizer.h:49
TF_Visualizer(const std::vector< std::string > &frame_ids, std::string camera_input_topic, std::string camera_output_topic)


asr_mild_calibration_tool
Author(s): Aumann Florian, Heller Florian, Meißner Pascal
autogenerated on Mon Dec 2 2019 03:11:43