logging.md
What are ROS logs?
Two different things called logs, data logs and normal (rosout) logs
Data logs are collected with rosbag and are used to replay or simulate all messages which were sent.
This is about the other kind of logs, which are primarily used for sending warnings, errors and debugging.
Solves the problem of distributed information. Many nodes have information to share, which requires a robust logging infrastructure
What do logs do?
Get printed to stdout or stderr (screen of terminal window running node)
Get sent to rosout which acts as unified log record
Get written a file on the computer running roscore
Log implementation
std_msgs/Log type:
No publisher needs to be made to log in rospy. Instead, use the following functions:
what goes where?
A well formatted GUI exists to show all log messages and can be accessed with $ rqt_console:
Programming Robots with ROS ch 21, Quigley, Gerkey, Smart
It subscribes to the /rosout topic. Every node brought up on the roscore can be seen in the /rosout. Therefore,
the Message Node, as a traffic cop, could communicate with any node through /rosout.
To pass the message from a node to the Message Node, the code just needs one line of code, i.e. rospy.log(). The API can be found in the Log Implementation section above.
User who wants to use Message Node only needs to put its name and what operations he needs to do inside the
@Alexander Feldman, feldmanay@gmail.com