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

Is'nt ROS_INFO_STREAM_THROTTLE signature a little misleading

asked 2014-12-23 06:28:55 -0500

Wolf gravatar image

The definition for ROS_INFO_STREAM_THROTTLE looks like (question valid for all ROS_**_THROTTLE rosconsole macros ):

#define ROS_INFO_STREAM_THROTTLE(rate, args) ......

However, if i put ROS_INFO_STREAM_THROTTLE( 10, "whatever" ) it will be printed every 10 seconds. If i put ROS_INFO_STREAM_THROTTLE( 0.1, "whatever" ) it will be printed 10 times a second. So unlike ros::Rate where rate means actions per second the macro arg rate here means seconds between the actions. So it is more of a timeout, isn't it? Should maybe it should be renamed like

#define ROS_INFO_STREAM_THROTTLE(rate, args) ......

??

Do you think that would be clearer to the users of the marco?

edit retag flag offensive close merge delete

Comments

I think you meant to say #define ROS_INFO_STREAM_THROTTLE(period, args) or something similar? Your 'renamed' statement is now identical to the original one.

gvdhoorn gravatar image gvdhoorn  ( 2014-12-23 07:41:38 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-12-29 13:46:50 -0500

tfoote gravatar image

That does look confusing/misleading, period does sound more accurate. it's probably worth a ticket to update the documentation/prototype.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-12-23 06:28:55 -0500

Seen: 874 times

Last updated: Dec 29 '14