ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Why $ ros2 node info [node_name] doesn't include parameter information?

asked 2021-01-21 00:21:57 -0600

As the title says, if each parameter belongs to a node, not to a parameter server, why doesn't the command in the title show any information about parameters?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-01-21 11:07:15 -0600

sloretz gravatar image

I would guess it doesn't show anything about parameters because whoever wrote it used the output of rosnode info in ROS 1 as a guide for how the ROS 2 version should work.

There is a command to get parameter information: ros2 param. Here's an example:

$ ros2 run demo_nodes_cpp parameter_blackboard 
[INFO] [1611248250.617941407] [parameter_blackboard]: Parameter blackboard node named '/parameter_blackboard' ready, and serving '1' parameters already!

and in another terminal

$ ros2 param set /parameter_blackboard foobar baz
Set parameter successful
$ ros2 param set /parameter_blackboard gorilla 42 
Set parameter successful
$ ros2 param set /parameter_blackboard hippo 1.23
Set parameter successful
$ ros2 param list /parameter_blackboard 
  foobar
  gorilla
  hippo
  use_sim_time
$ ros2 param dump --print /parameter_blackboard 
parameter_blackboard:
  ros__parameters:
    foobar: baz
    gorilla: 42
    hippo: 1.23
    use_sim_time: false
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-01-21 00:21:57 -0600

Seen: 167 times

Last updated: Jan 21 '21