test-samplerobot-collision.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import imp, sys, os, time
00004 
00005 # set path to hrpsys to use HrpsysConfigurator
00006 from subprocess import check_output
00007 sys.path.append(os.path.join(check_output(['pkg-config', 'hrpsys-base', '--variable=prefix']).rstrip(),'share/hrpsys/samples/SampleRobot/')) # set path to SampleRobot
00008 
00009 import samplerobot_collision_detector
00010 import unittest, rostest
00011 
00012 if [s for s in sys.argv if '__name:=samplerobot_co_loop' in s]:
00013     class TestSampleRobotCollisionDetector(unittest.TestCase):
00014         def test_demo (self):
00015             samplerobot_collision_detector.demo_co_loop()
00016 else:
00017     class TestSampleRobotCollisionDetector(unittest.TestCase):
00018         def test_demo (self):
00019             samplerobot_collision_detector.demo()
00020 
00021 ## IGNORE ME: this code used for rostest
00022 if [s for s in sys.argv if "--gtest_output=xml:" in s] :
00023     rostest.run('hrpsys', 'samplerobot_collision_detector', TestSampleRobotCollisionDetector, sys.argv)
00024 
00025 
00026 
00027 
00028 
00029 


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Wed Sep 6 2017 02:35:56