63 template<typename ResultType, typename ParamServerType = typename ::cras::DefaultParamServerType<ResultType>::type,
66 const ::cras::GetParamAdapter& param, const ::std::string& name,
67 const ::cras::optional<ResultType>& defaultValue = ResultType(),
68 const ::std::string& unit =
"",
69 const ::cras::GetParamOptions<ResultType, ParamServerType>& options = {})
const 91 template<typename ResultType, typename ParamServerType = typename ::cras::DefaultParamServerType<ResultType>::type,
92 ::cras::check_get_param_types<ResultType, ParamServerType>* =
nullptr>
94 const ::cras::GetParamAdapter& param, const ::std::string& name,
95 const ResultType& defaultValue = ResultType(),
96 const ::std::string& unit =
"",
97 const ::cras::GetParamOptions<ResultType, ParamServerType>& options = {})
const 120 template<typename ResultType, typename ParamServerType = typename ::cras::DefaultParamServerType<ResultType>::type,
121 ::cras::check_get_param_types<ResultType, ParamServerType>* =
nullptr>
123 const ::cras::GetParamAdapter& param, const ::std::string& name,
124 const ::cras::optional<ResultType>& defaultValue = ResultType(),
125 const ::std::string& unit =
"",
126 const ::cras::GetParamOptions<ResultType, ParamServerType>& options = {})
const 148 template<typename ResultType, typename ParamServerType = typename ::cras::DefaultParamServerType<ResultType>::type,
149 ::cras::check_get_param_types<ResultType, ParamServerType>* =
nullptr>
151 const ::cras::GetParamAdapter& param, const ::std::string& name,
152 const ResultType& defaultValue = ResultType(),
153 const ::std::string& unit =
"",
154 const ::cras::GetParamOptions<ResultType, ParamServerType>& options = {})
const 176 const ::cras::GetParamAdapter& param, const ::std::string& name,
177 const ::cras::optional<const char *>& defaultValue, const ::std::string& unit =
"",
178 const ::cras::GetParamOptions<::std::string>& options = {})
const 197 const ::cras::GetParamAdapter& param, const ::std::string &name,
198 const char* defaultValue, const ::std::string &unit =
"",
199 const ::cras::GetParamOptions<::std::string>& options = {})
const 219 const ::cras::GetParamAdapter& param, const ::std::string &name,
220 const ::cras::optional<const char *>& defaultValue, const ::std::string &unit =
"",
221 const ::cras::GetParamOptions<::std::string>& options = {})
const 240 const ::cras::GetParamAdapter& param, const ::std::string &name,
241 const char* defaultValue, const ::std::string &unit =
"",
242 const ::cras::GetParamOptions<::std::string>& options = {})
const inline ::std::string getParam(const ::cras::GetParamAdapter ¶m, const ::std::string &name, const char *defaultValue, const ::std::string &unit="", const ::cras::GetParamOptions<::std::string > &options={}) const
Get the value of the given ROS parameter, falling back to the specified default value, and print out a ROS log message with the loaded values (if specified).
inline ::cras::GetParamResult<::std::string > getParamVerbose(const ::cras::GetParamAdapter ¶m, const ::std::string &name, const ::cras::optional< const char *> &defaultValue, const ::std::string &unit="", const ::cras::GetParamOptions<::std::string > &options={}) const
Get the value of the given ROS parameter, falling back to the specified default value (if not nullopt...
typename std::enable_if_t< !::cras::is_optional< ResultType >::value &&!::cras::is_c_string< ResultType >::value &&!::cras::is_c_string< ParamServerType >::value > check_get_param_types
This type is a TrueType if the combination of ResultType and ParamServerType is valid.
inline ::cras::GetParamResult<::std::string > getParamVerbose(const ::cras::GetParamAdapter ¶m, const ::std::string &name, const char *defaultValue, const ::std::string &unit="", const ::cras::GetParamOptions<::std::string > &options={}) const
Get the value of the given ROS parameter, falling back to the specified default value, and print out a ROS log message with the loaded values (if specified).
::cras::LogHelperPtr getLogger() const
Return the log helper used for logging.
GetParamResult< ResultType > getParamVerbose(const ::ros::NodeHandle &node, const ::std::string &name, const ::cras::optional< ResultType > &defaultValue=ResultType(), const ::std::string &unit="", const ::cras::GetParamOptions< ResultType, ParamServerType > &options={})
Get the value of the given ROS parameter, falling back to the specified default value (if not nullopt...
A C++11 shim for std::optional. Uses std::optional when used in C++17 mode.
ParamHelper(const ::cras::LogHelperPtr &log)
Options for getParam() calls.
inline ::std::string getParam(const ::cras::GetParamAdapter ¶m, const ::std::string &name, const ::cras::optional< const char *> &defaultValue, const ::std::string &unit="", const ::cras::GetParamOptions<::std::string > &options={}) const
Get the value of the given ROS parameter, falling back to the specified default value (if not nullopt...
ResultType getParam(const ::cras::GetParamAdapter ¶m, const ::std::string &name, const ::cras::optional< ResultType > &defaultValue=ResultType(), const ::std::string &unit="", const ::cras::GetParamOptions< ResultType, ParamServerType > &options={}) const
Get the value of the given ROS parameter, falling back to the specified default value (if not nullopt...
::cras::LogHelperPtr log
Log helper.
ResultType getParam(const ::cras::GetParamAdapter ¶m, const ::std::string &name, const ResultType &defaultValue=ResultType(), const ::std::string &unit="", const ::cras::GetParamOptions< ResultType, ParamServerType > &options={}) const
Get the value of the given ROS parameter, falling back to the specified default value, and print out a ROS log message with the loaded values (if specified).
This class provides a unified experience for nodes, nodelets and filters for getting ROS parameter va...
void setLogger(const ::cras::LogHelperPtr &logger)
Set the log helper used for logging.
inline ::cras::GetParamResult< ResultType > getParamVerbose(const ::cras::GetParamAdapter ¶m, const ::std::string &name, const ResultType &defaultValue=ResultType(), const ::std::string &unit="", const ::cras::GetParamOptions< ResultType, ParamServerType > &options={}) const
Get the value of the given ROS parameter, falling back to the specified default value, and print out a ROS log message with the loaded values (if specified).
inline ::cras::GetParamResult< ResultType > getParamVerbose(const ::cras::GetParamAdapter ¶m, const ::std::string &name, const ::cras::optional< ResultType > &defaultValue=ResultType(), const ::std::string &unit="", const ::cras::GetParamOptions< ResultType, ParamServerType > &options={}) const
Get the value of the given ROS parameter, falling back to the specified default value (if not nullopt...
ResultType getParam(const ::ros::NodeHandle &node, const ::std::string &name, const ::cras::optional< ResultType > &defaultValue=ResultType(), const ::std::string &unit="", const ::cras::GetParamOptions< ResultType, ParamServerType > &options={})
Get the value of the given ROS parameter, falling back to the specified default value (if not nullopt...
::std::shared_ptr<::cras::ParamHelper > ParamHelperPtr
Wrapper of getParam() call results.
This file provides helper methods easing access to parameters passed to nodes, nodelets and filters...
virtual ~ParamHelper()=default
Convenience base class for providing this->log and getCrasLogger(). Just add it as a base to your cla...
An adapter that allows getting ROS parameters from various sources.
::cras::LogHelper::Ptr LogHelperPtr
Pointer to LogHelper.