ros2 / ros2/ros2cli

ros2plot - new command / verb for topic data plot visualization

Open
#1,189 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

I was recently asked by @tonynajjar on the possibility of integrating ros2plot with ros2cli (https://github.com/jeminism/ros2plot/issues/1), alongside others on various platforms; so I thought I'd raise this here as open discussion with the community and maintainers.

ros2plot (https://github.com/jeminism/ros2plot) is a utility for rendering topic data as x-y plots. In the most basic function it will log all numeric fields in a topic as a time-series. It also allows for a customizable x-axis, so you could generate graphs of historical 2D pose data (x against y, etc). There are also other features with regards to inspection which I won't go into detail here since they're listed on the main repo.

Image

Motivation

Being able to visualize historical data as a time-series or x-y plot in the terminal enables a deeper level of inspection for users.

For most developers, I see the primary benefit as being a quick on-system inspection solution when debugging issues (as opposed to the usual process of record -> reproduce -> exfil bag -> debug on developer system). This allows developers to catch not-so-obvious issues in real time such as wheel slips, imu spikes, control tuning etc.

As a deployment use-case, this would be useful in scenarios where a GUI is not available; headless systems, SSH via web etc.

Design / Implementation Considerations

I could see integration with ros2cli going either of two routes, either a new verb or a new command.

  • ros2 topic plot <args ....> will directly spawn the terminal instance that is seen in my original implementation.
  • ros2 plot verb{topics, csv, bag, ...} will enable the program to be broken up per various potential data sources (ros2plot currently supports reading from csv). Different verbs allows avenue for adding new visualization types (3d???) in the future.

Some considerations:

  • If adding as a verb to ros2 topic, existing verbs currently designed to subscribe to only one topic. plotting multiple topics is a break away from that.
  • ros2plot is an interactive utility, whereas the design of existing ros2cli commands seem leaning toward one-shot commands (i think so, at least). Curious if this is a point of consideration for the maintainers?
  • CPU usage for rendering and refresh is high - typically takes up 100% of 1 core.
Additional Information

the current state of ros2plot is rudimentary. I'd say it would need some major UI/UX work and could also benefit from a performance uplift by porting some of its logic over to either c++ or rust to improve speed and reduce CPU / memory usage.

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 reviewing the ros2plot repository and the existing ros2cli command and verb conventions. The issue leaves the integration route, UI/UX scope, and performance work undecided, so first establish the intended command structure and implementation boundaries with maintainers. Done criteria are not defined in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.