ros2 / ros2/ros2cli

Command to monitor and pretty print the rosout logs

Open
#849 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
262
Forks
228
Avg merge
23h 15m
Merged PRs (30d)
12

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the existing ros2 topic echo /rosout behavior and the requested ros2 rosout print interface. The work is done when rosout messages can be displayed in the compact timestamped format shown, with output that is easier to follow, grep, and filter by node.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.