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

Feature request: Get all declared parameters (and print them) #1097

Open
zkytony opened this issue Mar 27, 2023 · 5 comments
Open

Feature request: Get all declared parameters (and print them) #1097

zkytony opened this issue Mar 27, 2023 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@zkytony
Copy link

zkytony commented Mar 27, 2023

Feature Request

Feature description

I liked that in ROS1, when running roslaunch, it prints out all the parameters and their values. It is great for logging and debugging. I hope to do something like this more easily with ROS 2.

I wish there is a 'get_parameter_names' that returns all declared (and other important) parameters when I don't pass in anything. Or, when running 'ros2 launch', it prints out all parameters of each node being launched.

Currently (with ROS2 Humber), there is get_parameters but it requires a list of names as input.

@clalancette
Copy link
Contributor

I wish there is a 'get_parameter_names' that returns all declared (and other important) parameters when I don't pass in anything. Or, when running 'ros2 launch', it prints out all parameters of each node being launched.

The underlying functionality is all there; we have the call for list_parameters in rclcpp. So this just needs an rclpy implementation. If you are willing to take a shot, then you can look at https://github.com/ros2/rclcpp/blob/rolling/rclcpp/src/rclcpp/node_interfaces/node_parameters.cpp for some inspiration on how to implement it.

@clalancette clalancette added enhancement New feature or request help wanted Extra attention is needed labels Mar 27, 2023
@leeminju531
Copy link
Contributor

I am interested in contributing to this feature. Is there anyone else who is also working on it?

@fujitatomoya
Copy link
Collaborator

@leeminju531 AFAIK, nobody is working on this. if you are willing to contribute, i am happy to do review 👍

@leeminju531
Copy link
Contributor

The underlying functionality is all there; we have the call for list_parameters in rclcpp. So this just needs an rclpy implementation.

I believe that the functionality for listing all declared parameters is already present in rclpy. The implementation can be found in https://github.com/ros2/rclpy/blob/rolling/rclpy/rclpy/parameter_service.py#L100#L140 .
From my understanding, this implementation looks for parameters based on a given prefix or returns all parameters if no prefix is provided. therefore, it may not be necessary to implement this feature.

If not, please let me know your thoughts on how to proceed.

@fujitatomoya
Copy link
Collaborator

@leeminju531

I believe that the functionality for listing all declared parameters is already present in rclpy. The implementation can be found in https://github.com/ros2/rclpy/blob/rolling/rclpy/rclpy/parameter_service.py#L100#L140 .

this is parameter service callback. so that it can prints all parameters via service.

i think the feature request here is to implement the method that belongs to Node? to print the all parameters that the node owns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants