22#include "act_thread.h"
23#include "driver_thread.h"
24#include "sensor_thread.h"
26#include <core/plugin.h>
46 std::set<std::string> configs;
47 std::set<std::string> ignored_configs;
49 std::string prefix =
"/dynamixel/";
52#if __cplusplus >= 201103L
53 std::unique_ptr<Configuration::ValueIterator> i(
config->
search(prefix.c_str()));
55 std::auto_ptr<Configuration::ValueIterator> i(
config->
search(prefix.c_str()));
58 std::string cfg_name = std::string(i->path()).substr(prefix.length());
59 cfg_name = cfg_name.substr(0, cfg_name.find(
"/"));
61 if ((configs.find(cfg_name) == configs.end())
62 && (ignored_configs.find(cfg_name) == ignored_configs.end())) {
63 std::string cfg_prefix = prefix + cfg_name +
"/";
77 configs.insert(cfg_name);
80 ignored_configs.insert(cfg_name);
96 throw Exception(
"No active servo configs, aborting");
104PLUGIN_DESCRIPTION(
"Robotis Dynamixel servo driver plugin")
Robotis dynamixel servo act thread.
void add_driver_thread(DynamixelDriverThread *drv_thread)
Add a driver thread to wake in ACT hook.
Driver thread for Robotis dynamixel servos.
Driver plugin for Robotis dynamixel servos.
DynamixelPlugin(Configuration *config)
Constructor.
Robotis dynamixel servo sensor thread.
void add_driver_thread(DynamixelDriverThread *drv_thread)
Add a driver thread to wake in SENSOR_ACQUIRE hook.
Interface for configuration handling.
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.
Base class for exceptions in Fawkes.
ThreadList thread_list
Thread list member.
Configuration * config
Fawkes configuration.
void push_back(Thread *thread)
Add thread to the end.
Fawkes library namespace.