Skip to content

to support multiple topics for topic hz - #831

Closed
iuhilnehc-ynos wants to merge 7 commits into
ros2:rollingfrom
iuhilnehc-ynos:topic-hz-multiple-topics
Closed

iuhilnehc-ynos wants to merge 7 commits into
ros2:rollingfrom
iuhilnehc-ynos:topic-hz-multiple-topics

Conversation

@iuhilnehc-ynos

Copy link
Copy Markdown

to support #830

Chen Lihui added 3 commits May 12, 2023 08:49
Signed-off-by: Chen Lihui <[email protected]>
Signed-off-by: Chen Lihui <[email protected]>
@fujitatomoya

Copy link
Copy Markdown
Collaborator

@iuhilnehc-ynos thanks, i am happy to do review once this is ready.

Comment on lines -205 to +208
elif self.get_last_printed_tn(topic=topic) == 0:
self.set_last_printed_tn(self.get_msg_tn(topic=topic), topic=topic)
return
elif self.get_msg_tn(topic=topic) < self.get_last_printed_tn(topic=topic) + 1e9:
elif self.get_msg_tn(topic=topic) == self.get_last_printed_tn(topic=topic):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

if i am not mistaken, this is a refactoring fix, unrelated to this feature, right?

Comment on lines +234 to +241
if len(topics) == 1:
ret = self.get_hz(topics[0])
if ret is None:
return
rate, min_delta, max_delta, std_dev, window = get_format_hz(ret)
print('average rate: %.3f\n\tmin: %.3fs max: %.3fs std dev: %.5fs window: %s'
% (rate, min_delta, max_delta, std_dev, window))
return

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this part is to keep the compatible printing with current ros2 topic hz, right? i think either is fine.

Comment on lines +305 to +306
if topics_len > 1:
print('Subscribed to [%s]' % topic)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

i think this message makes sense either single or multiple topics are specified for user.

Comment on lines +296 to +298
if msg_class is None:
node.destroy_node()
return

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If we specify 10 topics to check hz, and one of them cannot find the message type support, it will return immediately. i would expect, it can tell me topic-X message type cannot be found, but other topics will be processed to print the statistics. would it be better user experience?

@fujitatomoya

Copy link
Copy Markdown
Collaborator

@iuhilnehc-ynos i am not sure if you are still working on this, just a few comments. if you are not working on this anymore, i am happy to take this over, so let me know.

@iuhilnehc-ynos

Copy link
Copy Markdown
Author

@fujitatomoya Thanks for your notification. Please open a new PR to deal with it as I think this PR was not good enough. I'll close it.

@yaswanth1701

Copy link
Copy Markdown

Hi @fujitatomoya, can I continue working on this PR?

@fujitatomoya

Copy link
Copy Markdown
Collaborator

i was going to take this over from @iuhilnehc-ynos , but if you are willing to do that, that is really appreciated!

@yaswanth1701

Copy link
Copy Markdown

thanks !!

@TannerGilbert

Copy link
Copy Markdown

@yaswanth1701 @fujitatomoya any update on this or if you don't have time to continue on this what changes would be required for this to be acceptable? Best regards, Gilbert

@fujitatomoya

fujitatomoya commented Sep 4, 2024 •

Copy link
Copy Markdown
Collaborator

@TannerGilbert thanks for the ping. i will replace this with new PR. (this one needs to rebase.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants