Skip to content

Commit b562f49

Browse files
committed
Merge branch 'main' into irobot/humble-gcc-8
2 parents 3bc1231 + 6f4343f commit b562f49

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

README.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ The extensibility of the `EventsExecutor` comes from the fact that this core com
1818
For example in this repository we also include an extension that uses a lock-free queue, based on this great [concurrent queue](https://github.com/cameron314/concurrentqueue) implementation.
1919
Other extensions would allow to bound the queue or enforce deterministic execution constraints.
2020

21+
## Known bugs and limitations
22+
23+
The iRobot team is actively working to address these items.
24+
25+
- The executor is not notified when a ROS 2 timer is reset.
26+
- Enabling Intra-Process Optimization in rclcpp can result in [a runtime exception](https://github.com/ros2/rclcpp/blob/rolling/rclcpp/include/rclcpp/experimental/buffers/ring_buffer_implementation.hpp#L90).
27+
- The executor is broken with Fast-DDS in Humble. The following PR fixes the problem: https://github.com/ros2/rmw_fastrtps/pull/619
28+
2129
## Instructions
2230

2331
This repository provides libraries that can be built/installed alongside a standard ROS 2 installation and give access to the `EventsExecutor` class and its related components.
@@ -35,17 +43,21 @@ To build and run the examples you can do the following:
3543

3644
```
3745
docker run -it osrf/ros:humble-desktop bash
38-
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install ros-humble-test-msgs
46+
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install ros-humble-test-msgs ros-humble-rmw-cyclonedds-cpp
3947
mkdir -p /root/ws/src
4048
cd /root/ws/src
4149
git clone https://github.com/irobot-ros/events-executor.git
4250
cd ..
4351
colcon build
4452
source install/setup.sh
53+
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
4554
ros2 run events_executor_examples hello_events_executor
4655
```
4756

48-
## rclcpp PRs
57+
Note how we change the `RMW_IMPLEMENTATION` to CycloneDDS.
58+
In order to use Fast-DDS it's necessary to cherry-pick [this PR](https://github.com/ros2/rmw_fastrtps/pull/619) and re-build the `rmw_fastrtps` package.
59+
60+
## Events Executor PRs
4961

5062
List of Pull Requests that are introducing the `EventsExecutor` in the ROS 2 core repositories.
5163

@@ -63,7 +75,5 @@ List of Pull Requests that are introducing the `EventsExecutor` in the ROS 2 cor
6375

6476
- https://github.com/ros2/design/pull/305
6577
- https://github.com/ros2/rclcpp/pull/1891
66-
67-
## Known bugs and limitations
68-
69-
- The `EventsExecutor` is not notified when a ROS 2 timer is reset.
78+
- https://github.com/ros2/rclcpp/pull/1979
79+
- https://github.com/ros2/rcl/pull/995

irobot_events_executor/include/rclcpp/timers_manager.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,8 @@ class TimersManager
487487
std::thread timers_thread_;
488488
// Protects access to timers
489489
rclcpp::RecursiveMutex timers_mutex_;
490+
// Protects access to stop()
491+
std::mutex stop_mutex_;
490492
// Notifies the timers thread whenever timers are added/removed
491493
rclcpp::ConditionVariable timers_cv_;
492494
// Flag used as predicate by timers_cv_ that denotes one or more timers being added/removed

irobot_events_executor/src/rclcpp/timers_manager.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ void TimersManager::start()
5959

6060
void TimersManager::stop()
6161
{
62+
// Lock stop() function to prevent race condition in destructor
63+
std::unique_lock<std::mutex> lock(stop_mutex_);
6264
// Nothing to do if the timers thread is not running
6365
// or if another thread already signaled to stop.
6466
if (!running_.exchange(false)) {

0 commit comments

Comments
 (0)