Fawkes API  Fawkes Development Version
urg_aqt.h
1 
2 /***************************************************************************
3  * urg_aqt.h - Thread to retrieve laser data from Hokuyo URG
4  *
5  * Created: Sat Nov 28 01:29:48 2009
6  * Copyright 2008-2011 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_AQT_H_
24 #define __PLUGINS_LASER_URG_AQT_H_
25 
26 #include "acquisition_thread.h"
27 
28 #include <string>
29 #include <map>
30 
31 namespace qrk {
32  class UrgCtrl;
33 }
34 
35 namespace fawkes {
36  class TimeWait;
37 }
38 
40 {
41  public:
42  HokuyoUrgAcquisitionThread(std::string &cfg_name, std::string &cfg_prefix);
43 
44  // from LaserAcquisitionThread
45  virtual void pre_init(fawkes::Configuration *config, fawkes::Logger *logger);
46 
47  virtual void init();
48  virtual void finalize();
49  virtual void loop();
50 
51  private:
52  std::map<std::string, std::string> get_device_info(qrk::UrgCtrl *ctrl);
53 
54  private:
55  bool __pre_init_done;
56  unsigned int __number_of_values;
57  qrk::UrgCtrl *__ctrl;
58  int __fd;
59 
60  fawkes::TimeWait *__timer;
61 
62  std::string __cfg_name;
63  std::string __cfg_prefix;
64 
65  std::map<std::string, std::string> __device_info;
66 
67  std::string __cfg_device;
68  std::string __cfg_serial;
69  float __cfg_time_offset;
70 
71  unsigned int __first_ray;
72  unsigned int __last_ray;
73  unsigned int __front_ray;
74  unsigned int __slit_division;
75  float __step_per_angle;
76  float __angle_per_step;
77  float __angular_range;
78  long int __scan_msec;
79 };
80 
81 
82 #endif
Laser acqusition thread.
Fawkes library namespace.
Laser acqusition thread for Hokuyo URG laser range finders.
Definition: urg_aqt.h:39
Definition: urg_aqt.h:31
Interface for configuration handling.
Definition: config.h:67
Time wait utility.
Definition: wait.h:32
Interface for logging.
Definition: logger.h:34