Enabling statistics in rqt_graph for ROS2
I am using ROS2 Crystal Clemmys in Ubuntu 18.04, and am successfully running rqt_graph gui on screen by using the command rqt_graph --force-discover
(I had to use --force-discover
as qt_gui_main() found no plugin matching "rqt_graph.ros_graph.RosGraph"
)
I would like to enable statistics on my graph, so that I can observe the publish frequency (in Hz) and the average age of message (in ms). In ROS1 the command is rosparam set enable_statistics true
, as shown in the tutorial for rqt_graph here.
However, I am not sure what the command is for ROS2. I tried this:
user@ubuntu:~$ ros2 param set enable_statistics true
usage: ros2 param set [-h] [--spin-time SPIN_TIME] [--include-hidden-nodes]
node_name name value
ros2 param set: error: the following arguments are required: value
It couldn't find the parameter enable_statistics. So I went to find out the actual name of the parameter by:
user@ubuntu:~$ ros2 param list
./rqt_gui_py_node_11381:
There were no parameters for enabling statistics at all.
May I know the proper way of enabling statistics for rqt_graph in ROS2?
Edit: I think I keyed in another correct command:
user@ubuntu:~$ ros2 param set /rqt_gui_py_node_11381 /enable_statistics true
Set parameter successful
While the parameter has been found, still no statistics show up on the rqt_graph, even after I clicked on the refresh button.
How can I make the statistics appear, like in the picture in the tutorial?