ros2cli
ros2cli copied to clipboard
Command to monitor and pretty print the rosout logs
Enhancement Request
Required Info:
- Operating System:
- OS Agnostic
- Installation type:
- N/A
- Version or commit hash:
- N/A
- DDS implementation:
- N/A
- Client library (if applicable):
- rclpy
Feature request
Feature description
Monitoring the rosout logs of a running system from the command line involves running the ros2 topic echo /rosout
and dealing with the content of the message AS-IS.
$ ros2 topic echo /rosout
---
stamp:
sec: 1691614804
nanosec: 921514406
level: 20
name: rosbag2_player
msg: Set rate to 2.35795
file: /build/source/src/rosbag2_transport/player.cpp
function: set_rate
line: 295
---
Although this works, the results are less than ideal and confusing to read for most users. Doing grep to search the output is made difficult as well and filtering the content for the logs of a specific node is also difficult.
Instead, it would be great to be able to pretty print the rosout logs in a way that makes it appealing and easy to follow. For example:
$ ros2 rosout print
[2023-08-09 17:02:22.539865596] [INFO ] [rosbag2_player]: Set rate to 2.59374