micro-ROS / micro_ros_raspberrypi_pico_sdk

Raspberry Pi Pico (RP2040) and micro-ROS integration
Apache License 2.0
179 stars 52 forks source link

rosout logging #1194

Closed willbsp closed 3 months ago

willbsp commented 3 months ago

Steps to reproduce the issue

I am trying to log using RCUTILS_LOG_INFO_NAMED (inside the pico_micro_ros_example.c file), however, I see no log in either the Micro ROS docker container output or when I run ros2 topic echo /rosout.

Expected behavior

Will see log outputs in /rosout

Actual behavior

No logs are visible

Additional information

In researching this issue, I found this issue where someone suggests using `rcl_logging_configure_with_output_handler', however when I compile I get:

pico_micro_ros_example.c:(.text.startup.main+0x52): undefined reference to `rcl_logging_configure_with_output_handler'
/usr/lib/gcc/arm-none-eabi/13.2.1/../../../arm-none-eabi/bin/ld: pico_micro_ros_example.c:(.text.startup.main+0xec): undefined reference to `rcl_logging_multiple_output_handler'

However, I have the following in pico_micro_ros_example.c:

#include <rcl/logging.h>

Thanks for this project, I am quite new to ROS2 and looking forward to experimenting with Micro ROS!

pablogs9 commented 3 months ago

micro-ROS does not support logging to rosout, you will need to create your own publisher to this topic.