ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
However, I am unable to stop the roscore process with roscore_process.kill().
It seems that the roscore program creates a parent process that spawns multiple children processes (i assume: rosmaster, parameter server, rosout...). This can also be seen with top or htop. Therefore calling roscore_process.kill() only kills one of the children.
Just for completion in case you want to use the subprocess approach: You need to cleanly kill all processes like described in this example.