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

Đang mở
#3,418 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@skyegalaxy đang làm issue này rồi.

Từ ngày 17/11/2026.

  • #3427 của @aryankalantri — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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

Ngôn ngữ chính
C++
Star
829
Fork
587
Merge trung bình
4 ngày 6 giờ
Pull request đã merge (30 ngày)
30

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ros2/rclcpp

Tất cả issue của ros2/rclcpp

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.