run ros2 nodes on the fly using python API

asked 2021-01-22 02:29:10 -0500

txlei gravatar image

Hi, new to ros2 architecture. Like to know whats the equivalent of ros2 run and ros2 launch, using python API ? I looked at the launch python library but most tutorials are on changing of params. I need to write a ros2 application that requires me to create nodes on the fly based on certain situation.

i.e. not using terminal and the ros2 run and ros2 launch commands to launch nodes. specifically, the required node(s) is from a cpp package in the same workspace, I also have the .launch.xml file ready to be use if possible. tyvm

edit retag flag offensive close merge delete