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

Test case and fix for for https://github.com/ros2/rclcpp/issues/2652 #2713

Open
wants to merge 4 commits into
base: rolling
Choose a base branch
from

Conversation

jmachowinski
Copy link
Contributor

@jmachowinski jmachowinski commented Dec 17, 2024

This is a test case and fix for the bug #2652

@jmachowinski jmachowinski changed the title Test case for https://github.com/ros2/rclcpp/issues/2652 Test case and fix for for https://github.com/ros2/rclcpp/issues/2652 Dec 17, 2024
@jmachowinski
Copy link
Contributor Author

@luca-della-vedova @fmrico can you test this fix ?

@jmachowinski jmachowinski marked this pull request as ready for review December 17, 2024 17:20
timer1_works = false;
timer2_works = false;
max_end_time = std::chrono::steady_clock::now() + std::chrono::milliseconds(100);
while(!timer1_works && !timer2_works) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we keep checking timer2_works after calling timer2.reset(); ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To be sure, the first callback does not occur any more. Also there was code before, were I tried to figure out the order in the executor, but I gave up on that after reading the documentation of unordered map.

Copy link
Contributor

@luca-della-vedova luca-della-vedova left a comment

Choose a reason for hiding this comment

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

I tried on the reproduction repo and this branch indeed fixes it!

Janosch Machowinski added 3 commits December 18, 2024 13:06
@fmrico
Copy link
Contributor

fmrico commented Dec 19, 2024

@luca-della-vedova @fmrico can you test this fix ?

Sure!! testing...

@fmrico
Copy link
Contributor

fmrico commented Dec 19, 2024

I have tested this PR against:

Everything is working now: LGTM 🔥 🚀

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.

4 participants