Skip to content

Conversation

@andermi
Copy link
Contributor

@andermi andermi commented May 13, 2022

Rate logic added to #38.
Computes rates of received messages and pivots on fastest topic; essentially, upsamples slower topics with a zero-order hold.

andermi added 2 commits May 13, 2022 10:04
Signed-off-by: Michael Anderson <anderson@mbari.org>
@andermi andermi marked this pull request as draft May 13, 2022 17:22
@andermi andermi marked this pull request as ready for review May 13, 2022 17:22
@chapulina chapulina self-requested a review May 13, 2022 17:38
Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

I've left a few comments inline.

Besides that, it might be nice to add in some documentation to the top of latest_time.h that describes briefly what this sync policy does, and how to use it.

andermi and others added 4 commits May 16, 2022 11:55
Co-authored-by: Chris Lalancette <clalancette@gmail.com>
Signed-off-by: Michael Anderson <anderson@mbari.org>
Signed-off-by: Michael Anderson <anderson@mbari.org>
Signed-off-by: Michael Anderson <anderson@mbari.org>
@andermi andermi requested a review from clalancette May 16, 2022 19:46
@andermi
Copy link
Contributor Author

andermi commented May 16, 2022

Thanks @clalancette ! I added some some documentation at the top of the header.

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

The functionality works for me. I have some questions and suggestions. Take it all with a grain of salt since it's my first time touching this repo 😄

andermi and others added 3 commits May 17, 2022 12:39
Co-authored-by: Louise Poubel <louise@openrobotics.org>
…ne is selected

Signed-off-by: Michael Anderson <anderson@mbari.org>
@andermi andermi requested a review from chapulina May 18, 2022 00:34
andermi added 3 commits May 18, 2022 11:39
Signed-off-by: Michael Anderson <anderson@mbari.org>
Signed-off-by: Michael Anderson <anderson@mbari.org>
Signed-off-by: Michael Anderson <anderson@mbari.org>
andermi added 3 commits May 18, 2022 17:23
Signed-off-by: Michael Anderson <anderson@mbari.org>
Signed-off-by: Michael Anderson <anderson@mbari.org>
Signed-off-by: Michael Anderson <anderson@mbari.org>
Copy link
Contributor

@chapulina chapulina 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 iterating, LGTM! I'd appreciate a review from one of the maintainers though.

Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

Overall, looks pretty good to me. I've left a few things inline that I think we should address.

andermi and others added 2 commits June 3, 2022 12:56
Co-authored-by: Chris Lalancette <clalancette@gmail.com>
…igs; other PR comments

Signed-off-by: Michael Anderson <anderson@mbari.org>
@andermi
Copy link
Contributor Author

andermi commented Jun 6, 2022

@clalancette I think/hope I've addressed your comments.

@andermi andermi requested a review from clalancette June 6, 2022 22:33
Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

All right, one last pass. Once these things are fixed, we'll be ready to run CI on it.

Signed-off-by: Michael Anderson <anderson@mbari.org>
Copy link
Contributor

@clalancette clalancette 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! The next step here is to run CI, but we are currently having some infrastructure issues with CI. Once those are resolved I'll do the CI run.

@clalancette
Copy link
Contributor

CI:

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

@andermi
Copy link
Contributor Author

andermi commented Jun 8, 2022

  • Windows Build Status

ugh... timing in windows is unstable in general 😝 . I think I can fix it.

Signed-off-by: Michael Anderson <anderson@mbari.org>
@andermi
Copy link
Contributor Author

andermi commented Jun 8, 2022

I actually did find a small intermittent bug

@clalancette
Copy link
Contributor

Let's run Windows CI again to see where we are at: * Windows Build Status

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

It looks like there are some Windows warnings being introduced by this PR:

https://ci.ros2.org/job/ci_windows/17217/msbuild/new/#issuesContent

@audrow audrow changed the base branch from master to rolling June 28, 2022 14:19
@quarkytale
Copy link

Retriggered CI

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

@quarkytale
Copy link

This is currently blocked by timing issue in windows CI.
There are two EMA filters tuned for Linux:

  1. mean rate for incoming message
  2. mean error from 1 which is similar to stddev

In Linux, a threshold of 10 * EMA#2 is used for detecting if the message rate changed. On windows, the rate change is not being detected the same way.

Signed-off-by: Michael Anderson <anderson@mbari.org>
@andermi
Copy link
Contributor Author

andermi commented Aug 12, 2022

@clalancette, @quarkytale I gave it another shot... I spun up ros2 dev on my windows machine.
The test passes using sim /clock to control the test timing

@quarkytale
Copy link

Retriggered Windows CI Build Status

@andermi
Copy link
Contributor Author

andermi commented Aug 16, 2022

Looks like compiler warnings causing unstable. Working through them now.

Signed-off-by: Michael Anderson <anderson@mbari.org>
@andermi
Copy link
Contributor Author

andermi commented Aug 16, 2022

@quarkytale would you mind running another one? I fixed the 7 msbuild warnings related to conversion from size_t. Can you see anything else to fix first?

@quarkytale
Copy link

I'm not sure if the warnings were an issue, but good to have them cleared. Seems like some tests are being skipped, that might be the reason for unstable status. Other things that stood out to me:

  • [WARNING] [python.exe-3]: 'SIGINT' sent to process[python.exe-3] not supported on Windows, escalating to 'SIGTERM'
  • [-ERROR-] IO exception has been thrown: java.nio.file.NoSuchFileException: C:\ci\ws\src\ros2\message_filters\include\message_filters\sync_policies\latest_time.h

Let's see if any of these persist: Build Status

Copy link

@quarkytale quarkytale left a comment

Choose a reason for hiding this comment

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

LGTM and CI is green!

@gbiggs gbiggs merged commit e0055f3 into ros2:rolling Aug 16, 2022
@adityapande-1995
Copy link

https://github.com/Mergifyio backport humble

@mergify
Copy link

mergify bot commented Mar 9, 2023

backport humble

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Mar 9, 2023
* adding latest time zoh policy

Signed-off-by: Michael Anderson <anderson@mbari.org>

* remove commented code

* Update include/message_filters/sync_policies/latest_time.h

Co-authored-by: Chris Lalancette <clalancette@gmail.com>

* updates from PR comments

Signed-off-by: Michael Anderson <anderson@mbari.org>

* cleanup includes

Signed-off-by: Michael Anderson <anderson@mbari.org>

* adding documentation

Signed-off-by: Michael Anderson <anderson@mbari.org>

* Update include/message_filters/sync_policies/latest_time.h

Co-authored-by: Louise Poubel <louise@openrobotics.org>

* address PR comments; add new test for if pivot changes rate and new one is selected

Signed-off-by: Michael Anderson <anderson@mbari.org>

* adding message rate step change detection and EMA filter reset

Signed-off-by: Michael Anderson <anderson@mbari.org>

* whitespace

Signed-off-by: Michael Anderson <anderson@mbari.org>

* whitespace

Signed-off-by: Michael Anderson <anderson@mbari.org>

* detect if pivot message is late

Signed-off-by: Michael Anderson <anderson@mbari.org>

* add ChangeRateLeading test

Signed-off-by: Michael Anderson <anderson@mbari.org>

* whitespace

Signed-off-by: Michael Anderson <anderson@mbari.org>

* Update include/message_filters/sync_policies/latest_time.h

Co-authored-by: Chris Lalancette <clalancette@gmail.com>

* add option to take instance of rclcpp::Clock; make magic numbers configs; other PR comments

Signed-off-by: Michael Anderson <anderson@mbari.org>

* clean up; handle zero period

Signed-off-by: Michael Anderson <anderson@mbari.org>

* check for late message after avg error is calculated

Signed-off-by: Michael Anderson <anderson@mbari.org>

* control test timing with sim time

Signed-off-by: Michael Anderson <anderson@mbari.org>

* fix msbuild compiler warnings

Signed-off-by: Michael Anderson <anderson@mbari.org>

Signed-off-by: Michael Anderson <anderson@mbari.org>
Co-authored-by: Chris Lalancette <clalancette@gmail.com>
Co-authored-by: Louise Poubel <louise@openrobotics.org>
(cherry picked from commit e0055f3)
quarkytale pushed a commit that referenced this pull request Mar 10, 2023
* adding latest time zoh policy

Signed-off-by: Michael Anderson <anderson@mbari.org>

* remove commented code

* Update include/message_filters/sync_policies/latest_time.h

Co-authored-by: Chris Lalancette <clalancette@gmail.com>

* updates from PR comments

Signed-off-by: Michael Anderson <anderson@mbari.org>

* cleanup includes

Signed-off-by: Michael Anderson <anderson@mbari.org>

* adding documentation

Signed-off-by: Michael Anderson <anderson@mbari.org>

* Update include/message_filters/sync_policies/latest_time.h

Co-authored-by: Louise Poubel <louise@openrobotics.org>

* address PR comments; add new test for if pivot changes rate and new one is selected

Signed-off-by: Michael Anderson <anderson@mbari.org>

* adding message rate step change detection and EMA filter reset

Signed-off-by: Michael Anderson <anderson@mbari.org>

* whitespace

Signed-off-by: Michael Anderson <anderson@mbari.org>

* whitespace

Signed-off-by: Michael Anderson <anderson@mbari.org>

* detect if pivot message is late

Signed-off-by: Michael Anderson <anderson@mbari.org>

* add ChangeRateLeading test

Signed-off-by: Michael Anderson <anderson@mbari.org>

* whitespace

Signed-off-by: Michael Anderson <anderson@mbari.org>

* Update include/message_filters/sync_policies/latest_time.h

Co-authored-by: Chris Lalancette <clalancette@gmail.com>

* add option to take instance of rclcpp::Clock; make magic numbers configs; other PR comments

Signed-off-by: Michael Anderson <anderson@mbari.org>

* clean up; handle zero period

Signed-off-by: Michael Anderson <anderson@mbari.org>

* check for late message after avg error is calculated

Signed-off-by: Michael Anderson <anderson@mbari.org>

* control test timing with sim time

Signed-off-by: Michael Anderson <anderson@mbari.org>

* fix msbuild compiler warnings

Signed-off-by: Michael Anderson <anderson@mbari.org>

Signed-off-by: Michael Anderson <anderson@mbari.org>
Co-authored-by: Chris Lalancette <clalancette@gmail.com>
Co-authored-by: Louise Poubel <louise@openrobotics.org>
(cherry picked from commit e0055f3)

Co-authored-by: andermi <manders9@jhu.edu>
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.

6 participants