30 std::vector<std::string> params;
31 params.push_back(
"name");
32 params.push_back(
"getmap");
33 params.push_back(
"getmapbyname");
34 params.push_back(
"roscmdparser");
35 params.push_back(
"markers_pub");
36 params.push_back(
"node_name");
37 params.push_back(
"namespace");
44 if (paramName ==
"name")
49 if (paramName ==
"getmap")
54 if (paramName ==
"getmapbyname")
59 if (paramName ==
"roscmdparser")
64 if (paramName ==
"markers_pub")
69 if (paramName ==
"node_name")
74 if (paramName ==
"namespace")
80 yError() <<
"parameter '" << paramName <<
"' was not found";
99 if (config.
check(
"help"))
108 if (config.
check(
"name"))
111 yCInfo(Map2D_nws_ros2ParamsCOMPONENT) <<
"Parameter 'name' using value:" <<
m_name;
115 yCInfo(Map2D_nws_ros2ParamsCOMPONENT) <<
"Parameter 'name' using DEFAULT value:" <<
m_name;
117 prop_check.
unput(
"name");
122 if (config.
check(
"getmap"))
125 yCInfo(Map2D_nws_ros2ParamsCOMPONENT) <<
"Parameter 'getmap' using value:" <<
m_getmap;
129 yCInfo(Map2D_nws_ros2ParamsCOMPONENT) <<
"Parameter 'getmap' using DEFAULT value:" <<
m_getmap;
131 prop_check.
unput(
"getmap");
136 if (config.
check(
"getmapbyname"))
139 yCInfo(Map2D_nws_ros2ParamsCOMPONENT) <<
"Parameter 'getmapbyname' using value:" <<
m_getmapbyname;
143 yCInfo(Map2D_nws_ros2ParamsCOMPONENT) <<
"Parameter 'getmapbyname' using DEFAULT value:" <<
m_getmapbyname;
145 prop_check.
unput(
"getmapbyname");
150 if (config.
check(
"roscmdparser"))
153 yCInfo(Map2D_nws_ros2ParamsCOMPONENT) <<
"Parameter 'roscmdparser' using value:" <<
m_roscmdparser;
157 yCInfo(Map2D_nws_ros2ParamsCOMPONENT) <<
"Parameter 'roscmdparser' using DEFAULT value:" <<
m_roscmdparser;
159 prop_check.
unput(
"roscmdparser");
164 if (config.
check(
"markers_pub"))
167 yCInfo(Map2D_nws_ros2ParamsCOMPONENT) <<
"Parameter 'markers_pub' using value:" <<
m_markers_pub;
171 yCInfo(Map2D_nws_ros2ParamsCOMPONENT) <<
"Parameter 'markers_pub' using DEFAULT value:" <<
m_markers_pub;
173 prop_check.
unput(
"markers_pub");
178 if (config.
check(
"node_name"))
181 yCInfo(Map2D_nws_ros2ParamsCOMPONENT) <<
"Parameter 'node_name' using value:" <<
m_node_name;
185 yCInfo(Map2D_nws_ros2ParamsCOMPONENT) <<
"Parameter 'node_name' using DEFAULT value:" <<
m_node_name;
187 prop_check.
unput(
"node_name");
192 if (config.
check(
"namespace"))
195 yCInfo(Map2D_nws_ros2ParamsCOMPONENT) <<
"Parameter 'namespace' using value:" <<
m_namespace;
199 yCInfo(Map2D_nws_ros2ParamsCOMPONENT) <<
"Parameter 'namespace' using DEFAULT value:" <<
m_namespace;
201 prop_check.
unput(
"namespace");
236 doc = doc + std::string(
"\n=============================================\n");
237 doc = doc + std::string(
"This is the help for device: Map2D_nws_ros2\n");
238 doc = doc + std::string(
"\n");
239 doc = doc + std::string(
"This is the list of the parameters accepted by the device:\n");
240 doc = doc + std::string(
"'name': Device name prefix\n");
241 doc = doc + std::string(
"'getmap': The \"GetMap\" ROS service name\n");
242 doc = doc + std::string(
"'getmapbyname': The \"GetMapByName\" ROS2 custom service name\n");
243 doc = doc + std::string(
"'roscmdparser': The \"BasicTypes\" ROS service name\n");
244 doc = doc + std::string(
"'markers_pub': The visual markers array publisher name\n");
245 doc = doc + std::string(
"'node_name': The ROS2 node name. If absent, the device name will be used\n");
246 doc = doc + std::string(
"'namespace': optional namespace for ros2 node\n");
247 doc = doc + std::string(
"\n");
248 doc = doc + std::string(
"Here are some examples of invocation command with yarpdev, with all params:\n");
249 doc = doc +
" yarpdev --device map2D_nws_ros2 --name map2D_nws_ros2 --getmap getMap --getmapbyname getMapByName --roscmdparser rosCmdParser --markers_pub locationServerMarkers --node_name map2D_nws_ros2 --namespace <optional_value>\n";
250 doc = doc + std::string(
"Using only mandatory params:\n");
251 doc = doc +
" yarpdev --device map2D_nws_ros2\n";
252 doc = doc + std::string(
"=============================================\n\n");
return doc;
std::vector< std::string > getListOfParams() const override
Return a list of all params used by the device.
Map2D_nws_ros2_ParamsParser()
std::string m_roscmdparser
std::string getConfiguration() const override
Return the configuration of the device.
std::string m_markers_pub
std::string getDocumentationOfDeviceParams() const override
Get the documentation of the DeviceDriver's parameters.
std::string m_getmapbyname
bool getParamValue(const std::string ¶mName, std::string ¶mValue) const override
Return the value (represented as a string) of the requested parameter.
std::string m_provided_configuration
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
A class for storing options and configuration information.
void unput(const std::string &key)
Remove the association from the given key to a value, if present.
A base class for nested structures that can be searched.
virtual bool check(const std::string &key) const =0
Check if there exists a property of the given name.
virtual std::string toString() const =0
Return a standard text representation of the content of the object.
virtual Value & find(const std::string &key) const =0
Gets a value corresponding to a given keyword.
#define yCInfo(component,...)
#define YARP_LOG_COMPONENT(name,...)