DendROS - colored ROS2 terminal output with utils

Hi all,

I’d like to share DendROS, an open-source tool that makes ROS 2 terminal output easier to read. When a launch file starts thirty nodes, they all print to the same terminal in the same color, and the line you need has usually scrolled away by the time you look for it. DendROS gives each group of nodes its own color and opens ros2 launch in a viewer where you can scroll, search and filter the log while the launch keeps running.

DendROS: filtering a live launch, colorized ros2 CLI and remote commands

How it works

DendROS wraps the ros2 command with a bash function and pipes the output of ros2 launch and ros2 run through a colorizer. You describe your groups in a dendROS.yaml file inside your package:

groups:
  localization:
    color: "bold blue"
    label: "LOC"
    nodes:
      - slam_toolbox
      - amcl
  navigation:
    color: "green"
    label: "NAV"
    nodes:
      - nav2_*

There are no changes to launch files and no dependencies beyond PyYAML. A package without a config is passed through untouched, exit codes are preserved, and shell completion for ros2 keeps working.

What it does

Colors and badges per group. Each group gets a color and an optional badge such as [LOC]. Node names accept wildcards, and you can highlight keywords per group or for the whole package.

A viewer for ros2 launch. The log stays in a scrollback buffer, long lines are wrapped, and you can select text with the mouse to copy it. Press \ to open a console with these commands:

Command What it does
focus <node>... Show only some nodes. It matches the process name or the logger name, so components in a container can be picked one by one
level <lvl> Show lines at a severity or worse. Tracebacks always stay visible
grep <text> Live text filter with the matches highlighted
find <text> Search the scrollback. Tab and Shift+Tab step through the matches
mute / unmute Hide and restore noisy nodes
mark [label] Insert a timestamped separator line
tee <file> Save the lines currently shown to a file

Filters combine and Esc removes the most recent one. The same commands work from another terminal (dendros focus planner_server, dendros grep timeout), which helps when the launch runs in another tmux pane. dendros reopen brings back the last run after it has ended.

The viewer steps aside when the output is piped or redirected, so scripts and CI see plain output. If you prefer the normal scrolling output, set launch_mode: classic.

Crashes, tracebacks and parameter changes. A banner shows which node died and its exit code. Python tracebacks are highlighted. When a parameter changes at runtime, a notice shows the node, the parameter and the old and new value.

The ros2 CLI in the same colors. ros2 node list, node info, topic list, service list, action list, param list and param describe use the group colors of the running launch. Topics are colored by their publisher and show publisher and subscriber counts.

Setup helpers. dendros init scans your launch files and writes a first config. dendros config is a small terminal UI for the global settings. dendros disable and dendros enable switch the tool off and on in every terminal, including for launches that are already running.

Install

git clone https://github.com/mlisi1/DendROS
cd DendROS && bash install.sh && source ~/.bashrc

Then, from the root of your bringup package:

dendros init          # writes config/dendROS.yaml from your launch files
colcon build --packages-select my_bringup
ros2 launch my_bringup main.launch.py

It is plain Python 3 and bash, and it runs on the host or in Docker. The shell integration is bash only for now. I develop and test it on Jazzy; nothing in it is specific to one distribution.

Feedback

I’d like to hear how it behaves on your setup, especially:

  • terminals where the viewer looks wrong or the mouse copy does not reach the clipboard
  • launch output that is not matched or colored as you would expect
  • console commands or CLI subcommands you find yourself missing

Issues are welcome on GitHub.

2 Likes

Please, take at least the minimal effort to correctly format the LLM output.

2 Likes

While the post was indeed generated by Claude (and then overseen by me), I honestly thought the Markdown would have been rendered the same as the VS Code extension I use. My mistake, I will fix it as soon as I can.

1 Like

Looks great will try it , thanks

It would be great if this could color the launch output automatically without any config file (with random or semi-random colors).

1 Like

It kinda already does. If you use dendros init(optionally with --recursive) inside your bringup package it will automatically detect the nodes launched by the various launch files and create an initial config file (with preset colors) to get started.

I thought of assigning random colors if no config is present, but i wanted DendROS to be the least invasive possible if not instructed otherwise.

I do appreciate the feedback though, and encourage you and anyone who has one to speak up if you think of any feature that can improve the experience.