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

RCLCPP_INFO only prints when I close the program

asked 2020-03-03 21:22:37 -0500

mdeegan gravatar image

I am composing multiple nodes together using a ComposableNodeContainer in the launch file. None of the RCLCPP_INFO messages appear until the program closes. RCLCPP_ERROR prints normally.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-03-17 11:43:18 -0500

jacobperron gravatar image

I guess you're noticing this behavior due to line buffering. Try setting the environment variable RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED=1.

Note, the default behavior was changed recently so that all log messages are flushed right away (so you shouldn't experience the same issue with ROS 2 Foxy or later). Related PR: https://github.com/ros2/rcutils/pull/196

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2020-03-03 21:22:37 -0500

Seen: 477 times

Last updated: Mar 17 '20