Unify LifecycleNode and Node
Los mantenedores suelen responder en 1 día
@mjcarroll ya está trabajando en esto.
Desde el 10/7/2025.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Description
Currently rclcpp_lifecycle::LifecycleNode and rclcpp::Node are two distinct classes that both implement the common node interface, but LifecycleNode exposes the lifecycle management features. It would be nice to have a common interface that exposes flexible controls for using lifecycle capabilities or not.
I think that if we were to merge the interfaces together, it would be nice to have it be completely runtime configurable. It seems like there are 3 possible configurations. To expose all 3 of these behaviors, maybe we could expose the following ros arg or special ros parameter (similar to use_sim_time) with 3 different values. Let's call this argument/parameter lifecycle.
lifecycle=manual: Current LifecycleNode behavior: expose publisher and services, and don’t auto transition.lifecycle=none: Current Node behavior, but with “auto-transition”: don’t expose publisher and services, and call any configure and activate methods as if they are part of the constructor, and deactivate and cleanup methods as if they are part of the destructor. If the configure or activate methods fail, just fail the constructor. Maybe we would want to consider that if the node transitions itself out of active killing the node, but that might be too implementation dependent.lifecycle=auto: Current LifecycleNode behavior, but with auto transition. You may want the convenience of having the configure and activate transitions on startup and deactivate and cleanup methods on shutdown, but you also want to be able to control the state transitions externally. This could be important because I have seen some LifecycleNodes be written to automatically deactivate themselves on errors, or to fail to configure or activate in the first place depending on conditions.
Motivation
Some people swear by ROS 2 lifecycle and encourage making everything use LifecycleNode. Others don't want the additional complexity and failure points introduced by LifecycleNode, and would rather manage lifecycle using different systems or abstractions. This puts library maintainers in the difficult position where they can either implement one, or implement two versions of their nodes: one lifecycle and one not. If they don't implement one, then lifecycle users may look to put that code in a wrapper or fork it to implement lifecycle, and non-lifecycle users are forced to add lifecycle management code to their project when they wouldn't otherwise (or fork and remove lifecycle). This creates additional friction between libraries and users. A unified, runtime-configurable API would give everyone what they want with no burden on library maintainers.
Design / Implementation Considerations
We may want to merge the rclcpp_lifecycle package into rclcpp. Although this change doesn't necessarily need to affect LifecyclePublisher for example, unless we take on merging all managed entities.
Additional Information
- Lenguaje dominante
- C++
- Estrellas
- 814
- Forks
- 572
- Merge medio
- 4 d 2 h
- PR fusionados (30 d)
- 21
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ros2/rclcpp
-
Backport #2353 to humble (-Wpessimizing-move in intra_process_manager.hpp)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
[Jazzy] action server registers clock jump callbacks without the clock mutex (heap corruption)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 44/100
Los mantenedores suelen responder en 1 día
-
EventsCBGExecutor segfaults when a timer is removed while its callback is runningPosiblemente ocupada @spurnvoj la tomó hace 3 días. Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
EventsCBGExecutor keeps queued events of removed nodes, component container segfaults on shutdownPosiblemente ocupada @spurnvoj la tomó hace 3 días. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 18/100
Los mantenedores suelen responder en 1 día
Todos los issues de ros2/rclcpp
Issues similares
-
Component: Python API
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Vector35/binaryninja-api#8649 ·
Los mantenedores suelen responder en 3 días
-
ai_p2 comp-parquet-reader-v3
Dificultad 2/5 Medio día Aptitud para principiantes 66/100
ClickHouse/ClickHouse#124986 ·
Los mantenedores suelen responder en 1 día
-
bug product: very_good_flutter_plugin
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
VeryGoodOpenSource/very_good_templates#654 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
AcademySoftwareFoundation/OpenImageIO#5550 ·
Los mantenedores suelen responder en 2 días