ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
In response to @tnajjar, to do this in Python, use RcutilsLogger under rclpy.impl
from rclpy.impl import rcutils_logger
logger = rcutils_logger.RcutilsLogger(name="my_logger")
logger.info("Hello World")
You will see something like
[INFO] [1681758901.959964134] [my_logger]: Hello World
Underneath the hood, some function from rcutils is called that does the job of logging.