Roslaunch API refusing connection
Hi,
I'm having trouble using the roslaunch python api in my scripts, which is quite boring. According to http://wiki.ros.org/roslaunch/API%20U... I should be able to use roslaunch in python script, but I'm always having this error :
Traceback (most recent call last):
File "roslaunchtest.py", line 9, in <module>
launch = roslaunch.scriptapi.ROSLaunch()
File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/scriptapi.py", line 61, in __init__
uuid = master.getParam('/run_id')
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosgraph/masterapi.py", line 206, in getParam
return self._succeed(self.handle.getParam(self.caller_id, key))
File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
verbose=self.__verbose
File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python2.7/xmlrpclib.py", line 1292, in single_request
self.send_content(h, request_body)
File "/usr/lib/python2.7/xmlrpclib.py", line 1439, in send_content
connection.endheaders(request_body)
File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 814, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 776, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 757, in connect
self.timeout, self.source_address)
File "/usr/lib/python2.7/socket.py", line 571, in create_connection
raise err
socket.error: [Errno 111] Connection refused
Is it normal that the simplest code isn't working ? Or am I doing something wrong ? I'd like to find a solution for that, since I need to launch a few files, like the turtlebot minimal, 3d sensors, and autodocking script. If it's not possible in this way, is there a workaround ?
Thanks
Ray