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
Exclude recorded /clock topic when --clock option is specified #1646
base: rolling
Are you sure you want to change the base?
Conversation
Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
@kosuke55 I am not convinced yet that we need this fix. |
@MichaelOrlov |
@kosuke55 i think automatic exclusion is user-friendly. as @MichaelOrlov mentioned, we |
if play_options.clock_publish_frequency > 0: | ||
exclude_topics.append('/clock') |
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 think we should explain this behavior in --clock
option help field for sure, e.g If specified, /clock topic in the bag file is excluded to publish.
.
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.
thanks!! I updated option help in 2961ccc cc @MichaelOrlov
if play_options.clock_publish_frequency > 0: | ||
exclude_topics.append('/clock') | ||
play_options.exclude_topics_to_filter = exclude_topics |
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.
Can we just do the following without any other changes above?
if play_options.clock_publish_frequency > 0: | |
exclude_topics.append('/clock') | |
play_options.exclude_topics_to_filter = exclude_topics | |
if play_options.clock_publish_frequency > 0: | |
play_options.exclude_topics_to_filter.append('/clock') |
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 haven't been able to trace the cause in detail, but I couldn't add it directly 🤔
print(f"play_options.clock_publish_frequency: {play_options.clock_publish_frequency}")
if play_options.clock_publish_frequency > 0:
print("Before appending:", play_options.exclude_topics_to_filter)
play_options.exclude_topics_to_filter.append('/clock')
print("After appending:", play_options.exclude_topics_to_filter)
print(f"Final state of exclude_topics_to_filter: {play_options.exclude_topics_to_filter}")
play_options.clock_publish_frequency: 100.0
Before appending: []
After appending: []
Final state of exclude_topics_to_filter: []
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.
@kosuke55 Thanks for the detailed explanation about the reasoning for these changes.
Now, it does make sense to me.
I agree with @fujitatomoya that we need to put some notes in the CLI help section about this behavior to not surprise someone and not to be considered as a bug.
Also, I think we will need to wait until changes per #1633 will be merged and then rebase on top of it.
Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
As mentioned in #1645, if you play a rosbag containing
/clock
with--clock
, it will be double-published.This PR excludes
/clock
when --clock is specified.before
after