Skip to content

Add window size#210

Open
Tacha-S wants to merge 6 commits intoros-tooling:rollingfrom
Tacha-S:feature/window-size
Open

Add window size#210
Tacha-S wants to merge 6 commits intoros-tooling:rollingfrom
Tacha-S:feature/window-size

Conversation

@Tacha-S
Copy link

@Tacha-S Tacha-S commented Feb 20, 2025

I have added a window size to calculate the moving average

@Tacha-S Tacha-S requested a review from a team as a code owner February 20, 2025 00:11
@Tacha-S Tacha-S requested review from MichaelOrlov and emersonknapp and removed request for a team February 20, 2025 00:11
Copy link
Member

@christophebedard christophebedard left a comment

Choose a reason for hiding this comment

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

Unfortunately, we have to consider multiple things:

  1. 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.
  2. Tests should be added to cover the case where a window is used (probably in test/moving_average_statistics/test_moving_average_statistics.cpp).
  3. Finally: How would an end user use this? In this case, this code is ultimately used in rclcpp (see rclcpp::topic_statistics::SubscriptionTopicStatistics). From looking at the subscription creation code in rclcpp, there is no way to provide a window_size value.

@emersonknapp do you have any thoughts on this?

@Tacha-S
Copy link
Author

Tacha-S commented Feb 21, 2025

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.

@Tacha-S Tacha-S force-pushed the feature/window-size branch from ed4d967 to 87c9821 Compare February 21, 2025 09:29
@Tacha-S Tacha-S force-pushed the feature/window-size branch from 87c9821 to 74d468c Compare February 25, 2025 01:08
Copy link
Member

@emersonknapp emersonknapp left a comment

Choose a reason for hiding this comment

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

Thanks for making the updates! Looks good to me :shipit:

@emersonknapp
Copy link
Member

emersonknapp commented Apr 15, 2025

Pulls: #210
Gist: https://gist.githubusercontent.com/emersonknapp/48d2d4f9dfc18c1a2c3724f80b2ad482/raw/e0539bcc3241c19ede2ef7af02ad13e11a3121a8/ros2.repos
BUILD args: --packages-above-and-dependencies libstatistics_collector
TEST args: --packages-above libstatistics_collector
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/15705

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

Tacha-S added 6 commits April 15, 2025 10:30
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>
@codecov
Copy link

codecov bot commented Apr 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (rolling@ec4d751). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             rolling     #210   +/-   ##
==========================================
  Coverage           ?   22.24%           
==========================================
  Files              ?       38           
  Lines              ?     1425           
  Branches           ?      203           
==========================================
  Hits               ?      317           
  Misses             ?     1105           
  Partials           ?        3           
Flag Coverage Δ
unittests 22.24% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@christophebedard
Copy link
Member

christophebedard commented Apr 15, 2025

Since we're in the Kilted feature freeze, and since this is part of the ROS Base packages (rclcpp depends on this), we can't merge this until we branch Kilted off of Rolling next Monday.

Copy link
Member

@christophebedard christophebedard left a comment

Choose a reason for hiding this comment

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

Looks good to me! But like I said we'll have to wait until we create a kilted branch next week before merging this.

@ahcorde
Copy link
Contributor

ahcorde commented Oct 2, 2025

@christophebedard what's the status of this PR, can we merge it ?

@ahcorde
Copy link
Contributor

ahcorde commented Oct 2, 2025

Pulls: #210
Gist: https://gist.githubusercontent.com/ahcorde/0114ff033fb17a01ac19807c5d01d27c/raw/79e75aba70670e056cbc42fbd51829ad0bfc1578/ros2.repos
BUILD args: --packages-above-and-dependencies libstatistics_collector
TEST args: --packages-above libstatistics_collector
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/17130

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@ahcorde
Copy link
Contributor

ahcorde commented Oct 14, 2025

friendly ping @christophebedard

1 similar comment
@ahcorde
Copy link
Contributor

ahcorde commented Nov 6, 2025

friendly ping @christophebedard

@MichaelOrlov
Copy link
Member

@ahcorde, I think this branch has become somewhat outdated. Someone needs to rebase it on top of the latest Rolling and rerun the CI.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable setting window size for MovingAverageStatistics

5 participants