Skip to content

Improve live diagnostics messages - #14

Closed
aj0khi wants to merge 1 commit into
mainfrom
feature/diagnostics-cli-ajmal
Closed

aj0khi wants to merge 1 commit into
mainfrom
feature/diagnostics-cli-ajmal

Conversation

@aj0khi

@aj0khi aj0khi commented Aug 23, 2026

Copy link
Copy Markdown

just checking if my work actually sent yassine

how to build:
Terminal 1 run the following:
source /opt/ros/jazzy/setup.bash
source install/setup.bash
python3 waybionic_rviz_plugins/scripts/temporary_diagnostics_publisher.py --mode normal

Terminal 2:
cd ~/waybionic_ground_station
source /opt/ros/jazzy/setup.bash
source install/setup.bash
ros2 topic list | grep diagnostics
ros2 topic echo /diagnostics --once
ros2 launch waybionic_rviz_plugins engineer_view.launch.py

Summary by CodeRabbit

  • New Features
    • Diagnostic statuses now include descriptive messages for board temperature, motor current, and IMU orientation readings.
    • Diagnostic alerts now display their messages even when the status is normal or marked as “OK.”

@aj0khi
aj0khi requested a review from yassinsolim as a code owner August 23, 2026 16:39
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3770a296-34e5-44cf-8464-b44257038ecf

📥 Commits

Reviewing files that changed from the base of the PR and between 02d0b90 and ba315fd.

📒 Files selected for processing (2)
  • waybionic_rviz_plugins/scripts/temporary_diagnostics_publisher.py
  • waybionic_rviz_plugins/src/ros_diagnostics_source.cpp

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The diagnostic publisher now adds descriptive messages for five normal statuses. ROS diagnostic conversion now includes non-empty messages in alerts for OK statuses.

Changes

Diagnostic message propagation

Layer / File(s) Summary
Message generation and alert conversion
waybionic_rviz_plugins/scripts/temporary_diagnostics_publisher.py, waybionic_rviz_plugins/src/ros_diagnostics_source.cpp
Normal board temperature, motor current, and IMU statuses now include descriptive messages. Diagnostic alerts now retain non-empty messages for all normalized statuses, including Ok.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to ba315

The PR makes a small, localized diagnostics-message change, and no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: yassinsolim

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: improving live diagnostic messages.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/diagnostics-cli-ajmal

Comment @coderabbitai help to get the list of available commands.

@yassinsolim yassinsolim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Ajmal, thanks for getting the PR up and making sure CI passes.

I looked through the changes. Right now, your PR mainly does two things:

  • adds messages like "Normal Temperature" and "Normal Motor Current" to healthy diagnostics
  • changes the diagnostics code so those messages are also kept when the status is OK

That part works, but it is not the task we were trying to complete.

The task was to make a small command-line diagnostics tool that reads the existing /diagnostics topic and prints the results in the terminal.

What I need you to add:

  • subscribe to /diagnostics
  • show each signal name, status, value, unit, and message
  • add a snapshot mode that prints the latest diagnostics once and exits
  • add a watch mode that keeps updating in the terminal
  • handle OK, WARN, ERROR, and STALE
  • show a clear message if no diagnostics are being received
  • add a few tests
  • add a short README with the commands to run it

You do not need to change the existing diagnostics system much. The goal is mostly to read the diagnostics that already exist.

I would also revert the change that makes normal OK messages become alert_message, since that field is meant mainly for warnings/faults.

You can keep using the same branch and PR. Just update it with the CLI tool and push the new commits.

@aj0khi

aj0khi commented Aug 29, 2026

Copy link
Copy Markdown
Author

all done, and will do the terminal panel over the week and ready to show by next week hopefully. should I do it here in the same pull request/branch or create a new one?

@yassinsolim yassinsolim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CLI now lives in #16, which also keeps normal rows out of alert_message. Please mark this PR as superseded by #16 and close it once the useful changes are accounted for. No need to maintain both.

@aj0khi

aj0khi commented Sep 12, 2026

Copy link
Copy Markdown
Author

Superseded by PR#16, will close this now

@aj0khi aj0khi closed this Sep 12, 2026
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

Successfully merging this pull request may close these issues.

2 participants