stereo_camera.h
Go to the documentation of this file.
1 
33 #ifndef STEREO_CAMERA_H
34 #define STEREO_CAMERA_H
35 
37 #include <avt_vimba_camera/AvtVimbaCameraConfig.h>
38 #include <avt_vimba_camera/AvtVimbaCameraStereoConfig.h>
40 
41 #include <ros/ros.h>
42 #include <sensor_msgs/Image.h>
43 #include <sensor_msgs/CameraInfo.h>
46 #include <dynamic_reconfigure/server.h>
47 #include <std_msgs/Float64.h>
48 
51 
52 #include <boost/bind.hpp>
53 #include <boost/thread/thread.hpp>
54 #include <boost/asio.hpp>
55 #include <boost/date_time/posix_time/posix_time.hpp>
56 
57 #include <string>
58 #include <boost/thread/mutex.hpp>
59 
60 using namespace boost;
61 
62 namespace avt_vimba_camera {
63 class StereoCamera {
64  public:
66  ~StereoCamera(void);
67  void run();
68 
69  private:
73 
78 
79  // Parameters
80  std::string left_ip_;
81  std::string right_ip_;
82  std::string left_guid_;
83  std::string right_guid_;
84  std::string left_camera_info_url_;
86 
87  // Node handles
92 
93  // Image transport
95 
96  // ROS Camera publisher
99 
100  // Publish camera temperatures
103 
106 
107  // Dynamic reconfigure
108  typedef avt_vimba_camera::AvtVimbaCameraConfig Config;
109  typedef avt_vimba_camera::AvtVimbaCameraStereoConfig StereoConfig;
110  typedef dynamic_reconfigure::Server<StereoConfig> ReconfigureServer;
111  ReconfigureServer reconfigure_server_;
112 
113  // Camera configuration
114  StereoConfig camera_config_;
115 
116  // Sync
117  std::vector<sensor_msgs::Image> r_imgs_buffer_;
118  std::vector<sensor_msgs::Image> l_imgs_buffer_;
123 
124  void leftFrameCallback(const FramePtr& vimba_frame_ptr);
125  void rightFrameCallback(const FramePtr& vimba_frame_ptr);
126  void syncCallback();
127  void configure(StereoConfig& newconfig, uint32_t level);
128  void updateCameraInfo(const StereoConfig& config);
129  void copyConfig(StereoConfig& sc, Config& lc, Config& rc);
130  void checkCallback();
131 };
132 }
133 #endif
diagnostic_updater::Updater updater_
Definition: stereo_camera.h:74
NetPointer< Frame, AVT::VmbAPINET::Frame > FramePtr
diagnostic_updater::TopicDiagnostic * pub_freq_
Definition: stereo_camera.h:75
boost::shared_ptr< camera_info_manager::CameraInfoManager > left_info_man_
ReconfigureServer reconfigure_server_
image_transport::ImageTransport it_
Definition: stereo_camera.h:94
std::vector< sensor_msgs::Image > r_imgs_buffer_
boost::shared_ptr< camera_info_manager::CameraInfoManager > right_info_man_
avt_vimba_camera::AvtVimbaCameraStereoConfig StereoConfig
std::vector< sensor_msgs::Image > l_imgs_buffer_
dynamic_reconfigure::Server< StereoConfig > ReconfigureServer
image_transport::CameraPublisher left_pub_
Definition: stereo_camera.h:97
avt_vimba_camera::AvtVimbaCameraConfig Config
image_transport::CameraPublisher right_pub_
Definition: stereo_camera.h:98
void run(ClassLoader *loader)
diagnostic_updater::FunctionDiagnosticTask * sync_check_
Definition: stereo_camera.h:76


avt_vimba_camera
Author(s): Miquel Massot , Allied Vision Technologies
autogenerated on Wed Jun 5 2019 22:22:40