forked from fkanehiro/hrpsys-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-hrpsysconf.py
executable file
·53 lines (40 loc) · 1.44 KB
/
test-hrpsysconf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env python
PKG = 'hrpsys'
NAME = 'test-hrpsys-config'
import imp ## for rosbuild
try:
imp.find_module(PKG)
except:
import roslib; roslib.load_manifest(PKG)
from hrpsys.hrpsys_config import *
from hrpsys import rtm
import OpenHRP
import argparse,unittest,rostest
import unittest, sys
class SampleHrpsysConfigurator(HrpsysConfigurator):
def init(self, robotname="SampleRobot(Robot)0", url=""):
HrpsysConfigurator.init(self, robotname=robotname, url=url)
class TestHrpsysConfig(unittest.TestCase):
global h
def test_import_waitinput(self):
# https://github.com/start-jsk/rtmros_hironx/blob/groovy-devel/hironx_ros_bridge/src/hironx_ros_bridge/hironx_client.py
from waitInput import waitInputConfirm, waitInputSelect
self.assertTrue(True)
def test_findcomp(self):
global h
h.findComps()
def setUp(self):
global h
parser = argparse.ArgumentParser(description='hrpsys command line interpreters')
parser.add_argument('--host', help='corba name server hostname')
parser.add_argument('--port', help='corba name server port number')
args, unknown = parser.parse_known_args()
if args.host:
rtm.nshost = args.host
if args.port:
rtm.nsport = args.port
h = SampleHrpsysConfigurator()
#unittest.main()
if __name__ == '__main__':
import rostest
rostest.run(PKG, NAME, TestHrpsysConfig, sys.argv)