Skip to content
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

Parameter list missing in reconfigure/dynamic if any parameter was declared without a default value under ROS2 #142

Open
EwingKang opened this issue Feb 15, 2024 · 1 comment

Comments

@EwingKang
Copy link

System: Ubuntu 22.04
Version: ROS 2 Iron Irwini - Patch Release 4

Following the parameter tutorial on the ROS2 docs, I can see the following result in rqt/ rqt_reconfigure
image

However, if I add a parameter without default value using the type-specifying version of the declare_parameter() API, the entire parameter list for the node will disappear without any error message:

this->declare_parameter("an_int_param", 0); // The original demo
this->declare_parameter("an_int_param_without_val", rclcpp::PARAMETER_INTEGER);  // THIS CAUSE PROBLEMS

image

This problem disappears if that specific parameter is supplied with the command line:

ros2 run cpp_parameter_event_handler parameter_event_handler --ros-args -p an_int_param_without_val:=22

image

I should add that all other ros2 param and ros2 service command line tools are fine as far as I've tested.
This behavior is not mentioned anywhere in the documentation and I also couldn't find any similar problems on the internet. It took me a few hours of trial-and-error to figure-out the pattern.

@EwingKang
Copy link
Author

This is related to ros2/rclcpp#2512

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant