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

GuardConditions sometimes don't get triggered for Fast DDS #105

Open
hoffmann-stefan opened this issue May 19, 2023 · 0 comments
Open

GuardConditions sometimes don't get triggered for Fast DDS #105

hoffmann-stefan opened this issue May 19, 2023 · 0 comments

Comments

@hoffmann-stefan
Copy link
Member

This was reported to the rcl repository as well, but got closed there as they asked for a minimal example in c/c++ ros2/rcl#989

#103 added support for GuardConditions in ros2_dotnet.
The rcldotnet_guard_condition example node can reproduce this problem for me reliably on foxy (Ubuntu 20.04), humble and rolling (both Ubuntu 22.04) using the Fast DDS middleware. Using Cyclone DDS there is no problem.

Steps to reproduce

Build the ros2_dotnet workspace as described in the README.md.
Do this each in a new terminal, once for rmw_fastrtps_cpp and once for rmw_cyclonedds_cpp:

cd ros2_dotnet_ws/
source install/setup.bash
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
ros2 run rcldotnet_examples rcldotnet_guard_condition
cd ros2_dotnet_ws/
source install/setup.bash
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
ros2 run rcldotnet_examples rcldotnet_guard_condition

Both should print out messages like this indefinitely, see changing timestamps on the output:

ros2 run rcldotnet_examples rcldotnet_guard_condition
RMWIdentifier: rmw_fastrtps_cpp
2023-05-19T17:01:49.6250316+02:00 ThreadId: 1 - Initial trigger of GuardCondition.
2023-05-19T17:01:49.6379550+02:00 ThreadId: 1 - GuardCondition was triggered.
2023-05-19T17:01:50.6401007+02:00 ThreadId: 4 - Triggered GuardCondition.
2023-05-19T17:01:50.6401927+02:00 ThreadId: 1 - GuardCondition was triggered.
2023-05-19T17:01:51.6406326+02:00 ThreadId: 4 - Triggered GuardCondition.
2023-05-19T17:01:51.6406868+02:00 ThreadId: 1 - GuardCondition was triggered.
2023-05-19T17:01:52.6410867+02:00 ThreadId: 4 - Triggered GuardCondition.
2023-05-19T17:01:52.6410960+02:00 ThreadId: 1 - GuardCondition was triggered.
2023-05-19T17:01:53.6415770+02:00 ThreadId: 4 - Triggered GuardCondition.
2023-05-19T17:01:53.6416664+02:00 ThreadId: 1 - GuardCondition was triggered.
2023-05-19T17:01:54.6420948+02:00 ThreadId: 4 - Triggered GuardCondition.

But after some time the example node using Fast DDS stops outputting new log messages.
I never saw Cyclone DDS stopping even after running this example for some hours.

If someone wants to help you could try this out on your machine and report back if you can reproduce the issue using both middleware implementations.

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

No branches or pull requests

1 participant