We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
description yaml file:
topic: <> input_rate: <> updater: topic: <>
// namespace is interface library name namespace foo_config { struct Params { string topic; double input_rate; struct Updater { string topic; } updater; // for detecting if the parameter struct has been updated rclcpp::Time __stamp; }; class ParamListener { public: ParamListener(rclcpp::ParameterInterface); ParamListener(rclcpp::Node::SharedPtr node) : ParameterListener(node->get_parameters_interface()) {} ParamListener(rclcpp_lifecycle::LifecycleNode::SharedPtr node) : ParameterListener(node->get_parameters_interface()) {} Params get() const; bool is_invalid(Params const& other) const; private: std::mutex mutex_; Params params_; }; } // namespace foo_config
// initalization auto const node = std::make_shared<rclcpp::Node>("foo"); auto const param_listener = foo_config::ParameterListener(node); auto params = param_listener.get(); ... // in update loop if (param_listener.is_invalid(params)) { params = param_listener.get(); }
The text was updated successfully, but these errors were encountered:
See this commit for change: 028f5d8
Sorry, something went wrong.
No branches or pull requests
description yaml file:
Use Example
The text was updated successfully, but these errors were encountered: