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 <map>
29 #include <string>
30 
31 #ifdef HAVE_URG_GBX_9_11
32 namespace hokuyo_aist {
33 class HokuyoLaser;
34 class HokuyoData;
35 } // namespace hokuyo_aist
36 #else
37 namespace hokuyoaist {
38 class Sensor;
39 class ScanData;
40 } // namespace hokuyoaist
41 #endif
42 
44 {
45 public:
46  HokuyoUrgGbxAcquisitionThread(std::string &cfg_name, std::string &cfg_prefix);
47 
48  // from LaserAcquisitionThread
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 #endif
HokuyoUrgGbxAcquisitionThread::finalize
virtual void finalize()
Finalize the thread.
Definition: urg_gbx_aqt.cpp:168
LaserAcquisitionThread
Laser acqusition thread.
Definition: acquisition_thread.h:42
HokuyoUrgGbxAcquisitionThread::loop
virtual void loop()
Code to execute in the thread.
Definition: urg_gbx_aqt.cpp:184
fawkes::Configuration
Interface for configuration handling.
Definition: config.h:65
fawkes::LoggingAspect::logger
Logger * logger
This is the Logger member used to access the logger.
Definition: logging.h:41
fawkes::Logger
Interface for logging.
Definition: logger.h:42
fawkes::ConfigurableAspect::config
Configuration * config
This is the Configuration member used to access the configuration.
Definition: configurable.h:41
HokuyoUrgGbxAcquisitionThread
Laser acqusition thread for Hokuyo URG laser range finders.
Definition: urg_gbx_aqt.h:44
HokuyoUrgGbxAcquisitionThread::init
virtual void init()
Initialize the thread.
Definition: urg_gbx_aqt.cpp:80
HokuyoUrgGbxAcquisitionThread::HokuyoUrgGbxAcquisitionThread
HokuyoUrgGbxAcquisitionThread(std::string &cfg_name, std::string &cfg_prefix)
Constructor.
Definition: urg_gbx_aqt.cpp:58
HokuyoUrgGbxAcquisitionThread::pre_init
virtual void pre_init(fawkes::Configuration *config, fawkes::Logger *logger)
Pre initialization.
Definition: urg_gbx_aqt.cpp:69