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

I have needed to do a similar launching process,and I found two possible methods. Two possible methods:

  1. Roslaunch has an API, with which you can achieve your desired result. More specifically the Roslaunchrunner has function called launchnode. However this API is very experimental, and does occasionally crash
  2. Other alternative, make your own .launch file, and then have your node run it at command line.

Obviously, 1 is more desirable. But I ended up using 2 as its more stable, at least that is what I found

For 2, in C++ you could use the system command. In python you can use os.system or more advisably subprocess library

I hope this helpful

Guy

I have needed to do a similar launching process,and I found two possible methods. Two possible methods:

  1. Roslaunch has an API, with which you can achieve your desired result. More specifically the Roslaunchrunner has function called launchnode. However this API is very experimental, and does occasionally crash
  2. Other alternative, make your own .launch file, and then have your node run it at command line.

Obviously, 1 is more desirable. But I ended up using 2 as its more stable, at least that is what I found

For 2, in C++ you could use the system command. In python you can use os.system or more advisably subprocess library

I hope this helpfulhelpful. SORRY it wouldnt let me leave it as an answer

Guy