Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
launch
samplerobot-walk.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
3
"""
4
this is example file for SampleRobot robot
5
6
$ roslaunch hrpsys samplerobot.launch
7
$ rosrun hrpsys samplerobot-walk.py
8
9
"""
10
11
import
imp, sys, os
12
13
# set path to hrpsys to use 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
roslib
19
roslib.load_manifest(
'hrpsys'
)
20
21
from
subprocess
import
check_output
22
sys.path.append(os.path.join(check_output([
'pkg-config'
,
'hrpsys-base'
,
'--variable=prefix'
]).rstrip(),
'share/hrpsys/samples/SampleRobot/'
))
# set path to SampleRobot
23
24
import
samplerobot_walk
25
26
if
__name__ ==
'__main__'
:
27
samplerobot_walk.demo
()
28
29
## IGNORE ME: this code used for rostest
30
if
[s
for
s
in
sys.argv
if
"--gtest_output=xml:"
in
s] :
31
import
unittest, rostest
32
rostest.run(
'hrpsys'
,
'samplerobot_walk'
, unittest.TestCase, sys.argv)
33
34
35
36
37
38
samplerobot_walk.demo
def demo()
Definition:
samplerobot_walk.py:33
hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Thu May 6 2021 02:41:51