Hi,
I'm trying to develop introspection nodes for ROS. So far I've been able to use some methods in the rosnode API to retrieve information on the nodes and topics from the master, and to execute the kill_node() method, but failing to actually kill the node (it actually returns me a correct list of the nodes it managed to kill and those it couldn't).
Does anyone knows if it a problem with permissions for the node calling that method? Because the command line tool rosnode kill works fine for me.
I launch a node to test its killing: $ rosrun amcl amcl
Calling the rosnode API doesn't seems to work, here is the method I use (passing '/amcl' as argument). I've tried to resolve the full name by looking at rosnode code, but I'm not sure of what a fully resolved node name is in ROS:
def kill_node1(x):
a = scriptutil.script_resolve_name('/rosnode', x)
rosnode.kill_nodes(a)
whereas this method that executes the rosnode command works:
def kill_node2(x):
cmd = 'rosnode kill ' + x + ' &'
runCmd(cmd)
Thank you in avdance
Originally posted by chcorbato on ROS Answers with karma: 202 on 2011-09-28
Post score: 0