Main Page
Namespaces
Classes
Files
File List
File Members
include
asr_recognizer_prediction_ism
param_helper.h
Go to the documentation of this file.
1
18
#include <
ros/ros.h
>
19
20
namespace
recognizer_prediction_ism
21
{
22
class
ParamHelper
{
23
public
:
24
ParamHelper
(std::string class_name,
ros::NodeHandle
nh) :
class_name_
(class_name),
nh_
(nh)
25
{}
26
27
template
<
typename
T>
28
void
getParam
(std::string param_name, T *variable, T default_value)
29
{
30
T
d
= default_value;
31
if
(!
nh_
.
getParam
(param_name, d))
32
ROS_WARN_STREAM
(
class_name_
<<
": "
<< param_name <<
" not set, using default!"
);
33
34
ROS_DEBUG_STREAM_NAMED
(
class_name_
,
class_name_
<<
" parameter: "
<< param_name <<
" = "
<< d);
35
*variable = d;
36
}
37
38
39
private
:
40
std::string
class_name_
;
41
ros::NodeHandle
nh_
;
42
};
43
template
<>
44
void
ParamHelper::getParam<unsigned int>(std::string param_name,
unsigned
int
*variable,
unsigned
int
default_value
);
45
}
d
d
ros::NodeHandle
ROS_DEBUG_STREAM_NAMED
#define ROS_DEBUG_STREAM_NAMED(name, args)
recognizer_prediction_ism::ParamHelper
Definition:
param_helper.h:22
default_value
def default_value(type)
recognizer_prediction_ism::ParamHelper::getParam
void getParam(std::string param_name, T *variable, T default_value)
Definition:
param_helper.h:28
recognizer_prediction_ism
Definition:
param_helper.h:20
recognizer_prediction_ism::ParamHelper::class_name_
std::string class_name_
Definition:
param_helper.h:40
ROS_WARN_STREAM
#define ROS_WARN_STREAM(args)
ros.h
recognizer_prediction_ism::ParamHelper::nh_
ros::NodeHandle nh_
Definition:
param_helper.h:41
ros::NodeHandle::getParam
bool getParam(const std::string &key, std::string &s) const
recognizer_prediction_ism::ParamHelper::ParamHelper
ParamHelper(std::string class_name, ros::NodeHandle nh)
Definition:
param_helper.h:24
asr_recognizer_prediction_ism
Author(s): Aumann Florian, Heller Florian, Hutmacher Robin, Meißner Pascal, Stöckle Patrick, Stroh Daniel
autogenerated on Wed Jan 8 2020 03:18:32