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
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #include "../include/DTL_ROS.h"
00039
00041
00043
00044 int main(int argc, char** argv)
00045 {
00046 ros::init(argc, argv, "iav_depthimage_to_laserscan");
00047 ros::NodeHandle n;
00048
00049 iav_depthimage_to_laserscan::CParam CParam1;
00050 iav_depthimage_to_laserscan::CParam CParam2;
00051 iav_depthimage_to_laserscan::LSParam laser_param;
00052
00053 double height_max;
00054 double height_min;
00055
00056 n.param<double>("height_max", height_max, 0.20);
00057 n.param<double>("height_min", height_min, -0.65);
00058
00059 n.param<double>("cam_1_AOV_h", CParam1.cam_AOV_h, 1.01229097);
00060 n.param<double>("cam_1_AOV_v", CParam1.cam_AOV_v, 0.785398163);
00061 n.param<double>("cam_1_yaw", CParam1.cam_yaw, 0.0);
00062 n.param<double>("cam_1_pitch", CParam1.cam_pitch, 0.0);
00063 n.param<double>("cam_1_offset", CParam1.cam_offset, 0.0);
00064 n.param<int>("cam_1_image_width", CParam1.cam_image_width, 640);
00065 n.param<int>("cam_1_image_height", CParam1.cam_image_height, 480);
00066 n.param<double>("cam_1_focal_length_x", CParam1.cam_focal_length_x, 570);
00067 n.param<double>("cam_1_focal_length_y", CParam1.cam_focal_length_y, 570);
00068 n.param<std::string>("cam_1_frame_id", CParam1.cam_frame_id, "camera389_link");
00069
00070 n.param<double>("cam_2_AOV_h", CParam2.cam_AOV_h, 1.01229097);
00071 n.param<double>("cam_2_AOV_v", CParam2.cam_AOV_v, 0.785398163);
00072 n.param<double>("cam_2_yaw", CParam2.cam_yaw, 1.009744261);
00073 n.param<double>("cam_2_pitch", CParam2.cam_pitch, 0.0);
00074 n.param<double>("cam_2_offset", CParam2.cam_offset, 0.0);
00075 n.param<int>("cam_2_image_width", CParam2.cam_image_width, 640);
00076 n.param<int>("cam_2_image_height", CParam2.cam_image_height, 480);
00077 n.param<double>("cam_2_focal_length_x", CParam2.cam_focal_length_x, 570);
00078 n.param<double>("cam_2_focal_length_y", CParam2.cam_focal_length_y, 570);
00079 n.param<std::string>("cam_2_frame_id", CParam2.cam_frame_id, "camera568_link");
00080
00081 n.param<double>("laser_max_range", laser_param.laser_max_range, 5);
00082 n.param<double>("laser_min_range", laser_param.laser_min_range, 0.5);
00083 n.param<double>("laser_max_angle", laser_param.laser_max_angle, 3.14);
00084 n.param<double>("laser_min_angle", laser_param.laser_min_angle, -3.14);
00085 n.param<int>("laser_rays", laser_param.laser_rays, 640);
00086 n.param<std::string>("laser_output_frame_id", laser_param.laser_output_frame_id, "laser_link");
00087
00088
00089 CParam1.createTF(laser_param.laser_output_frame_id, CParam1.cam_frame_id);
00090 CParam2.createTF(laser_param.laser_output_frame_id, CParam2.cam_frame_id);
00091
00092
00093 CParam1.init_parameter(CParam1, laser_param, height_max, height_min);
00094 CParam2.init_parameter(CParam2, laser_param, height_max, height_min);
00095
00096 iav_depthimage_to_laserscan::DTL_ROS dtl(n, CParam1, CParam2, laser_param);
00097
00098 ros::spin();
00099
00100 return 0;
00101 }