nobleo / static_executor Goto Github PK
View Code? Open in Web Editor NEWLibrary that adds alternative(s) to the default executor in ROS2
License: Apache License 2.0
Library that adds alternative(s) to the default executor in ROS2
License: Apache License 2.0
I'm investigating spurious awakes in both the standard and this executor.
See ros2/rclcpp#1021 for the standard executor
The problem mentioned in the ticket above does not appear in the static executor when I run that dummy executable with only 1 timer.
However, if I run a system made of 2 nodes (1 pub and 1 sub) in the same executor with IPC on, I see the exact same pattern.
I think that the root cause is how the static executor handles the waitable objects:
in each "iteration" of the static executor:
is_ready()
condition, that in this case consists in checking if the buffer is not empty. Since a message has just been pushed, the IPC subscription is invoked.@MartinCornelis2 what do you think? I think that this problem with IPC is not present with the standard executor because only 1 item is processed in every iteration and the waitables are managed by the memory strategy.
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
[ERROR] [1584978899.809709877] [rclcpp]: Couldn't add guard_condition to wait set: guard_conditions set is full, at /root/ros2_ws/src/ros2/rcl/rcl/src/rcl/wait.c:456
terminate called after throwing an instance of 'std::runtime_error'
what(): Couldn't fill wait set
Aborted (core dumped)
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.