removing and immediately re-adding a node to the EventsCBGExecutor leaves its entities unregistered

オープン
#3,418 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@skyegalaxy がすでに取り組んでいます。

2026年11月17日 から。

  • #3427 @aryankalantri による — オープン

評価

この issue はまだ評価されていません。

説明

bug
Generated by Generative AI

Found using Claude Opus 5.5

Operating System:

Ubuntu 26.04 (x86_64) (inside a rolling developer container)

ROS version or commit hash:

rolling 917c1240

RMW implementation (if applicable):

rmw_fastrtps_cpp

RMW Configuration (if applicable):

No response

Client library (if applicable):

rclcpp

'ros2 doctor --report' output
ros2 doctor --report
<COPY OUTPUT HERE>
Steps to reproduce issue

Spin an EventsCBGExecutor, then call remove_node(node) immediately followed by add_node(node):

rclcpp::executors::EventsCBGExecutor executor(rclcpp::ExecutorOptions(), 2);
auto node = std::make_shared<rclcpp::Node>("n");
auto timer = node->create_wall_timer(5ms, [&]() {timer_calls++;});
auto sub = node->create_subscription<std_msgs::msg::Empty>("t", 10, [&](auto) {sub_calls++;});
executor.add_node(node);
std::thread spin([&]() {executor.spin();});
// ... timer and subscription are running ...

executor.remove_node(node);
executor.add_node(node);
// timer_calls and sub_calls never increase again

Reproducer gist here: https://gist.github.com/skyegalaxy/715297510b38d222035c960c3c66f60d

Expected behavior

After add_node() the node's timer, subscription, and other entities run again, as they do with the
SingleThreadedExecutor and the MultiThreadedExecutor.

Actual behavior

None of the node's entities run again. The timer never fires and the subscription never receives a message.
With a 30 ms pause between remove_node() and add_node(), everything works again.

Additional information

No response

主要言語
C++
スター
829
フォーク
587
平均マージ
4日 6時間
マージ済み PR(30日)
30

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ros2/rclcpp のほかの issue

ros2/rclcpp の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。