Fawkes API
Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * urg_aqt.h - Thread to retrieve laser data from Hokuyo URG 00004 * 00005 * Created: Sat Nov 28 01:29:48 2009 00006 * Copyright 2008-2011 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_AQT_H_ 00024 #define __PLUGINS_LASER_URG_AQT_H_ 00025 00026 #include "acquisition_thread.h" 00027 00028 #include <string> 00029 #include <map> 00030 00031 namespace qrk { 00032 class UrgCtrl; 00033 } 00034 00035 namespace fawkes { 00036 class TimeWait; 00037 } 00038 00039 class HokuyoUrgAcquisitionThread : public LaserAcquisitionThread 00040 { 00041 public: 00042 HokuyoUrgAcquisitionThread(std::string &cfg_name, std::string &cfg_prefix); 00043 00044 // from LaserAcquisitionThread 00045 virtual void pre_init(fawkes::Configuration *config, fawkes::Logger *logger); 00046 00047 virtual void init(); 00048 virtual void finalize(); 00049 virtual void loop(); 00050 00051 private: 00052 std::map<std::string, std::string> get_device_info(qrk::UrgCtrl *ctrl); 00053 00054 private: 00055 bool __pre_init_done; 00056 unsigned int __number_of_values; 00057 qrk::UrgCtrl *__ctrl; 00058 int __fd; 00059 00060 fawkes::TimeWait *__timer; 00061 00062 std::string __cfg_name; 00063 std::string __cfg_prefix; 00064 00065 std::map<std::string, std::string> __device_info; 00066 00067 std::string __cfg_device; 00068 std::string __cfg_serial; 00069 00070 unsigned int __first_ray; 00071 unsigned int __last_ray; 00072 unsigned int __front_ray; 00073 unsigned int __slit_division; 00074 float __step_per_angle; 00075 float __angle_per_step; 00076 float __angular_range; 00077 unsigned int __offset; 00078 }; 00079 00080 00081 #endif