pa10-jointangle.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 """
4  this is example file for PA10 robot
5 
6  $ roslaunch hrpsys pa10.launch
7  $ rosrun hrpsys pa10-jointangle.py
8 """
9 
10 import imp, sys, os
11 
12 
13 # set path to hrpsys to get import rpy, see <hrpsys>/test/test-jointangle.py for using HrpsysConfigurator
14 try:
15  imp.find_module('hrpsys') # catkin installed
16  sys.path.append(imp.find_module('hrpsys')[1])
17 except: # rosbuild installed
18  import rospkg
19  rp = rospkg.RosPack()
20  sys.path.append(rp.get_path('hrpsys')+'/lib/python2.7/dist-packages/hrpsys')
21  sys.path.append(rp.get_path('openrtm_aist_python')+'/lib/python2.7/dist-packages')
22 
23 sys.path.append(os.path.dirname(os.path.abspath(__file__))+'/../samples/PA10/') # set path to PA10
24 
25 #os.environ['ORBInitRef'] = 'NameService=corbaloc:iiop:{0}:{1}/NameService'.format('localhost','2809')
26 
27 import PA10
28 PA10.rtm.initCORBA()
29 PA10.demo()
30 
31 ## IGNORE ME: this code used for rostest
32 if [s for s in sys.argv if "--gtest_output=xml:" in s] :
33  import unittest, rostest
34  rostest.run('hrpsys', 'pa10_sample', unittest.TestCase, sys.argv)
35 
36 
37 
def demo()
Definition: PA10.py:98


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Thu May 6 2021 02:41:50