23 #include "pantilt_plugin.h" 24 #include "robotis/rx28_thread.h" 25 #include "sony/evid100p_thread.h" 26 #include "dirperc/dp_thread.h" 27 #include "sensor_thread.h" 45 std::set<std::string> ptus;
46 std::set<std::string> ignored_ptus;
48 std::string prefix =
"/hardware/pantilt/";
49 std::string ptus_prefix = prefix +
"ptus/";
55 std::string ptu = std::string(i->
path()).substr(ptus_prefix.length());
56 ptu = ptu.substr(0, ptu.find(
"/"));
58 if ( (ptus.find(ptu) == ptus.end()) &&
59 (ignored_ptus.find(ptu) == ignored_ptus.end()) ) {
61 std::string ptu_prefix = ptus_prefix + ptu +
"/";
65 active = config->
get_bool((ptu_prefix +
"active").c_str());
70 std::string type = config->
get_string((ptu_prefix +
"type").c_str());
75 }
else if (type ==
"EviD100P") {
77 }
else if (type ==
"DirPercASCII") {
80 throw Exception(
"Unknown PTU type %s", type.c_str());
88 ignored_ptus.insert(ptu);
95 throw Exception(
"No synchronization peers configured, aborting");
102 PLUGIN_DESCRIPTION(
"Use pan/tilt units with Fawkes.")
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.
Plugin to drive pan/tilt units with Fawkes.
PanTilt act thread for PTUs from DirectedPerception employing the ASCII protocol. ...
PanTiltPlugin(fawkes::Configuration *config)
Constructor.
Base class for exceptions in Fawkes.
ThreadList thread_list
Thread list member.
PanTilt act thread for RX28 PTU.
void add_act_thread(PanTiltActThread *act_thread)
Add an act thread.
virtual const char * path() const =0
Path of value.
void push_back(Thread *thread)
Add thread to the end.
Iterator interface to iterate over config values.
Interface for configuration handling.
PanTilt act thread for the PTU part of the Sony EviD100P camera.
virtual std::string get_string(const char *path)=0
Get value from configuration which is of type string.