HRP4C.py
Go to the documentation of this file.
1 import rtm
2 
3 from rtm import *
4 from OpenHRP import *
5 
7  connectPorts(bridge.port("q"), seq.port("qInit"))
8  #
9  connectPorts(seq.port("qRef"), hgc.port("qIn"))
10  #
11 
13  rtm.serializeComponents([bridge, seq])
14  seq.start()
15 
17  global bridge, seq, seq_svc, hgc
18 
19  bridge = findRTC("HRP4C(Robot)0")
20 
21  ms.load("SequencePlayer")
22  seq = ms.create("SequencePlayer", "seq")
23  seq_svc = narrow(seq.service("service0"),"SequencePlayerService")
24 
25  hgc = findRTC("HGcontroller0")
26 
27 def init():
28  global ms
29 
30  ms = rtm.findRTCmanager()
31 
32  print "creating components"
33  createComps()
34 
35  print "connecting components"
36  connectComps()
37 
38  print "activating components"
40  print "initialized successfully"
41 
42 def loadPattern(basename, tm=1.0):
43  seq_svc.loadPattern(basename, tm)
44  seq_svc.waitInterpolation()
45 
46 if __name__ == '__main__':
47  initCORBA()
48  init()
49  loadPattern("data/walk2m")
50 
def findRTC(name, rnc=None)
get RT component
Definition: jython/rtm.py:341
def loadPattern(basename, tm=1.0)
Definition: HRP4C.py:42
def narrow(ior, klass, package="OpenHRP")
narrow ior
Definition: jython/rtm.py:709
def createComps()
Definition: HRP4C.py:16
def serializeComponents(rtcs, stopEC=True)
set up execution context of the first RTC so that RTCs are executed sequentially
Definition: jython/rtm.py:373
def findRTCmanager(hostname=None, rnc=None)
get RTCmanager
Definition: jython/rtm.py:321
def connectPorts(outP, inPs, subscription="flush", dataflow="Push", bufferlength=1, rate=1000)
connect ports
Definition: jython/rtm.py:433
def activateComps()
Definition: HRP4C.py:12
def init()
Definition: HRP4C.py:27
def initCORBA()
initialize ORB
Definition: jython/rtm.py:272
def connectComps()
Definition: HRP4C.py:6


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Thu May 6 2021 02:41:50