-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
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
Fix filter chain configuration parameter loading #69
base: ros2
Are you sure you want to change the base?
Conversation
Could you look through CI and address the failing tests? It looks like cpplint is failing, at least on humble. |
@jonbinney basically there is no longer "parameter redeclaration" and no default values. It creates new parameters with every new filter.
|
// Must be dynamically typed because later we undeclare it and redeclare | ||
// it read-only, but statically typed params cannot be undeclared. | ||
name_desc.dynamic_typing = true; | ||
node_params->declare_parameter(name_desc.name, rclcpp::PARAMETER_STRING); | ||
rcl_interfaces::msg::ParameterDescriptor type_desc; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type_desc
and name_desc
are declared and populated, but then unused besides the name. I suggest to use the declare_parameter()
overloads that accept a rcl_interfaces::msg::ParameterDescriptor
, same as before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or directly pass the name only without the extra descriptor declarations, if the default descriptors will do.
Trying to use filters_demo_launch.py which has the following (filters)[https://github.com/ANYbotics/grid_map/blob/ros2/grid_map_demos/config/filters_demo_filter_chain.yaml] it fails to load with a runtime error.
The PR allows loading of the configuration. It has also been tested with other configuration parameters successfully.