23 #include <plugins/laser/laser_plugin.h>
25 #include "sensor_thread.h"
27 # include "lase_edl_aqt.h"
33 # include "urg_gbx_aqt.h"
54 std::set<std::string> configs;
55 std::set<std::string> ignored_configs;
57 std::string prefix =
"/hardware/laser/";
59 std::auto_ptr<Configuration::ValueIterator> i(config->
search(prefix.c_str()));
61 std::string cfg_name = std::string(i->
path()).substr(prefix.length());
62 cfg_name = cfg_name.substr(0, cfg_name.find(
"/"));
64 if ( (configs.find(cfg_name) == configs.end()) &&
65 (ignored_configs.find(cfg_name) == ignored_configs.end()) ) {
67 std::string cfg_prefix = prefix + cfg_name +
"/";
71 active = config->
get_bool((cfg_prefix +
"active").c_str());
77 std::string type = config->
get_string((cfg_prefix +
"type").c_str());
82 if ( type ==
"urg" ) {
88 if ( type ==
"lase_edl" ) {
94 if ( type ==
"urg_gbx" ) {
100 throw Exception(
"Unknown lasertype '%s' for config %s",
101 type.c_str(), cfg_name.c_str());
107 configs.insert(cfg_name);
110 ignored_configs.insert(cfg_name);
123 throw Exception(
"No laser devices configured, aborting");
129 PLUGIN_DESCRIPTION(
"Hardware driver for laser range finders")
Laser acqusition thread for Lase EDL L A laser scanner.
LaserPlugin(fawkes::Configuration *config)
Constructor.
Fawkes library namespace.
virtual bool get_bool(const char *path)=0
Get value from configuration which is of type bool.
virtual ValueIterator * search(const char *path)=0
Iterator with search results.
virtual bool next()=0
Check if there is another element and advance to this if possible.
virtual const char * path() const =0
Path of value.
Laser acqusition thread for Hokuyo URG laser range finders.
Base class for exceptions in Fawkes.
ThreadList thread_list
Thread list member.
void push_back(Thread *thread)
Add thread to the end.
Laser acqusition thread for Hokuyo URG laser range finders.
Interface for configuration handling.
virtual std::string get_string(const char *path)=0
Get value from configuration which is of type string.