ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hi @Artivis,
The service call is the solution if you need to list the parameters of another node.
If you want to do something with the parameters within the node (Dummy
in your case), just use the "private" member self._parameters
, which is a map with the parameter names as keys and Parameter objects as values: https://github.com/ros2/rclpy/blob/0.7.4/rclpy/rclpy/node.py#L133.
If you just want a list:
class Dummy(Node):
def __init__(self):
super().__init__('dummy', allow_undeclared_parameters=True,
automatically_declare_parameters_from_overrides=True)
param_list = [parameter for parameter in self._parameters.values()]
Hope it helps!