Go to the documentation of this file.00001
00002
00003 """
00004 this is example file for PA10 robot
00005
00006 $ roslaunch hrpsys pa10.launch
00007 $ rosrun hrpsys pa10-jointangle.py
00008 """
00009
00010 import imp, sys, os
00011
00012
00013
00014 try:
00015 imp.find_module('hrpsys')
00016 sys.path.append(imp.find_module('hrpsys')[1])
00017 except:
00018 import rospkg
00019 rp = rospkg.RosPack()
00020 sys.path.append(rp.get_path('hrpsys')+'/lib/python2.7/dist-packages/hrpsys')
00021 sys.path.append(rp.get_path('openrtm_aist_python')+'/lib/python2.7/dist-packages')
00022
00023 sys.path.append(os.path.dirname(os.path.abspath(__file__))+'/../share/hrpsys/samples/PA10/')
00024
00025
00026
00027 import PA10
00028 PA10.rtm.initCORBA()
00029 PA10.demo()
00030
00031
00032 if [s for s in sys.argv if "--gtest_output=xml:" in s] :
00033 import unittest, rostest
00034 rostest.run('hrpsys', 'pa10_sample', unittest.TestCase, sys.argv)
00035
00036
00037