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 <map>
29#include <string>
30
31namespace qrk {
32class UrgCtrl;
33}
34
35namespace fawkes {
36class TimeWait;
37}
38
40{
41public:
42 HokuyoUrgAcquisitionThread(std::string &cfg_name, std::string &cfg_prefix);
43
44 // from LaserAcquisitionThread
46
47 virtual void init();
48 virtual void finalize();
49 virtual void loop();
50
51private:
52 std::map<std::string, std::string> get_device_info(qrk::UrgCtrl *ctrl);
53
54private:
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#endif
Laser acqusition thread for Hokuyo URG laser range finders.
Definition: urg_aqt.h:40
HokuyoUrgAcquisitionThread(std::string &cfg_name, std::string &cfg_prefix)
Constructor.
Definition: urg_aqt.cpp:63
virtual void loop()
Code to execute in the thread.
Definition: urg_aqt.cpp:313
virtual void pre_init(fawkes::Configuration *config, fawkes::Logger *logger)
Pre initialization.
Definition: urg_aqt.cpp:74
virtual void init()
Initialize the thread.
Definition: urg_aqt.cpp:85
virtual void finalize()
Finalize the thread.
Definition: urg_aqt.cpp:297
Laser acqusition thread.
Configuration * config
This is the Configuration member used to access the configuration.
Definition: configurable.h:41
Interface for configuration handling.
Definition: config.h:68
Interface for logging.
Definition: logger.h:42
Logger * logger
This is the Logger member used to access the logger.
Definition: logging.h:41
Time wait utility.
Definition: wait.h:33
Fawkes library namespace.