Skip to content
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

[FEA] check the possibility of merging the patch from concurrentreal-time/ros2_patches. #92

Open
ZhenshengLee opened this issue Sep 12, 2023 · 1 comment

Comments

@ZhenshengLee
Copy link

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Recently I've read the white paper book Bringing Hard Real-Time to ROS 2 with RedHawk Linux https://concurrent-rt.com/wp-content/uploads/2022/10/using-ros-2-on-redhawk-linux.pdf

When running the pendulum demo, it is observed that the latency of the first iteration is much higher
than the rest of the iterations. This outlier is caused by the demo not being loaded into cache. In
some cases, the initial cache misses of a program when it first starts up can be ignored. Concurrent
Real-Time provides a custom patch for the pendulum demo that adds the ability to clear the current
statistics while the demo is running. In addition, the patch also improves the initial performance of
the pendulum demo when it first starts up. Follow the instructions below to install the patch:

And the comany provided the patches for the repo,
https://github.com/concurrentreal-time/ros2_patches/blob/master/demos_patch.patch
https://github.com/concurrentreal-time/ros2_patches/blob/master/rttest_patch.patch

The patched pendulum demo greatly helped reduce the worst-case latency for both RedHawk and
Ubuntu environments. Ubuntu had a worst case of 420 microseconds, outperforming the unpatched
version by over 3,080 microseconds as shown in Figure 4. RedHawk experienced a worst-case
latency of 1.45 microseconds, which was a 40.55 microsecond improvement over its unpatched
counterpart as shown Figure 5. In addition, RedHawk was able to keep its average latency much
closer to its best-case, with its average latency only being 0.2 microseconds off its best-case.

Describe the solution you'd like
A clear and concise description of what you want to happen.

  1. Check if the bug reported by the comany still exists in the patched-ubuntu-linux-kernel.
  2. Apply the patch to the main stream
  3. Merge the PR

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Read more materials about the white paper to get more hints.

Additional context
Add any other context or screenshots about the feature request here.

Happy to see the potential possibility to use ros2 in a strictly controlled os.

@carlossvg
Copy link
Contributor

carlossvg commented Oct 9, 2023

@ZhenshengLee Than you for reporting this. I was not aware of that white paper.

Regarding the issue and the patches, I already commented about this here ros2/realtime_support#117. In my opinion, instead of removing the first sample it would be better to fix the first latency spike. But I think it's fine to add some the functionality to clear the statistics. It seems a PR already exists to do that: https://github.com/ros2/realtime_support/pull/118/files

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

No branches or pull requests

2 participants