removing and immediately re-adding a node to the EventsCBGExecutor leaves its entities unregistered
维护者通常 1 天内回复
评估
这个 Issue 还没有评估数据。
描述
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 小时
- 30 天内合并 PR
- 30
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ros2/rclcpp 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
维护者通常 1 天内回复
-
Memory grows per callback group created and destroyed on long lived nodes可能已有人在做 @jwallace42 于 1 天前认领。 未关闭bug
难度 4/5 3-5 天 新手友好度 28/100
ros2/rclcpp#3428 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Humble] Removing a node with more than one auto-added callback group leaves a dangling guard condition in the executor可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 55/100
维护者通常 1 天内回复
-
Copy constructor exception leaks intra-process message allocation可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 3/5 1-2 天 新手友好度 35/100
维护者通常 1 天内回复
相似的 Issue
-
bug
难度 1/5 1-3 小时 新手友好度 82/100
EchoTools/nevr-runtime#2912 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 1 天内回复
-
category:port-update
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
-
bug-unconfirmed
难度 1/5 1 小时以内 新手友好度 75/100
维护者通常 1 天内回复
-
libc++
难度 1/5 1 小时以内 新手友好度 88/100
llvm/llvm-project#246508 ·
维护者通常 1 天内回复