Skip to content

Add diagnostics_rx_error_summarizer.py for rx error confirmation#1672

Merged
k-okada merged 5 commits intojsk-ros-pkg:masterfrom
Kanazawanaoaki:add-rx-error-summarizer
Mar 5, 2025
Merged

Add diagnostics_rx_error_summarizer.py for rx error confirmation#1672
k-okada merged 5 commits intojsk-ros-pkg:masterfrom
Kanazawanaoaki:add-rx-error-summarizer

Conversation

@Kanazawanaoaki
Copy link
Copy Markdown
Contributor

@Kanazawanaoaki Kanazawanaoaki commented Oct 15, 2022

I would like to add a program based on an existing program by @kosuke55 to jsk_robot in order to check which device is causing the error when the rx error occurs as reported by #1671 and #794

When executed without arguments, only devices with errors are displayed and the results are saved to a csv file. The --unsave argument eliminates saving to the csv file, and --show_all_ports outputs the results of all ports to stdout.

$ rosrun jsk_pr2_startup diagnostics_rx_error_summarizer.py
0
[Devices with errors]
1679040592 : /Motors/EtherCAT Device #00 (WG014) RX Error Port 0: 103
--------------------------------------------
1
[Devices with errors]
1679040593 : /Motors/EtherCAT Device #00 (WG014) RX Error Port 0: 103
--------------------------------------------
2
[Devices with errors]
1679040594 : /Motors/EtherCAT Device #00 (WG014) RX Error Port 0: 103
--------------------------------------------
3
[Devices with errors]
1679040595 : /Motors/EtherCAT Device #00 (WG014) RX Error Port 0: 103
--------------------------------------------

@knorth55 knorth55 mentioned this pull request Oct 18, 2022
61 tasks
@k-okada k-okada added the hacktoberfest-accepted https://hacktoberfest.digitalocean.com/hacktoberfest-update label Oct 21, 2022
Copy link
Copy Markdown
Member

@708yamaguchi 708yamaguchi left a comment

Choose a reason for hiding this comment

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

Thanks for the nice script.
I am able to use this script with pr1012 today and there seems no problems.

It would be helpful if you could give a timestamp or number of attempts in the stdout of this script.

@708yamaguchi
Copy link
Copy Markdown
Member

@Kanazawanaoaki
I think that timestamps and graph drawing functions are important to know when packet drops occur.
So it would be great if we could output csv or draw graphs by default.

if 'RX Error' in v.key:
if self.count == 0:
self.keys.append(s.name + ' - ' + v.key)
self.values.append(v.value)
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.

I think only timestamps are written into csv now.

Suggested change
self.values.append(v.value)
self.values.append(v.value)

I would appreciate it if the timestamp is displayed on stdout, too.

@Kanazawanaoaki
Copy link
Copy Markdown
Contributor Author

Thanks for your comments. I have updated the default to save to a csv file, to save more than just the timestamp in the csv, and to display the timestamp in the stdout as well.

@github-actions github-actions bot added the PR2 label Mar 5, 2025
@k-okada k-okada merged commit ac51e0c into jsk-ros-pkg:master Mar 5, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement hacktoberfest-accepted https://hacktoberfest.digitalocean.com/hacktoberfest-update PR2 PR1012 PR1040

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants