Robotics StackExchange | Archived questions

RCLCPP_INFO only prints when I close the program

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.

Asked by mdeegan on 2020-03-03 22:22:37 UTC

Comments

Answers

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

Asked by jacobperron on 2020-03-17 11:43:18 UTC

Comments