ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Wouldn't a simple script like this fix your problem?

set -e
ros2 launch phase1 phase1.launch.py
ros2 launch phase2 phase2.launch.py

All you have to do is make sure that when phase1 exits, it does so with status code zero (simply do exit(0) when you reach success condition in your code)

but as pablo commented it seems to be over complicating things. You can also launch both nodes at once, and simply trigger the phase2 with a service call or via a topic.