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

Measure topic message delay compared to the input from real world #719

Closed
wants to merge 7 commits into from

Conversation

wkentaro
Copy link
Contributor

This is to measure the delay caused by the topics which are set between input (like camera node) and a topic.

@wkentaro
Copy link
Contributor Author

like
virtual camera -> kmeans clustering

  • /raw_image_bgr/image_color: raw image: delay: 0.034
  • /kmeans/output: the output which process the input image with kmeans clustering: delay: 0.577

image

wkentaro added a commit to wkentaro/jsk_common that referenced this pull request Dec 17, 2015
upstream PR: ros/ros_comm#719

Added:
	 jsk_tools/src/topic_delay_monitor.py
wkentaro added a commit to wkentaro/jsk_common that referenced this pull request Dec 17, 2015
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:
Copy link
Member

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?

@dirk-thomas
Copy link
Member

Please add tests for the new command.

@wkentaro
Copy link
Contributor Author

wkentaro commented Mar 2, 2016

Thanks. I updated the commit as your feedbacks.

@dirk-thomas
Copy link
Member

One of the unit tests are currently failing. Please see the referenced Jenkins builds.

@wkentaro
Copy link
Contributor Author

wkentaro commented Mar 3, 2016

http://build.ros.org/job/Ipr__ros_comm__ubuntu_trusty_amd64/73/consoleFull
There seems to be no failures for rostests.
Could you please tell me where should I look at?

@dirk-thomas
Copy link
Member

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 failures= in the full console output: http://build.ros.org/job/Ipr__ros_comm__ubuntu_trusty_amd64/73/consoleFull

You should also be able to reproduce the failing test locally by running all_tests.

@wkentaro
Copy link
Contributor Author

wkentaro commented Mar 4, 2016

Thanks, I think I fixed it.

class ROSTopicDelay(object):

def __init__(self, window_size):
import threading
Copy link
Member

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).

Copy link
Member

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.

@dirk-thomas
Copy link
Member

Thank you. Squashed and merged in 9ce0125.

@dirk-thomas dirk-thomas closed this Mar 8, 2016
@wkentaro wkentaro deleted the rostopic-delay branch June 7, 2016 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants