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

"Recursive Print Statement" with Nodelets

asked 2011-05-18 08:31:00 -0600

mkoval gravatar image

I have recently converted a few of my nodes to nodelets to take advantage of zero-copy message passing. Even though I have converted all of the standard ROS logging macros (e.g. ROS_ERROR()) to the nodelet-aware equivalents (e.g. NODELET_ERROR()), I get the following warning printed to my terminal:

Warning: recursive print statement has occurred. Throwing out recursive print.

After this message prints it appears that the logging macros cease to function. Has anyone else encountered this message when using nodelets? How can I fix it?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2011-05-18 11:26:24 -0600

Brian Gerkey gravatar image

updated 2011-05-19 03:06:14 -0600

There are open tickets on this issue:

The first ticket includes some suggested workarounds. My understanding is that this problem still exists and needs to be fixed.

edit flag offensive delete link more

Comments

Thanks for the link. Switching from using standalone nodelets to using a manager fixed the problem.
mkoval gravatar image mkoval  ( 2011-05-18 12:10:18 -0600 )edit
0

answered 2011-06-13 08:46:14 -0600

I get this warning frequently in Diamondback, even when not using nodelets.

I put up with it for a while, but it started to affect my log sizes so I disabled the warning with a bad workaround:

stacks/ros_comm/tools/rosconsole/src/rosconsole/rosconsole.cpp

comment out lines 490, 491, and 562, 563... definitely not the correct fix but it silences the warning and now I actually get the real ROS_WARN/ROS_INFO messages that I was expecting.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-05-18 08:31:00 -0600

Seen: 737 times

Last updated: Jun 13 '11