-
Notifications
You must be signed in to change notification settings - Fork 201
Conditional deserialization of message for ros2 topic hz
#1005
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
Conversation
…ter` argument is provided. Signed-off-by: Kostubh Khandelwal <khandelwalkostubh@gmail.com>
fujitatomoya
left a comment
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.
lgtm with green CI.
|
@exMachina316 thank you very much for taking care of this 👍 |
|
Pulls: #1005 |
|
IMO, this enhancement would be nice to backport to humble and jazzy. |
|
I wonder how this affects/improves performance, especially for #843. |
Signed-off-by: Kostubh Khandelwal <khandelwalkostubh@gmail.com>
|
@ros-pull-request-builder retest this please |
|
@Mergifyio backport jazzy humble |
✅ Backports have been createdDetails
|
Signed-off-by: Kostubh Khandelwal <khandelwalkostubh@gmail.com> (cherry picked from commit bfc5245) # Conflicts: # ros2topic/ros2topic/verb/hz.py
Signed-off-by: Kostubh Khandelwal <khandelwalkostubh@gmail.com> (cherry picked from commit bfc5245) # Conflicts: # ros2topic/ros2topic/verb/hz.py
…1005) (#1006) Signed-off-by: Kostubh Khandelwal <khandelwalkostubh@gmail.com> (cherry picked from commit bfc5245) Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> Co-authored-by: Kostubh Khandelwal <123073764+exMachina316@users.noreply.github.com> Co-authored-by: Christophe Bedard <bedard.christophe@gmail.com>
…1005) (#1007) Signed-off-by: Kostubh Khandelwal <khandelwalkostubh@gmail.com> (cherry picked from commit bfc5245) Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> Co-authored-by: Kostubh Khandelwal <123073764+exMachina316@users.noreply.github.com> Co-authored-by: Christophe Bedard <bedard.christophe@gmail.com>
Fixes #983
Added a conditional statement to set the
rawflag when creating subscriptions for topics based on the value offilter_expr. If the--filterflag is used,filter_expris not None and deserializing subscriptions are created. Otherwisefilter_expris None and 'raw' subscriptions are created.As for the
bwverb, it already uses 'raw' subscriptions and there is no case where desrialization of topics is required. Hence no changes made there.Manual Testing
$ ros2 topic hz /topic average rate: 2.002 min: 0.500s max: 0.500s std dev: 0.00000s window: 1 average rate: 2.000 min: 0.499s max: 0.501s std dev: 0.00105s window: 3 average rate: 2.000 min: 0.499s max: 0.501s std dev: 0.00084s window: 5$ ros2 topic hz /topic --filter 'int(m.data.rpartition(\"! \")[-1]) % 2 == 0' average rate: 1.000 min: 1.000s max: 1.000s std dev: 0.00000s window: 1 average rate: 1.000 min: 0.999s max: 1.000s std dev: 0.00024s window: 2 average rate: 1.000 min: 0.999s max: 1.001s std dev: 0.00065s window: 3