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

what is the use of ROS_INFO_NAMED and ROS_INFO_THROTTLE?

asked 2019-04-22 22:16:34 -0500

roslearnersai gravatar image

updated 2021-09-14 11:28:03 -0500

lucasw gravatar image

i got the error while using ROS_INFO_THROTTLE..SO for this we have any need to use different header files?

edit retag flag offensive close merge delete

Comments

This doesn't explain NAMED fully (does the log end up in rosout/stdout for instance?) but the explanation for THROTTLEis good http://wiki.ros.org/roscpp/Overview/L...

lucasw gravatar image lucasw  ( 2021-09-14 11:34:57 -0500 )edit

If you got a compilation error you are likely using an older version of ros that doesn't have support for throttle (kinetic or earlier?)

lucasw gravatar image lucasw  ( 2021-09-14 11:35:42 -0500 )edit

This answer #q209522 says the name variable overrides the node name (or is it appended to the node name with a dot as the wiki suggests?)

lucasw gravatar image lucasw  ( 2021-09-14 11:38:55 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-04-22 23:00:34 -0500

ahendrix gravatar image

Here is an example of ROS_INFO_THROTTLE. It prints at most once per second.

ROS_INFO_THROTTLE (1.0, "Waiting for startup to finish");

Here is an example of ROS_INFO_NAMED. It logs to a logger named my_package:

ROS_INFO_NAMED("my_package", "Info log from my library.");
edit flag offensive delete link more

Comments

1

thank u ahendrix,
but i havce a doubt.. how ros_info_named is useful..and where its log file is stored..and for what purpose this ros_info_named is used..please explain..if we are using _throttle ...is there any need to add header files..

roslearnersai gravatar image roslearnersai  ( 2019-04-23 00:02:27 -0500 )edit

All of these macros are included if you #include <ros/ros.h> .

ahendrix gravatar image ahendrix  ( 2019-04-23 13:07:24 -0500 )edit

The named loggers go to the same file, but they have separate verbosity level that can be adjusted with rqt_logger_level ( http://wiki.ros.org/rqt_logger_level?... ) So for example, you can use a named logger and set it to show DEBUG messages, even though the rest of your logging is still set to only show INFO or WARN.

ahendrix gravatar image ahendrix  ( 2019-04-23 13:10:59 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-04-22 22:16:34 -0500

Seen: 2,168 times

Last updated: Sep 14 '21