[rostopic] Get multiple topics with rostopic hz#712
[rostopic] Get multiple topics with rostopic hz#712wkentaro wants to merge 6 commits intoros:indigo-develfrom
Conversation
|
This is designed to find bottleneck of topic node flow. So it supports |
There was a problem hiding this comment.
This line will fail if ret is None but not self.times.
318087e to
9ff24cb
Compare
|
Maybe this can be supported by |
ed30602 to
8e46e40
Compare
There was a problem hiding this comment.
msg_class is only set in the previous loop (line 230) which doesn't seem to be what you want?
|
Can you please describe what a parent topic is? Also the two features (multiple topics for hz and parent topics) seem to be independent from each other (except that the later one needs the former one). Please use separate PRs or at least commits for this in the future since it simplifies the review significantly. |
c6b3723 to
00e7912
Compare
Parent topics means that topics to which the specified topic subscribes to Depends on ros#712
Parent topics means that topics to which the specified topic subscribes to Depends on ros#712
| import threading | ||
| self.lock = threading.Lock() | ||
| self.last_printed_tn = 0 | ||
| self.last_msg_tn = 0 |
There was a problem hiding this comment.
Please do not change the name of this variable. It is publically visible and it would break the API to rename it.
|
I updated the commit aside from above comment. |
|
@ros-pull-request-builder retest this please |
|
Jenkins fails to build this branch. Please make sure it is rebased to the latest devel branch to avoid potential problems. |
7358b45 to
863f099
Compare
|
The test still times out. |
| print the average publishing rate to screen | ||
| """ | ||
| if not self.times: | ||
| return |
There was a problem hiding this comment.
If get_hz would distinguish this case with a different return value this extra check would not be necessary.
|
Thanks for fixing the build and the tests. I added a few more comments inline but they should be fairly easy to address. |
|
Thanks, I applied changes according to your comments. Could you please check them again? |
| args = argv[2:] | ||
| from optparse import OptionParser | ||
| parser = OptionParser(usage="usage: %prog hz /topic", prog=NAME) | ||
| parser = OptionParser(usage="usage: %prog hz [optioncs] /topic_0 [/topic_1 [[topic_2 [..]]]]", prog=NAME) |
There was a problem hiding this comment.
Spelling.
The previous question remains:
What are the trailing two dots for?
There was a problem hiding this comment.
I mean topic_0 [/topic_1 [[topic_2 [topic_3 [topic_4 [topic_5 [..]]]]]]]
b4c68c8 to
f4d57a1
Compare
|
Fixed spelling, and fixed the breaking public api with default value for argument. |
| args = argv[2:] | ||
| from optparse import OptionParser | ||
| parser = OptionParser(usage="usage: %prog hz /topic", prog=NAME) | ||
| parser = OptionParser(usage="usage: %prog hz [options] /topic_0 [/topic_1 [[topic_2 [..]]]]", prog=NAME) |
There was a problem hiding this comment.
I will replace the double [[ with a single [ when cherry-picking the changes.
|
Thank you for providing this enhancement. I have cherry-picked the changes to the kinetic-devel branch: a6a4e57 |
|
Thank you! |
|
I just run into a problem with this new feature when testing #874. If you pass two topic names but only one of them has any activity the command only prints "no new messages" and doesn't show the information about the topic which does have data. @wkentaro Can you please look into this problem and make a PR for it (the tests should probably also cover that case). |
|
I think #886 fixes the problem, but not sure how to test it. |
|
Since this PR changes the public API of |
|
I agree that the code should be changed for the backward compatibility, but currently I don't have time to work on that, so it cannot be done soon. |
|
Since we have already merged quite a bit of stuff on-top of this patch I rather spent time on actually fixing the API than trying to revert all the changes (knowing that I will have to reapply them in the near future again). Therefore I created #896 to restore API compatibility.. |


No description provided.