ros2 / launch_ros

Tools for launching ROS nodes and for writing tests involving ROS nodes.
Apache License 2.0
59 stars 73 forks source link

Create option for automatic bringup of lifecycle nodes in launch_ros API #418

Open SteveMacenski opened 2 weeks ago

SteveMacenski commented 2 weeks ago

Feature request

Feature description

Currently, transitioning up a lifecycle node can be done via an external node, lifecycle manager, or using Opaque functions with some rather nasty looking boilerplate with events. The event-based solution only works for LifecycleNode as that has the implementations for getting the states required. However, a ComponentNode can also be a lifecycle node and there is no way to my knowledge to perform lifecycle operations in launch_ros directly on the ComponentNode object.

It would be nice if there was a LifecycleNode and ComponentNode field for active_on_bringup (or eq.) that incorporated this boilerplate to make this easier as many users of lifecycle nodes don't truly care to transition up and control the lifecycle of all their programs with such granularity. Default false is good not to do it automatically unless specified, but this is a very common need that has alot of hacky solutions across the ecosystem.

Implementation considerations

I don't think there are any unique implementation considerations.

mjcarroll commented 2 weeks ago

This would be an excellent addition. Do you have any bandwidth to work on it right now? Alternatively does it make sense to discuss at the PMC meeting?

SteveMacenski commented 2 weeks ago

I’m already traveling for ROSCon / ROSI and board meetings, so I won’t be able to work on this for at least a month. I’m reporting as a ‘nice to have’ enhancement that’s come up in discussions in the Nav2 community enough times now I figure it has general community interest.

Maybe in December I could take a look, but if someone else has interest and capacity, I’m happy to hand it off.