Ask Your Question

Revision history [back]

Instead of killing the roslaunch process directly you want to send a SIGINT message to it so that it will shutdown in as if ctrl+c had been pressed in the terminal. There are many ways to go about this, the simplest being to execute a shell command using QProcess the same way you've have started roslaunch in the first place.

kill -SIGINT processPIDHere

Hope this helps.