00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00034 #ifndef _XB3_H_
00035 #define _XB3_H_
00036
00037
00038
00039
00040
00041 #include <ros/ros.h>
00042 #include <image_transport/image_transport.h>
00043 #include <cv_bridge/cv_bridge.h>
00044 #include <sensor_msgs/image_encodings.h>
00045 #include <opencv2/imgproc/imgproc.hpp>
00046 #include <opencv2/highgui/highgui.hpp>
00047 #include <sensor_msgs/image_encodings.h>
00048 #include <dynamic_reconfigure/server.h>
00049 #include <dynamic_reconfigure/SensorLevels.h>
00050 #include <driver_base/driver.h>
00051 #include <camera_info_manager/camera_info_manager.h>
00052 #include <tf/transform_broadcaster.h>
00053
00054
00055
00056
00057 #include <signal.h>
00058
00059
00060
00061 #include "pgr_registers.h"
00062 #include "pgr_stereocam.h"
00063
00064 #include <xb3/xb3Config.h>
00065 #define PFLN {printf("DEBUG PRINT FILE %s LINE %d\n",__FILE__,__LINE__);}
00066
00067
00068
00069 #ifdef _XB3_CPP_
00070
00074 struct tag_t_flags{
00075 char debug;
00076 }t_flags;
00077
00081 struct tag_t_buffers{
00082 unsigned int nBufferSize;
00083 unsigned char* pucRightRGB;
00084 unsigned char* pucLeftRGB;
00085 unsigned char* pucCenterRGB;
00086 unsigned char* pucGreenBuffer;
00087 unsigned char* pucRGBBuffer;
00088 unsigned char* pucDeInterlacedBuffer;
00089 }t_buffers;
00090
00094 struct tag_t_dc1394{
00095 PGRStereoCamera_t stereoCamera;
00096 unsigned int nThisCam;
00097 dc1394_t * d;
00098 dc1394camera_t* camera;
00099 }t_dc1394;
00100
00104 struct tag_t_imgs{
00105 cv::Mat left;
00106 cv::Mat center;
00107 cv::Mat right;
00108 cv::Mat left_640_480;
00109 cv::Mat right_640_480;
00110 cv::Mat center_640_480;
00111 }t_imgs;
00112
00116 struct tag_t_msgs{
00117 sensor_msgs::Image short_left;
00118 sensor_msgs::Image short_right;
00119 sensor_msgs::Image wide_left;
00120 sensor_msgs::Image wide_right;
00121
00122 sensor_msgs::CameraInfo short_left_info;
00123 sensor_msgs::CameraInfo short_right_info;
00124 sensor_msgs::CameraInfo wide_left_info;
00125 sensor_msgs::CameraInfo wide_right_info;
00126
00127 image_transport::CameraPublisher short_left_pub;
00128 image_transport::CameraPublisher short_right_pub;
00129 image_transport::CameraPublisher wide_left_pub;
00130 image_transport::CameraPublisher wide_right_pub;
00131
00132
00133 camera_info_manager::CameraInfoManager *short_left_info_manager;
00134 camera_info_manager::CameraInfoManager *short_right_info_manager;
00135 camera_info_manager::CameraInfoManager *wide_left_info_manager;
00136 camera_info_manager::CameraInfoManager *wide_right_info_manager;
00137
00138 std::string short_left_info_url;
00139 std::string short_right_info_url;
00140 std::string wide_left_info_url;
00141 std::string wide_right_info_url;
00142
00143 }t_msgs;
00144
00145
00146 #endif
00147
00148 #endif
00149