Template Function ros2_ouster::declare_parameter_if_not_declared(NodeTypePtr, const std::string&, const rclcpp::ParameterValue&, const rcl_interfaces::msg::ParameterDescriptor&)
Defined in File ros2_utils.hpp
Function Documentation
-
template<typename NodeTypePtr>
void ros2_ouster::declare_parameter_if_not_declared(NodeTypePtr node_ptr, const std::string ¶m_name, const rclcpp::ParameterValue &default_value, const rcl_interfaces::msg::ParameterDescriptor ¶meter_descriptor = rcl_interfaces::msg::ParameterDescriptor()) Declares static ROS2 parameter and sets it to a given value if it was not already declared.
This utility function is borrowed from the navigation2 package.
- Parameters:
node_ptr – [in] A node in which given parameter to be declared
param_name – [in] The name of parameter
default_value – [in] Parameter value to initialize with
parameter_descriptor – [in] Parameter descriptor (optional)