Template Function fuse_core::getParam(node_interfaces::NodeInterfaces<node_interfaces::Parameters>, const std::string&, const rcl_interfaces::msg::ParameterDescriptor&, bool)
Defined in File parameter.hpp
Function Documentation
-
template<class T>
T fuse_core::getParam(node_interfaces::NodeInterfaces<node_interfaces::Parameters> interfaces, const std::string ¶meter_name, const rcl_interfaces::msg::ParameterDescriptor ¶meter_descriptor = rcl_interfaces::msg::ParameterDescriptor(), bool ignore_override = false) Compatibility wrapper for ros2 params in ros1 syntax.
Declare a parameter if not declared, otherwise, get its value.
This is needed because the node parameters interface does not do the type conversions to and from ParameterValue for us.
- Parameters:
interfaces – [in] - The node interfaces used to load the parameter
parameter_name – [in] - The ROS parameter name
parameter_descriptor – [in] - An optional, custom description for the parameter.
ignore_override – [in] When
true
, the parameter override is ignored. Default tofalse
.
- Throws:
rclcpp::exceptions::InvalidParameterTypeException – if the parameter type does not match
- Returns:
The value of the parameter.