Closed alsora closed 4 years ago
The problem was that we were not using the executor's guard condition. Since the last commit we only check for node's guard condition triggered to refresh the executable list, but not executor's. I have already a fix with a new implementation with a waitable approach, I'll open the PR soon
Hi, Thanks for notifying me. I think I will have some time tomorrow to run the unit-tests. Would be good to recreate the issue first on my side and then test again with your new PR.
Closing this. I created real unit-tests from that file, unfortunately I have some issues when GTests are executed in parallel... As soon as I fix them I will open a PR to rclcpp
Hi,
I created a bunch of "unit-tests" for the static executor. They test the following scenarios:
You can find them here https://github.com/alsora/ros2-code-examples/blob/master/simple_static_executor/static_executor_test.cpp
These tests are meant to be used with your rclcpp version (
nobleo/feature/static_executor
), I opened the ticket here since it was not possible in that repo.To build
colcon build --packages-select simple_static_executor
To run./install/simple_static_executor/lib/simple_static_executor/static_executor_test 2
Where the number at the end denotes the id of the test you want to run (1, 2, 3, 4)The results are unfortunately not good.
Test 2 throws an exception
In test 4 the subscription keeps receiving messages after having been removed from the executor
Could you have a look at the test? Maybe I'm not using the executor as it is supposed to be used.
FYI the standard
SingleThreadExecutor
allows to pass all the tests successfully.@MartinCornelis2 @mauropasse