Skip to content

Conversation

@ipa-dmo
Copy link

@ipa-dmo ipa-dmo commented Aug 12, 2024

When using the same parameter for several instances of the filter or a filter chain (like in some ros2 forks of your elevation mapping repository), it will throw rclcpp::exceptions::ParameterAlreadyDeclaredException.
This PR just checks if the parameter already exists before declaring it.

@ipa-dmo
Copy link
Author

ipa-dmo commented Aug 20, 2024

The PR ros/filters#80 in the filterchain base class prevents the rclcpp::exceptions::ParameterAlreadyDeclaredException based on the filter name and type declarations. For the different parameter of the single grid map filters, a check inside your ParameterReader is necessary.

@Ryanf55 Ryanf55 added the ros2 Affects ROS 2 label Nov 8, 2024
@Ryanf55
Copy link
Collaborator

Ryanf55 commented Nov 28, 2024

This contribution looks good. Any chance you can add a unit test for it to show we no longer throw the rclcpp::exceptions::ParameterAlreadyDeclaredException exception?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ros2 Affects ROS 2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants