pa10-jointangle.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
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 # set path to hrpsys to get import rpy, see <hrpsys>/test/test-jointangle.py for using HrpsysConfigurator
00014 try:
00015     imp.find_module('hrpsys') # catkin installed
00016     sys.path.append(imp.find_module('hrpsys')[1])
00017 except: # rosbuild installed
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/') # set path to PA10
00024 
00025 #os.environ['ORBInitRef'] = 'NameService=corbaloc:iiop:{0}:{1}/NameService'.format('localhost','2809')
00026 
00027 import PA10
00028 PA10.rtm.initCORBA()
00029 PA10.demo()
00030 
00031 ## IGNORE ME: this code used for rostest
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 


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Wed Aug 26 2015 11:53:03