22 #ifndef _PLUGINS_PERCEPTION_BUMBLEBEE2_BUMBLEBEE2_THREAD_H_
23 #define _PLUGINS_PERCEPTION_BUMBLEBEE2_BUMBLEBEE2_THREAD_H_
26 #include <aspect/blackboard.h>
27 #include <aspect/blocked_timing.h>
28 #include <aspect/clock.h>
29 #include <aspect/configurable.h>
30 #include <aspect/logging.h>
31 #include <aspect/pointcloud.h>
32 #include <aspect/tf.h>
33 #include <core/threading/thread.h>
34 #include <pcl/point_cloud.h>
35 #include <pcl/point_types.h>
38 class SwitchInterface;
39 class OpenCVStereoParamsInterface;
41 #ifdef USE_TIMETRACKER
46 namespace firevision {
47 class Bumblebee2Camera;
48 class SharedMemoryImageBuffer;
56 class TriclopsColorImage;
76 void get_triclops_context_from_camera();
77 void deinterlace_green(
unsigned char *src,
81 void fill_xyz_xyzrgb(
const short int * dispdata,
82 const TriclopsColorImage * img_right_rect_color,
85 void fill_xyzrgb(
const short int * dispdata,
86 const TriclopsColorImage * img_rect_color,
99 typedef enum { STEREO_MATCHER_TRICLOPS, STEREO_MATCHER_OPENCV } StereoMatcher;
101 typedef enum { OPENCV_STEREO_BM, OPENCV_STEREO_SGBM } OpenCVStereoAlgorithm;
110 TriclopsData * triclops_;
113 unsigned int height_;
119 unsigned char *buffer_green_;
120 unsigned char *buffer_rgb_;
121 unsigned char *buffer_rgb_left_;
122 unsigned char *buffer_rgb_right_;
123 unsigned char *buffer_yuv_left_;
124 unsigned char *buffer_yuv_right_;
125 unsigned char *buffer_rgb_planar_left_;
126 unsigned char *buffer_rgb_planar_right_;
140 std::string cfg_base_frame_;
141 std::string cfg_frames_prefix_;
142 float cfg_frames_interval_;
143 StereoMatcher cfg_stereo_matcher_;
146 OpenCVStereoAlgorithm cfg_opencv_stereo_algorithm_;
147 int cfg_bm_pre_filter_type_;
148 unsigned int cfg_bm_pre_filter_size_;
149 unsigned int cfg_bm_pre_filter_cap_;
150 unsigned int cfg_bm_sad_window_size_;
151 int cfg_bm_min_disparity_;
152 unsigned int cfg_bm_num_disparities_;
153 unsigned int cfg_bm_texture_threshold_;
154 unsigned int cfg_bm_uniqueness_ratio_;
155 unsigned int cfg_bm_speckle_window_size_;
156 unsigned int cfg_bm_speckle_range_;
157 bool cfg_bm_try_smaller_windows_;
159 bool cfg_sgbm_p1_auto_;
160 bool cfg_sgbm_p2_auto_;
163 int cfg_sgbm_disp_12_max_diff_;
165 float disparity_scale_factor_;
167 cv::Mat *cv_disparity_;
173 #ifdef USE_TIMETRACKER
175 unsigned int tt_loopcount_;
176 unsigned int ttc_full_loop_;
177 unsigned int ttc_transforms_;
178 unsigned int ttc_msgproc_;
179 unsigned int ttc_capture_;
180 unsigned int ttc_preprocess_;
181 unsigned int ttc_rectify_;
182 unsigned int ttc_stereo_match_;
183 unsigned int ttc_pcl_xyzrgb_;
184 unsigned int ttc_pcl_xyz_;
Thread to acquire data from Bumblebee2 stereo camera.
virtual void run()
Stub to see name in backtrace for easier debugging.
virtual void loop()
Code to execute in the thread.
virtual void init()
Initialize the thread.
virtual void finalize()
Finalize the thread.
Bumblebee2Thread()
Constructor.
virtual ~Bumblebee2Thread()
Destructor.
Thread aspect to access to BlackBoard.
Thread aspect to use blocked timing.
Thread aspect that allows to obtain the current time from the clock.
Thread aspect to access configuration data.
Thread aspect to log output.
OpenCVStereoParamsInterface Fawkes BlackBoard Interface.
Thread aspect to provide and access point clouds.
RefPtr<> is a reference-counting shared smartpointer.
SwitchInterface Fawkes BlackBoard Interface.
Thread class encapsulation of pthreads.
A class for handling time.
Shared memory image buffer.
Fawkes library namespace.