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

Enabling statistics in rqt_graph for ROS2

asked 2019-05-29 23:19:35 -0600

wan_da gravatar image

updated 2019-05-30 00:15:38 -0600

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?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2019-05-30 01:37:20 -0600

gvdhoorn gravatar image

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).

edit flag offensive delete link more

Comments

ok. thank you very much

wan_da gravatar image wan_da  ( 2019-05-30 02:41:20 -0600 )edit
0

answered 2019-07-30 12:06:06 -0600

tb gravatar image

it's not available in ros2 yet please see this other post: https://answers.ros.org/question/3279...

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-05-29 23:19:35 -0600

Seen: 1,139 times

Last updated: Jul 30 '19