Fawkes API  Fawkes Development Version
urg_gbx_aqt.h
1 
2 /***************************************************************************
3  * urg_gbx_aqt.h - Thread for Hokuyo URG using the Gearbox library
4  *
5  * Created: Fri Dec 04 20:30:08 2009 (at Frankfurt Airport)
6  * Copyright 2008-2009 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL file in the doc directory.
21  */
22 
23 #ifndef __PLUGINS_LASER_URG_GBX_AQT_H_
24 #define __PLUGINS_LASER_URG_GBX_AQT_H_
25 
26 #include "acquisition_thread.h"
27 
28 #include <string>
29 #include <map>
30 
31 #ifdef HAVE_URG_GBX_9_11
32 namespace hokuyo_aist {
33  class HokuyoLaser;
34  class HokuyoData;
35 }
36 #else
37 namespace hokuyoaist {
38  class Sensor;
39  class ScanData;
40 }
41 #endif
42 
44 {
45  public:
46  HokuyoUrgGbxAcquisitionThread(std::string &cfg_name, std::string &cfg_prefix);
47 
48  // from LaserAcquisitionThread
49  virtual void pre_init(fawkes::Configuration *config, fawkes::Logger *logger);
50 
51  virtual void init();
52  virtual void finalize();
53  virtual void loop();
54 
55  private:
56  bool __pre_init_done;
57  unsigned int __number_of_values;
58 #ifdef HAVE_URG_GBX_9_11
59  hokuyo_aist::HokuyoLaser *__laser;
60  hokuyo_aist::HokuyoData *__data;
61 #else
62  hokuyoaist::Sensor *__laser;
63  hokuyoaist::ScanData *__data;
64 #endif
65 
66  std::string __cfg_name;
67  std::string __cfg_prefix;
68 
69  std::map<std::string, std::string> __device_info;
70 
71  std::string __cfg_device;
72 
73  unsigned int __first_ray;
74  unsigned int __last_ray;
75  unsigned int __front_ray;
76  unsigned int __front_idx;
77  unsigned int __num_rays;
78  unsigned int __slit_division;
79  float __step_per_angle;
80  float __angle_per_step;
81  float __angular_range;
82 };
83 
84 
85 #endif
Laser acqusition thread.
Laser acqusition thread for Hokuyo URG laser range finders.
Definition: urg_gbx_aqt.h:43
Interface for configuration handling.
Definition: config.h:67
Interface for logging.
Definition: logger.h:34