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
Measure topic message delay compared to the input from real world #719
Conversation
upstream PR: ros/ros_comm#719 Added: jsk_tools/src/topic_delay_monitor.py
upstream PR: ros/ros_comm#719 Added: jsk_tools/src/topic_delay_monitor.py
self.window_size = window_size | ||
|
||
def callback_delay(self, msg): | ||
if msg._has_header is False: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the explicit comparison against False
? Wouldn't if not msg._has_header
not work?
Please add tests for the new command. |
Thanks. I updated the commit as your feedbacks. |
One of the unit tests are currently failing. Please see the referenced Jenkins builds. |
http://build.ros.org/job/Ipr__ros_comm__ubuntu_trusty_amd64/73/consoleFull |
One of the tests failed: http://build.ros.org/job/Ipr__ros_comm__ubuntu_trusty_amd64/73/testReport/ You will also see the test failure by searching for You should also be able to reproduce the failing test locally by running |
Thanks, I think I fixed it. |
class ROSTopicDelay(object): | ||
|
||
def __init__(self, window_size): | ||
import threading |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move the imports to the top of the module (in alphabetical order following PEP8).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just see the existing code does it the same way. Oh boy. Ok, keep it as-is.
Thank you. Squashed and merged in 9ce0125. |
This is to measure the delay caused by the topics which are set between input (like camera node) and a topic.