3 #ifndef ROBOWFLEX_IO_HANDLER_
4 #define ROBOWFLEX_IO_HANDLER_
8 #include <yaml-cpp/yaml.h>
10 #include <ros/node_handle.h>
55 nh_.setParam(key, value);
73 return nh_.getParam(key, value);
ROS parameter server handler to handle namespacing and automatic parameter deletion.
void setParam(const std::string &key, const T &value)
Sets a parameter on the parameter server.
const std::string & getName() const
Gets the name of the handler.
~Handler()
Destructor. Deletes all parameters created through this handler.
bool hasParam(const std::string &key) const
Checks if the parameter server has key.
Handler(Handler const &)=delete
std::vector< std::string > params_
Set parameter keys.
const ros::NodeHandle & getHandle() const
Gets the node handle.
void operator=(Handler const &)=delete
const std::string namespace_
Full namespace of handler.
ros::NodeHandle nh_
ROS node handle.
bool getParam(const std::string &key, T &value) const
Gets a parameter from the parameter server.
void loadYAMLtoROS(const YAML::Node &node, const std::string &prefix="")
Loads the contents of a YAML node to the parameter server under a prefix.
const std::string & getNamespace() const
Gets the namespace of the handler.
const std::string name_
Name of handler.
Handler(const std::string &name)
Constructor.
static const std::string UUID
UUID of handler.
T emplace_back(T... args)
Main namespace. Contains all library classes and functions.