23 #include "pantilt_plugin.h" 25 #include "dirperc/dp_thread.h" 26 #include "robotis/rx28_thread.h" 27 #include "sensor_thread.h" 28 #include "sony/evid100p_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()) && (ignored_ptus.find(ptu) == ignored_ptus.end())) {
59 std::string ptu_prefix = ptus_prefix + ptu +
"/";
74 }
else if (type ==
"EviD100P") {
76 }
else if (type ==
"DirPercASCII") {
79 throw Exception(
"Unknown PTU type %s", type.c_str());
87 ignored_ptus.insert(ptu);
94 throw Exception(
"No synchronization peers configured, aborting");
99 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.
Configuration * config
Fawkes configuration.
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.