4 NAME =
'test-hrpsys-config' 10 import roslib; roslib.load_manifest(PKG)
13 from hrpsys
import rtm
16 import argparse,unittest,rostest
21 def init(self, robotname="SampleRobot(Robot)0
", url=""): 22 HrpsysConfigurator.init(self, robotname=robotname, url=url) 31 from waitInput
import waitInputConfirm, waitInputSelect
36 self.
seq = h.createComp(
"SequencePlayer",
'seq')[0]
40 if self.
seq ==
None or self.
rh ==
None:
44 assert(len(self.seq.port(
"qInit").get_connector_profiles()) == 1)
47 assert(len(self.seq.port(
"qInit").get_connector_profiles()) == 1)
55 parser = argparse.ArgumentParser(description=
'hrpsys command line interpreters')
56 parser.add_argument(
'--host', help=
'corba name server hostname')
57 parser.add_argument(
'--port', help=
'corba name server port number')
58 args, unknown = parser.parse_known_args()
61 rtm.nshost = args.host
63 rtm.nsport = args.port
68 for c
in h.ms.get_components():
69 if '(Robot)' in c.name()
or 'RobotHardware' in c.name():
70 h.waitForRobotHardware(c.name())
75 if __name__ ==
'__main__':
77 rostest.run(PKG, NAME, TestHrpsysConfig, sys.argv)
def test_createcomp(self)
def test_import_waitinput(self)
def init(self, robotname="SampleRobot(Robot)0", url="")
def test_connectcomp(self)
def connectPorts(outP, inPs, subscription="flush", dataflow="Push", bufferlength=1, rate=1000)
connect ports