Debug logging of micro-ROS on Android
I have an application for Android written in C++ which I want to connect with the ROS 2 world using micro-ROS, which is said to support Android out of the box. I had many issues using the standard 'android generic' configuration so in the end I created a custom Android configuration for a 'generate_lib' build and linked the resulting library archive to the usual Gradle + CMake build. This works quite nicely as far as building is concerned.
However, I have problems running the simple string publisher code. The program fails right at the beginning during initialization inside rclc_support_init
call (I manually traced it a bit further down to rmw_init
inside rcl_init
). Unfortunately, I could get no indication as to what exactly is failing due to logging being apparently disabled by default for rcl, at least in this build. I tried, to no avail, to enable it by doing the following:
- defined
RCL_LOGGING_ENABLED=ON
forrcl
in colcon.meta, - included
spdlog_vendor
insidemcu_ws
workspace
This seems to build the logging infrastructure but I still get no logging output.
What else do I need to do to get the logging output from rcl
?