samplerobot-walk.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 """
00004  this is example file for SampleRobot robot
00005 
00006  $ roslaunch hrpsys samplerobot.launch
00007  $ rosrun    hrpsys samplerobot-walk.py
00008 
00009 """
00010 
00011 import imp, sys, os
00012 
00013 # set path to hrpsys to use 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 roslib
00019     roslib.load_manifest('hrpsys')
00020 
00021 from subprocess import check_output
00022 sys.path.append(os.path.join(check_output(['pkg-config', 'hrpsys-base', '--variable=prefix']).rstrip(),'share/hrpsys/samples/SampleRobot/')) # set path to SampleRobot
00023 
00024 import samplerobot_walk
00025 
00026 if __name__ == '__main__':
00027     samplerobot_walk.demo()
00028 
00029 ## IGNORE ME: this code used for rostest
00030 if [s for s in sys.argv if "--gtest_output=xml:" in s] :
00031     import unittest, rostest
00032     rostest.run('hrpsys', 'samplerobot_walk', unittest.TestCase, sys.argv)
00033 
00034 
00035 
00036 
00037 
00038 


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Wed May 15 2019 05:02:18