-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Following in the footsteps of the lifecycle publisher, enable the subscription, action server, action client, service server, and service client to have an activate and deactivate method for lifecycle enablement.
These should be added as managed entities and update the Nav2 Task Servers to call a new method nav2::LifecycleNode::activateInterfaces() and complimentary in deactivation so that these are all automatically activated and deactivated behind the scenes. Update the task servers to remove the manual activation and deactivation. We do need to take some care that the instantiation of the interfaces then are ordered since some subscription callbacks might depend on some publishers activation or existence. So we should be creating all exporters (i.e. action clients, service clients, publishers) before consumers (i.e. actions, services, subscribers) -- and deactivating all consumers before exporters (inverted).
On top, in the nav2 lifecycle node, we should autoactivate if the node is already activated when an interface is created (see nav2::Publisher for example)