0
$\begingroup$

Rosanswers logo

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?


Originally posted by wan_da on ROS Answers with karma: 57 on 2019-05-29

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The statistics feature in rqt_graph depends on support for this in the roscpp and rospy client libraries.

I'm not aware of that support having been ported to their ROS 2 equivalents (ie: rclcpp and rclpy).

As such, I don't believe you can use this feature in rqt_graph right now in ROS 2.

How can I make the statistics appear, like in the picture in the tutorial?

Please note: the tutorial you link to is on the ROS 1 wiki. Documentation on ROS 2 itself may be found here. Individual packages are also listed on that site (here for rqt_graph fi), but the crystal version does not link to any readily available wiki or documentation.

In general: even though it may happen that ROS 2 packages and nodes have the same name as their ROS 1 counterparts, there is a good chance that they do not have feature parity (ie: not everything from ROS 1 will work in ROS 2).


Originally posted by gvdhoorn with karma: 86574 on 2019-05-30

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by wan_da on 2019-05-30:
ok. thank you very much

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.