ExtTrigger/run.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 # -*- Python -*-
4 
5 #
6 # @file run.py
7 # @brief ExtTrigger example startup script
8 # @date $Date: 2007/10/26 $
9 #
10 # Copyright (c) 2003-2007 Noriaki Ando <n-ando@aist.go.jp> and Shinji Kurihara
11 # Task-intelligence Research Group,
12 # Intelligent System Research Institute,
13 # National Institute of Industrial Science (AIST), Japan
14 # All rights reserved.
15 #
16 
17 import sys,os,platform
18 import time
19 import commands
20 
21 nsport="2809"
22 sysinfo = platform.uname()
23 hostname= sysinfo[1]
24 plat=sys.platform
25 
26 if plat == "win32":
27  os.system("start python ..\\..\\..\\bin\\rtm-naming.py")
28  os.system("start python ConsoleIn.py")
29  os.system("start python Consoleout.py")
30  time.sleep(2)
31  os.system("python Connector.py")
32 
33 else:
34  status,term=commands.getstatusoutput("which xterm")
35  term += " -e"
36  if status != 0:
37  status,term=commands.getstatusoutput("which kterm")
38  term += " -e"
39 
40  if status != 0:
41  status,term=commands.getstatusoutput("which uxterm")
42  term += " -e"
43 
44  if status != 0:
45  status,term=commands.getstatusoutput("which gnome-terminal")
46  term += " -x"
47 
48  if status != 0:
49  print "No terminal program (kterm/xterm/gnome-terminal) exists."
50  exit
51 
52  path = None
53  for p in sys.path:
54  if os.path.exists(os.path.join(p,"OpenRTM_aist")):
55  path = os.path.join(p,"OpenRTM_aist","utils","rtm-naming")
56  break
57  if path is None:
58  print "rtm-naming directory not exist."
59  sys.exit(0)
60 
61  os.system('python %s/rtm-naming.py &'%path)
62  os.system('%s python ConsoleIn.py &'%term)
63  os.system('%s python ConsoleOut.py &'%term)
64  time.sleep(1)
65  os.system("python Connector.py")


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Thu Jun 6 2019 19:11:34