How do I launch nodes programmatically in ROS2?
In particular, how do do LaunchService.run() in the background? It doesn't let me put it in a threading.Thread. I want to be able to run it and stop it at will based on other factors, without blocking the main thread.
Is the best way to have my Python node write a launch file to /tmp/some_temp_launch_file.py and then use subprocess to call "ros2 launch" on that file or is there a more elegant way?
Thanks.