Fawkes API
Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * urg_gbx_aqt.h - Thread for Hokuyo URG using the Gearbox library 00004 * 00005 * Created: Fri Dec 04 20:30:08 2009 (at Frankfurt Airport) 00006 * Copyright 2008-2009 Tim Niemueller [www.niemueller.de] 00007 * 00008 ****************************************************************************/ 00009 00010 /* This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU Library General Public License for more details. 00019 * 00020 * Read the full text in the LICENSE.GPL file in the doc directory. 00021 */ 00022 00023 #ifndef __PLUGINS_LASER_URG_GBX_AQT_H_ 00024 #define __PLUGINS_LASER_URG_GBX_AQT_H_ 00025 00026 #include "acquisition_thread.h" 00027 00028 #include <string> 00029 #include <map> 00030 00031 #ifdef HAVE_URG_GBX_9_11 00032 namespace hokuyo_aist { 00033 class HokuyoLaser; 00034 class HokuyoData; 00035 } 00036 #else 00037 namespace hokuyoaist { 00038 class Sensor; 00039 class ScanData; 00040 } 00041 #endif 00042 00043 class HokuyoUrgGbxAcquisitionThread : public LaserAcquisitionThread 00044 { 00045 public: 00046 HokuyoUrgGbxAcquisitionThread(std::string &cfg_name, std::string &cfg_prefix); 00047 00048 // from LaserAcquisitionThread 00049 virtual void pre_init(fawkes::Configuration *config, fawkes::Logger *logger); 00050 00051 virtual void init(); 00052 virtual void finalize(); 00053 virtual void loop(); 00054 00055 private: 00056 bool __pre_init_done; 00057 unsigned int __number_of_values; 00058 #ifdef HAVE_URG_GBX_9_11 00059 hokuyo_aist::HokuyoLaser *__laser; 00060 hokuyo_aist::HokuyoData *__data; 00061 #else 00062 hokuyoaist::Sensor *__laser; 00063 hokuyoaist::ScanData *__data; 00064 #endif 00065 00066 std::string __cfg_name; 00067 std::string __cfg_prefix; 00068 00069 std::map<std::string, std::string> __device_info; 00070 00071 std::string __cfg_device; 00072 00073 unsigned int __first_ray; 00074 unsigned int __last_ray; 00075 unsigned int __front_ray; 00076 unsigned int __front_idx; 00077 unsigned int __num_rays; 00078 unsigned int __slit_division; 00079 float __step_per_angle; 00080 float __angle_per_step; 00081 float __angular_range; 00082 }; 00083 00084 00085 #endif