roslaunch.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import subprocess
00004 
00005 def start_roslaunch_process(package, binary, args=None, log=None):
00006     if args == None:
00007         args = {}
00008     if package is not None:
00009         command_args = ['roslaunch', package, binary]
00010     else:
00011         command_args = ['roslaunch', binary]
00012     command_args.extend([key + ':=' + value for key, value in args.iteritems()])
00013     command_args.append('--screen')
00014     print "Running command: " + ' '.join(command_args)
00015     return (subprocess.Popen(command_args, stdout=log, stderr=subprocess.STDOUT)
00016             if log != None else subprocess.Popen(command_args))
00017 
00018 def stop_roslaunch_process(process):
00019     process.terminate()


bwi_tools
Author(s): Piyush Khandelwal
autogenerated on Thu Jun 6 2019 17:57:26