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

Revision history [back]

click to hide/show revision 1
initial version

After a lot of searching in the rcl and rcutils sources and some gdb breakpoints, I got it working. Key are

  • Initialize logging right after creating the rcl context, notably __before__ creating a node in this context.
  • Use rcl_logging_configure_with_output_handler() with rcl_logging_multiple_output_handler as handler, also __before__ creating a node.
  • Make sure options.enable_rosout is true for rcl_node_init(). This is by default the case, but it was set to false in my code based on rclpy (which I guess sets it somewhere else).