19 YARP_LOG_COMPONENT(Rangefinder2DTransformerParamsCOMPONENT,
"yarp.device.Rangefinder2DTransformer")
30 std::vector<std::string> params;
31 params.push_back(
"device_position_x");
32 params.push_back(
"device_position_y");
33 params.push_back(
"device_position_theta");
34 params.push_back(
"laser_frame_name");
35 params.push_back(
"robot_frame_name");
42 if (paramName ==
"device_position_x")
47 if (paramName ==
"device_position_y")
52 if (paramName ==
"device_position_theta")
57 if (paramName ==
"laser_frame_name")
62 if (paramName ==
"robot_frame_name")
68 yError() <<
"parameter '" << paramName <<
"' was not found";
87 if (config.
check(
"help"))
96 if (config.
check(
"device_position_x"))
103 yCInfo(Rangefinder2DTransformerParamsCOMPONENT) <<
"Parameter 'device_position_x' using DEFAULT value:" <<
m_device_position_x;
105 prop_check.
unput(
"device_position_x");
110 if (config.
check(
"device_position_y"))
117 yCInfo(Rangefinder2DTransformerParamsCOMPONENT) <<
"Parameter 'device_position_y' using DEFAULT value:" <<
m_device_position_y;
119 prop_check.
unput(
"device_position_y");
124 if (config.
check(
"device_position_theta"))
133 prop_check.
unput(
"device_position_theta");
138 if (config.
check(
"laser_frame_name"))
141 yCInfo(Rangefinder2DTransformerParamsCOMPONENT) <<
"Parameter 'laser_frame_name' using value:" <<
m_laser_frame_name;
145 yCInfo(Rangefinder2DTransformerParamsCOMPONENT) <<
"Parameter 'laser_frame_name' using DEFAULT value:" <<
m_laser_frame_name;
147 prop_check.
unput(
"laser_frame_name");
152 if (config.
check(
"robot_frame_name"))
155 yCInfo(Rangefinder2DTransformerParamsCOMPONENT) <<
"Parameter 'robot_frame_name' using value:" <<
m_robot_frame_name;
159 yCInfo(Rangefinder2DTransformerParamsCOMPONENT) <<
"Parameter 'robot_frame_name' using DEFAULT value:" <<
m_robot_frame_name;
161 prop_check.
unput(
"robot_frame_name");
196 doc = doc + std::string(
"\n=============================================\n");
197 doc = doc + std::string(
"This is the help for device: Rangefinder2DTransformer\n");
198 doc = doc + std::string(
"\n");
199 doc = doc + std::string(
"This is the list of the parameters accepted by the device:\n");
200 doc = doc + std::string(
"'device_position_x': X coordinate of the virtual lidar\n");
201 doc = doc + std::string(
"'device_position_y': Y coordinate of the virtual lidar\n");
202 doc = doc + std::string(
"'device_position_theta': Theta coordinate of the virtual lidar\n");
203 doc = doc + std::string(
"'laser_frame_name': If present, open a frameTranformClient to get the robot->laser transform\n");
204 doc = doc + std::string(
"'robot_frame_name': If present, open a frameTranformClient to get the robot->laser transform\n");
205 doc = doc + std::string(
"\n");
206 doc = doc + std::string(
"Here are some examples of invocation command with yarpdev, with all params:\n");
207 doc = doc +
" yarpdev --device rangefinder2DTransformer --device_position_x 0 --device_position_y 0 --device_position_theta 0 --laser_frame_name <optional_value> --robot_frame_name <optional_value>\n";
208 doc = doc + std::string(
"Using only mandatory params:\n");
209 doc = doc +
" yarpdev --device rangefinder2DTransformer\n";
210 doc = doc + std::string(
"=============================================\n\n");
return doc;
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,...)