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

[jsk_tools] Add node to publish diagnostics based on topic and node status #1727

Merged
merged 14 commits into from
May 17, 2022

Conversation

708yamaguchi
Copy link
Member

This node checks topic and node status and publishes /diagnostics topic.

I refine jsk-ros-pkg/jsk_robot#1460 by using sanity_lib.py.
https://github.com/jsk-ros-pkg/jsk_common/blob/a3d26ac5243c108cec25d4108d93b3f0fd57c503/jsk_tools/src/jsk_tools/sanity_lib.py

$ rostopic echo /diagnostics
header: 
  seq: 1
  stamp: 
    secs: 1652277254
    nsecs: 167789936
  frame_id: ''
status: 
  - 
    level: 0
    name: "/respeaker_node"
    message: "Node is alive"
    hardware_id: ''
    values: []
  - 
    level: 0
    name: "/kinect_head/kinect_head_nodelet_manager"
    message: "Node is alive"
    hardware_id: ''
    values: []
---
header: 
  seq: 2
  stamp: 
    secs: 1652277254
    nsecs: 601408004
  frame_id: ''
status: 
  - 
    level: 0
    name: "/kinect_head/rgb/image_raw"
    message: "Topic is published"
    hardware_id: ''
    values: []
  - 
    level: 0
    name: "/tf"
    message: "Topic is published"
    hardware_id: ''
    values: []

In the future, I think robot speaks /diagnostics topic with this script.
#1607

@708yamaguchi 708yamaguchi requested a review from iory May 11, 2022 14:31
jsk_tools/src/sanity_diagnostics.py Outdated Show resolved Hide resolved
jsk_tools/src/sanity_diagnostics.py Outdated Show resolved Hide resolved
jsk_tools/src/sanity_diagnostics.py Outdated Show resolved Hide resolved
jsk_tools/src/sanity_diagnostics.py Outdated Show resolved Hide resolved
@708yamaguchi
Copy link
Member Author

fetch1075's rqt robot monitor

sanity_diagnostics

jsk_tools/src/sanity_diagnostics.py Outdated Show resolved Hide resolved
@iory
Copy link
Member

iory commented May 12, 2022

This looks good!
Could you add a test and sample like https://github.com/jsk-ros-pkg/jsk_common/pull/1711/files

@708yamaguchi
Copy link
Member Author

Thank you for your review.

I add sample

roslaunch jsk_tools sample_sanity_diagnostics.launch

and test

rostest jsk_tools test_sanity_diagnostics.test 

Result:
sanity_diagnostics

@708yamaguchi
Copy link
Member Author

Sorry for force-push.
I summerize commits 23 -> 6.

@iory
Copy link
Member

iory commented May 16, 2022

@708yamaguchi
Copy link
Member Author

Thank you!

I updated the code and fixed the test error.

@k-okada k-okada merged commit 7721ebd into jsk-ros-pkg:master May 17, 2022
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.

3 participants