I am using ROS2, and writing Python Launch files.
Let’s say I have a launch file, L1 that starts node L1N1.
Then I have another launch file, L2, that can start node L2N1 on a specific condition.
The way I am running these Launch files is, that I am including the launch description of L1 into L2, this means that L2 starts running L2N1, and now I want to condition the execution of my node L2N2, on the basis of the state of L1N2.
Is there a way to register an event handler on the state of node L1N1, executed by the launch file L1,
that was included inside the same launch file L2?