Ask Your Question
1

How to get the operating freqency (Hz) of a ROS node in Autoware

asked 2021-02-17 00:22:13 -0600

rsuwa gravatar image

updated 2021-02-18 00:29:53 -0600

Is there a way to get the operating freqency (Hz) of nodes other than those that can be obtained by the rosparam get command? And if so, how can I get it?

For example, in the case of the /astar_avoid node, it can be obtained by rosparam get /astar_avoid/update_rate .

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2021-02-17 09:15:54 -0600

vinny gravatar image

If you are aware of the topic you are interested in getting the rate of you can do rostopic hz /my_topic.

edit flag offensive delete link more

Comments

I'm aware that the rostopic hz command exists, but this is the command to know the period of the published topic, right? What I want to know is the actual operating frequency of the ROS node of autoware. It may be possible to estimate the period of the ROS node from the period of the topic, but in general, the period varies from topic to topic, so if there is a way to know the operating period of the ROS node of autoware, I would like to know it.

rsuwa gravatar image rsuwa  ( 2021-02-18 00:26:57 -0600 )edit
1

Then the answer is, "it depends." in Autoware.ai, some nodes are data-driven (meaning that they only do work when a new message arrives "upstream"), or temporally-driven (processing arriving data only at a certain frequency). In the first case, the frequencies of the input and output topics are the only metrics. In the second case, you'll have to look at the code of the node. In general, there will be a ros::rate defining this frequency.

Josh Whitley gravatar image Josh Whitley  ( 2021-02-23 08:57:06 -0600 )edit

Thanks for the answer! I found that I just need to check the upstream and downstream topics. Thanks for the advice.

rsuwa gravatar image rsuwa  ( 2021-02-24 01:26:30 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2021-02-17 00:22:13 -0600

Seen: 136 times

Last updated: Feb 17 '21