After these changes, the logs are now forwarded to both console and /rosout.
Unfortunately, I don't have enough time to test the entire package after this modification to check for potential issues. Therefore, I am leaving this note here to inform others.
Thanks
Hi The current logging procedure uses RCUTILS, which only logs to the console and not to the /rosout topic. Similar related issue Here.
The following changes are required to migrate the logging to RCLCPP.
define ROS_INFO(...) RCLCPP_INFO(node->get_logger(), __VA_ARGS__)
define ROS_DEBUG(...) RCLCPP_DEBUG(node->get_logger(), __VA_ARGS__)
define ROS_ERROR(...) RCLCPP_ERROR(node->get_logger(), __VA_ARGS__)
extern std::string __nodename; extern rclcpp::Node::SharedPtr node; // This line is added
define ROS_CREATE_NODE(name) \