rosmaster zombie
I know zombie node can exist but is zombie master possible too?
With the following step, I keep getting rosgraph.masterapi.Master
instance even after I stop master
, which is not my intent. What's wrong?
- Run
master
(eg. byroscore
) - Run
$ rosrun turtlesim turtlesim_node
- Run the python script I cite at the bottom. It keeps printing the instance info.
- Stop
master
. Surprisingly, print continues with the same content.
After 3, both 2 processes with the names roscore
and rosmaster --core
don't seem to be running. Stopping turtlesim
when master
is already stopped doesn't change anything. I suspect rosmaster could be sustaining even after it's shut down?
Code:
#!/usr/bin/env python
import time
import rosgraph
import rosnode
def prv_master_rosnode():
master = rosgraph.Master('/rosnode')
print 'master={}'.format(master)
rosn = rosnode.get_api_uri(master, '/turtlesim')
print 'rosnode obj={}'.format(rosn)
def prv_master_rosnode_iterate():
while True:
prv_master_rosnode()
time.sleep(1)
if __name__ == '__main__':
prv_master_rosnode_iterate()
Printed:
master=<rosgraph.masterapi.Master object at 0x7fc400553fd0>
rosnode obj=http://ramenrobot:52240/
master=<rosgraph.masterapi.Master object at 0x7fc400553fd0>
rosnode obj=http://ramenrobot:52240/
master=<rosgraph.masterapi.Master object at 0x7fc400553fd0>
rosnode obj=http://ramenrobot:52240/
: (never changes, never stops)
- ros-groovy-rosnode 1.9.44-0quantal-20130326-0855-+0000
- ros-groovy-rosgraph 1.9.44-0quantal-20130325-0834-+0000