Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command to monitor and pretty print the rosout logs #849

Open
guillaumeautran opened this issue Aug 9, 2023 · 0 comments
Open

Command to monitor and pretty print the rosout logs #849

guillaumeautran opened this issue Aug 9, 2023 · 0 comments

Comments

@guillaumeautran
Copy link

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
guillaumeautran added a commit to clearpathrobotics/ros2cli that referenced this issue Aug 9, 2023
Creation of a rosout print command that generates pretty prints of the content of the `/rosout` topic. The commands also allows for the filtering of nodes based on a regular expression applied to the node name itself. Output color can be disabled (enabled by default) and the function information detail can also be displayed.

issue: ros2#849
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant