Conversation
christophebedard
left a comment
There was a problem hiding this comment.
Unfortunately, we have to consider multiple things:
- By default, this should probably behave like it did before, i.e., it should consider all values. The tests are currently failing because this is not the case.
- Tests should be added to cover the case where a window is used (probably in
test/moving_average_statistics/test_moving_average_statistics.cpp). - Finally: How would an end user use this? In this case, this code is ultimately used in
rclcpp(seerclcpp::topic_statistics::SubscriptionTopicStatistics). From looking at the subscription creation code inrclcpp, there is no way to provide awindow_sizevalue.- One solution might be to add a
window_sizeoption toTopicStatisticsOptions: https://github.com/ros2/rclcpp/blob/9c493c4615aee3b5cbc68e9101b588564869b5dc/rclcpp/include/rclcpp/subscription_options.hpp#L69-L85 - Then this would be used here: https://github.com/ros2/rclcpp/blob/9c493c4615aee3b5cbc68e9101b588564869b5dc/rclcpp/include/rclcpp/create_subscription.hpp#L56
- We have to figure out which statistics this should affect.
- One solution might be to add a
@emersonknapp do you have any thoughts on this?
|
I understood points 1 and 2. I noticed this feature in the controller manager, so I thought the user would create an instance, but it turns out that it can be enabled or disabled through the options when subscribing in rclcpp. |
ed4d967 to
87c9821
Compare
include/libstatistics_collector/moving_average_statistics/moving_average.hpp
Outdated
Show resolved
Hide resolved
87c9821 to
74d468c
Compare
emersonknapp
left a comment
There was a problem hiding this comment.
Thanks for making the updates! Looks good to me ![]()
|
Pulls: #210 |
Signed-off-by: Tatsuro Sakaguchi <tatsuro.sakaguchi@g.softbank.co.jp>
Signed-off-by: Tatsuro Sakaguchi <tatsuro.sakaguchi@g.softbank.co.jp>
Signed-off-by: Tatsuro Sakaguchi <tatsuro.sakaguchi@g.softbank.co.jp>
Signed-off-by: Tatsuro Sakaguchi <tatsuro.sakaguchi@g.softbank.co.jp>
Signed-off-by: Tatsuro Sakaguchi <tatsuro.sakaguchi@g.softbank.co.jp>
Signed-off-by: Tatsuro Sakaguchi <tatsuro.sakaguchi@g.softbank.co.jp>
74d468c to
d73961f
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## rolling #210 +/- ##
==========================================
Coverage ? 22.24%
==========================================
Files ? 38
Lines ? 1425
Branches ? 203
==========================================
Hits ? 317
Misses ? 1105
Partials ? 3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Since we're in the Kilted feature freeze, and since this is part of the ROS Base packages ( |
christophebedard
left a comment
There was a problem hiding this comment.
Looks good to me! But like I said we'll have to wait until we create a kilted branch next week before merging this.
|
@christophebedard what's the status of this PR, can we merge it ? |
|
Pulls: #210 |
|
friendly ping @christophebedard |
1 similar comment
|
friendly ping @christophebedard |
|
@ahcorde, I think this branch has become somewhat outdated. Someone needs to rebase it on top of the latest Rolling and rerun the CI. |
I have added a window size to calculate the moving average