7 print "import without hrpsys" 12 from waitInput
import *
17 from subprocess
import check_output
18 from distutils.version
import StrictVersion
21 global hcf, initial_pose, half_sitting_pose, hrpsys_version
22 hcf = HrpsysConfigurator()
23 hcf.getRTCList = hcf.getRTCListUnstable
24 hcf.init (
"SampleRobot(Robot)0",
"$(PROJECT_DIR)/../model/sample1.wrl")
26 initial_pose = [-7.779e-005, -0.378613, -0.000209793, 0.832038, -0.452564, 0.000244781, 0.31129, -0.159481, -0.115399, -0.636277, 0, 0, 0, -7.77902e-005, -0.378613, -0.000209794, 0.832038, -0.452564, 0.000244781, 0.31129, 0.159481, 0.115399, -0.636277, 0, 0, 0, 0, 0, 0]
27 half_sitting_pose = [-0.000158,-0.570987,-0.000232,1.26437,-0.692521,0.000277,0.31129,-0.159481,-0.115399,-0.636277,0.0,0.0,0.0,-0.000158,-0.570987,-0.000232,1.26437,-0.692521,0.000277,0.31129,0.159481,0.115399,-0.636277,0.0,0.0,0.0,0.0,0.0,0.0]
28 hrpsys_version = hcf.seq.ref.get_component_profile().version
29 print(
"hrpsys_version = %s"%hrpsys_version)
30 if StrictVersion(hrpsys_version) >= StrictVersion(
'315.5.0'):
32 hcf.seq_svc.setJointAngles(initial_pose, 2.0)
33 hcf.seq_svc.waitInterpolation()
35 for sen
in [
"rfsensor",
"lfsensor"]:
36 ofp=hcf.rmfo_svc.getForceMomentOffsetParam(sen)[1];
37 ofp.link_offset_mass=1.9;ofp.link_offset_centroid=[0.08, 0, -0.03];
38 hcf.rmfo_svc.setForceMomentOffsetParam(sen, ofp);
42 lcopx=cop_info[1]/cop_info[2];lcopy=cop_info[0]/cop_info[2]
43 rcopx=cop_info[1+3]/cop_info[2+3];rcopy=cop_info[0+3]/cop_info[2+3]
44 return [[lcopx, lcopx], [rcopx, rcopy],
45 [(cop_info[1]+cop_info[1+3])/(cop_info[2]+cop_info[2+3]),(cop_info[0]+cop_info[0+3])/(cop_info[2]+cop_info[2+3])]]
48 print >> sys.stderr,
"1. getParameter" 49 stp = hcf.st_svc.getParameter()
50 print >> sys.stderr,
" getParameter() => OK" 53 print >> sys.stderr,
"2. setParameter" 54 stp_org = hcf.st_svc.getParameter()
56 stp_org.k_tpcc_p=[0.2, 0.2]
57 stp_org.k_tpcc_x=[4.0, 4.0]
58 stp_org.k_brot_p=[0.0, 0.0]
60 tmp_leg_inside_margin=71.12*1e-3
61 tmp_leg_outside_margin=71.12*1e-3
62 tmp_leg_front_margin=182.0*1e-3
63 tmp_leg_rear_margin=72.0*1e-3
64 rleg_vertices = [OpenHRP.StabilizerService.TwoDimensionVertex(pos=[tmp_leg_front_margin, tmp_leg_inside_margin]),
65 OpenHRP.StabilizerService.TwoDimensionVertex(pos=[tmp_leg_front_margin, -1*tmp_leg_outside_margin]),
66 OpenHRP.StabilizerService.TwoDimensionVertex(pos=[-1*tmp_leg_rear_margin, -1*tmp_leg_outside_margin]),
67 OpenHRP.StabilizerService.TwoDimensionVertex(pos=[-1*tmp_leg_rear_margin, tmp_leg_inside_margin])]
68 lleg_vertices = [OpenHRP.StabilizerService.TwoDimensionVertex(pos=[tmp_leg_front_margin, tmp_leg_outside_margin]),
69 OpenHRP.StabilizerService.TwoDimensionVertex(pos=[tmp_leg_front_margin, -1*tmp_leg_inside_margin]),
70 OpenHRP.StabilizerService.TwoDimensionVertex(pos=[-1*tmp_leg_rear_margin, -1*tmp_leg_inside_margin]),
71 OpenHRP.StabilizerService.TwoDimensionVertex(pos=[-1*tmp_leg_rear_margin, tmp_leg_outside_margin])]
72 rarm_vertices = rleg_vertices
73 larm_vertices = lleg_vertices
74 stp_org.eefm_support_polygon_vertices_sequence = map (
lambda x : OpenHRP.StabilizerService.SupportPolygonVertices(vertices=x), [lleg_vertices, rleg_vertices, larm_vertices, rarm_vertices])
75 stp_org.eefm_leg_inside_margin=tmp_leg_inside_margin
76 stp_org.eefm_leg_outside_margin=tmp_leg_outside_margin
77 stp_org.eefm_leg_front_margin=tmp_leg_front_margin
78 stp_org.eefm_leg_rear_margin=tmp_leg_rear_margin
79 stp_org.eefm_k1=[-1.39899,-1.39899]
80 stp_org.eefm_k2=[-0.386111,-0.386111]
81 stp_org.eefm_k3=[-0.175068,-0.175068]
82 stp_org.eefm_rot_damping_gain = [[20*1.6*1.5, 20*1.6*1.5, 1e5]]*4
83 stp_org.eefm_pos_damping_gain = [[3500*50, 3500*50, 3500*1.0*1.5]]*4
84 stp_org.eefm_swing_rot_damping_gain = stp_org.eefm_rot_damping_gain[0]
85 stp_org.eefm_swing_pos_damping_gain = stp_org.eefm_pos_damping_gain[0]
86 stp_org.eefm_use_swing_damping=
True 87 hcf.st_svc.setParameter(stp_org)
88 stp = hcf.st_svc.getParameter()
89 vcheck = stp.k_tpcc_p == stp_org.k_tpcc_p
and stp.k_tpcc_x == stp_org.k_tpcc_x
and stp.k_brot_p == stp_org.k_brot_p
91 print >> sys.stderr,
" setParameter() => OK", vcheck
95 stp = hcf.st_svc.getParameter()
96 stp.contact_decision_threshold=thre
97 hcf.st_svc.setParameter(stp)
106 hcf.setMaxLogLength(1);hcf.clearLog();time.sleep(0.1);hcf.saveLog(log_fname)
108 def checkParameterFromLog(port_name, log_fname="/tmp/test-samplerobot-stabilizer-check-param", save_log=True, rtc_name="SampleRobot(Robot)0
"): 111 return map(float, open(log_fname+
"."+rtc_name+
"_"+port_name,
"r").readline().split(" ")[1:-1])
114 '''Check whether the robot falls down based on actual robot base-link attitude. 117 ret = abs(math.degrees(act_rpy[0])) < thre
and abs(math.degrees(act_rpy[1])) < thre
118 print >> sys.stderr,
" ret = ", ret,
", actual base rpy = (", act_rpy,
")" 122 '''Print actual base pos and rot 125 print >> sys.stderr,
" actual base pos = ", act_base[0:3],
"[m], actual base rpy = ", act_base[3:],
"[rad]" 128 stp = hcf.st_svc.getParameter()
129 if stp.st_algorithm != new_st_alg:
131 stp.st_algorithm = new_st_alg
132 hcf.st_svc.setParameter(stp)
133 hcf.startStabilizer ()
135 hcf.setJointAngles(hcf.getJointAngles(), 2.0);
136 hcf.waitInterpolation()
139 print >> sys.stderr,
"3. EEFMQP st + SequencePlayer loadPattern" 142 hcf.seq_svc.setJointAnglesSequenceFull([[0.000242, -0.403476, -0.000185, 0.832071, -0.427767, -6.928952e-05, 0.31129, -0.159481, -0.115399, -0.636277, 0.0, 0.0, 0.0, 0.000242, -0.403469, -0.000185, 0.832073, -0.427775, -6.928781e-05, 0.31129, 0.159481, 0.115399, -0.636277, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]],
145 [[-0.014759, -4.336272e-05, 0.668138]],
146 [[-0.000245, -0.000862, 0.000171]],
148 [[0.014052, 0.000203, -0.66798]],
152 hcf.stopAutoBalancer()
153 hcf.seq_svc.waitInterpolation()
154 stp = hcf.st_svc.getParameter()
155 stp.emergency_check_mode=OpenHRP.StabilizerService.NO_CHECK
156 hcf.st_svc.setParameter(stp)
158 changeSTAlgorithm (OpenHRP.StabilizerService.EEFMQP)
159 hcf.startStabilizer()
161 HRPSYS_DIR=check_output([
'pkg-config',
'hrpsys-base',
'--variable=prefix']).rstrip()
162 hcf.loadPattern(HRPSYS_DIR+
'/share/hrpsys/samples/SampleRobot/data/samplerobot-gopos000', 0.0)
163 hcf.waitInterpolation()
166 print >> sys.stderr,
" ST + loadPattern => OK" 169 print >> sys.stderr,
" This sample is neglected in High-gain mode simulation" 172 print >> sys.stderr,
"4. start and stop TPCC st" 175 hcf.startAutoBalancer()
176 changeSTAlgorithm (OpenHRP.StabilizerService.TPCC)
177 hcf.startStabilizer ()
182 print >> sys.stderr,
" Start and Stop Stabilizer => OK" 185 print >> sys.stderr,
" This sample is neglected in High-gain mode simulation" 188 print >> sys.stderr,
"5. start and stop EEFMQP st" 191 hcf.startAutoBalancer()
192 changeSTAlgorithm (OpenHRP.StabilizerService.EEFMQP)
193 hcf.startStabilizer()
194 hcf.abc_svc.goPos(0.3, 0, 0)
195 hcf.abc_svc.waitFootSteps()
198 print >> sys.stderr,
" Start and Stop Stabilizer => OK" 201 print >> sys.stderr,
" This sample is neglected in High-gain mode simulation" 204 print >> sys.stderr,
"6. EEFMQPCOP + stair" 208 changeSTAlgorithm (OpenHRP.StabilizerService.EEFMQPCOP)
209 hcf.startStabilizer()
210 hcf.startAutoBalancer()
211 hcf.seq_svc.setJointAngles(half_sitting_pose, 1.0);
212 hcf.waitInterpolation();
215 ggp = hcf.abc_svc.getGaitGeneratorParam()[1]
216 org_ggp = hcf.abc_svc.getGaitGeneratorParam()[1]
217 ggp.default_orbit_type = OpenHRP.AutoBalancerService.STAIR
218 ggp.swing_trajectory_time_offset_xy2z=0.1
219 ggp.swing_trajectory_delay_time_offset=0.2
220 ggp.toe_heel_phase_ratio=[0.05, 0.25, 0.20, 0.0, 0.18, 0.23, 0.09]
221 ggp.toe_pos_offset_x = 1e-3*182.0;
222 ggp.heel_pos_offset_x = 1e-3*-72.0;
223 ggp.toe_zmp_offset_x = 1e-3*182.0;
224 ggp.heel_zmp_offset_x = 1e-3*-72.0;
225 ggp.use_toe_heel_transition=
True 226 ggp.use_toe_heel_auto_set =
True 229 hcf.abc_svc.setGaitGeneratorParam(ggp)
231 hcf.setFootSteps([OpenHRP.AutoBalancerService.Footsteps([OpenHRP.AutoBalancerService.Footstep([0,-0.09,0], [1,0,0,0],
"rleg")]),
232 OpenHRP.AutoBalancerService.Footsteps([OpenHRP.AutoBalancerService.Footstep([0.27,0.09,0.1], [1,0,0,0],
"lleg")]),
233 OpenHRP.AutoBalancerService.Footsteps([OpenHRP.AutoBalancerService.Footstep([0.27,-0.09,0.1], [1,0,0,0],
"rleg")]),
234 OpenHRP.AutoBalancerService.Footsteps([OpenHRP.AutoBalancerService.Footstep([0.54,0.09,0], [1,0,0,0],
"lleg")]),
235 OpenHRP.AutoBalancerService.Footsteps([OpenHRP.AutoBalancerService.Footstep([0.54,-0.09,0], [1,0,0,0],
"rleg")])]);
237 hcf.abc_svc.waitFootSteps();
240 hcf.abc_svc.setGaitGeneratorParam(org_ggp)
244 print >> sys.stderr,
" ST + Stair => OK" 247 print >> sys.stderr,
" This sample is neglected in High-gain mode simulation" 250 print >> sys.stderr,
"7. EEFMQPCOP + toeheel" 253 hcf.startAutoBalancer()
254 hcf.co_svc.disableCollisionDetection()
255 changeSTAlgorithm (OpenHRP.StabilizerService.EEFMQPCOP)
256 hcf.startStabilizer()
257 hcf.seq_svc.setJointAngles(initial_pose, 2.0);
258 hcf.waitInterpolation();
260 ggp = hcf.abc_svc.getGaitGeneratorParam()[1]
261 org_ggp = hcf.abc_svc.getGaitGeneratorParam()[1]
262 ggp.default_orbit_type = OpenHRP.AutoBalancerService.RECTANGLE
263 ggp.swing_trajectory_time_offset_xy2z=0.1
264 ggp.swing_trajectory_delay_time_offset=0.2
265 ggp.toe_heel_phase_ratio=[0.05, 0.35, 0.20, 0.0, 0.13, 0.13, 0.14]
266 ggp.toe_pos_offset_x = 1e-3*182.0;
267 ggp.heel_pos_offset_x = 1e-3*-72.0;
268 ggp.toe_zmp_offset_x = 1e-3*182.0;
269 ggp.heel_zmp_offset_x = 1e-3*-72.0;
270 ggp.use_toe_heel_transition=
True 271 ggp.use_toe_heel_auto_set=
True 273 ggp.default_double_support_ratio=0.7
274 hcf.abc_svc.setGaitGeneratorParam(ggp)
276 hcf.setFootStepsWithParam([OpenHRP.AutoBalancerService.Footsteps([OpenHRP.AutoBalancerService.Footstep([0,-0.09,0], [1,0,0,0],
"rleg")]),
277 OpenHRP.AutoBalancerService.Footsteps([OpenHRP.AutoBalancerService.Footstep([sgn*0.22,0.09,0], [1,0,0,0],
"lleg")]),
278 OpenHRP.AutoBalancerService.Footsteps([OpenHRP.AutoBalancerService.Footstep([sgn*0.44,-0.09,0], [1,0,0,0],
"rleg")]),
279 OpenHRP.AutoBalancerService.Footsteps([OpenHRP.AutoBalancerService.Footstep([sgn*0.44,0.09,0], [1,0,0,0],
"lleg")])],
280 [OpenHRP.AutoBalancerService.StepParams([OpenHRP.AutoBalancerService.StepParam(step_height=0.0, step_time=1.0, toe_angle=0.0, heel_angle=0.0)]),
281 OpenHRP.AutoBalancerService.StepParams([OpenHRP.AutoBalancerService.StepParam(step_height=0.05, step_time=4.0, toe_angle=20.0, heel_angle=10.0)]),
282 OpenHRP.AutoBalancerService.StepParams([OpenHRP.AutoBalancerService.StepParam(step_height=0.05, step_time=4.0, toe_angle=20.0, heel_angle=10.0)]),
283 OpenHRP.AutoBalancerService.StepParams([OpenHRP.AutoBalancerService.StepParam(step_height=0.05, step_time=4.0, toe_angle=20.0, heel_angle=10.0)])])
284 hcf.abc_svc.waitFootSteps();
286 ggp.default_double_support_ratio=0.2
287 ggp.stride_parameter=[0.22,0.1,20.0,0.22]
290 hcf.abc_svc.setGaitGeneratorParam(ggp)
292 hcf.abc_svc.goPos(sgn*0.66,sgn*0.2,sgn*40);
293 hcf.abc_svc.waitFootSteps();
295 hcf.abc_svc.setGaitGeneratorParam(org_ggp)
296 hcf.co_svc.enableCollisionDetection()
299 print >> sys.stderr,
" ST + ToeHeel => OK" 302 print >> sys.stderr,
" This sample is neglected in High-gain mode simulation" 305 print >> sys.stderr,
"8. EEFMQPCOP st + Turn walk" 307 hcf.startAutoBalancer()
308 hcf.co_svc.disableCollisionDetection()
309 changeSTAlgorithm (OpenHRP.StabilizerService.EEFMQPCOP)
310 hcf.startStabilizer()
311 ggp = hcf.abc_svc.getGaitGeneratorParam()[1]
312 org_ggp = hcf.abc_svc.getGaitGeneratorParam()[1]
313 ggp.stride_parameter=[0.15, 0.15, 90.0, 0.05]
314 hcf.abc_svc.setGaitGeneratorParam(ggp)
315 hcf.abc_svc.goPos(0,-0.2,0);
316 hcf.abc_svc.waitFootSteps();
317 hcf.abc_svc.goPos(0,0,175);
318 hcf.abc_svc.waitFootSteps();
319 hcf.abc_svc.goPos(0.4,0.15,40);
320 hcf.abc_svc.waitFootSteps();
322 hcf.abc_svc.setGaitGeneratorParam(org_ggp)
323 hcf.co_svc.enableCollisionDetection()
326 print >> sys.stderr,
" ST + Turnwalk => OK" 329 print >> sys.stderr,
" This sample is neglected in High-gain mode simulation" 334 print >> sys.stderr,
"9. ST Transition (in the air and on the ground)" 337 stp_org = hcf.st_svc.getParameter()
338 stp = hcf.st_svc.getParameter()
339 stp.transition_time = 0.1;
340 hcf.st_svc.setParameter(stp)
342 print >> sys.stderr,
" 9-1. Check in the air" 343 hcf.startStabilizer()
345 hcf.setJointAngles(hcf.getJointAngles(), stp.transition_time);hcf.waitInterpolation()
346 cmode1 = hcf.st_svc.getParameter().controller_mode
347 vcheck1 = (cmode1 == OpenHRP.StabilizerService.MODE_AIR)
348 print >> sys.stderr,
" 9-2. Check on the ground" 350 hcf.setJointAngles(hcf.getJointAngles(), stp.transition_time);hcf.waitInterpolation()
351 cmode2 = hcf.st_svc.getParameter().controller_mode
352 vcheck2 = (cmode2 == OpenHRP.StabilizerService.MODE_ST)
353 print >> sys.stderr,
" 9-3. Check in the air and then stopST" 355 hcf.setJointAngles(hcf.getJointAngles(), 0.01);hcf.waitInterpolation()
357 cmode3 = hcf.st_svc.getParameter().controller_mode
358 vcheck3 = (cmode3 == OpenHRP.StabilizerService.MODE_IDLE)
359 print >> sys.stderr,
" 9-4. Check on the ground" 361 hcf.setJointAngles(hcf.getJointAngles(), 0.01);hcf.waitInterpolation()
362 hcf.startStabilizer()
363 cmode4 = hcf.st_svc.getParameter().controller_mode
364 vcheck4 = (cmode4 == OpenHRP.StabilizerService.MODE_ST)
366 hcf.st_svc.setParameter(stp_org)
367 vcheck_list = [vcheck1, vcheck2, vcheck3, vcheck4]
368 print >> sys.stderr,
" ST Transition Air Ground vcheck = ", vcheck_list,
", cmode = ", [cmode1, cmode2, cmode3, cmode4]
370 print >> sys.stderr,
" ST Transition Air Ground => OK" 371 assert(all(vcheck_list))
373 print >> sys.stderr,
" This sample is neglected in High-gain mode simulation" 376 print >> sys.stderr,
"10. ST root rot change" 379 root_rot_x_pose=[-0.240857,-0.634561,0.012382,1.30211,-0.669201,0.073893,0.31129,-0.159481,-0.115399,-0.636277,0.0,0.0,0.0,-0.232865,-0.555515,0.011753,1.1356,-0.581653,0.06476,0.31129,0.159481,0.115399,-0.636277,0.0,0.0,0.0,0.0,0.0,0.0]
381 root_rot_y_pose=[-1.706033e-05,-1.04708,-0.000479,0.497763,-0.060719,-0.000105,0.31129,-0.159481,-0.115399,-0.636277,0.0,0.0,0.0,-1.690260e-05,-1.04693,-0.000479,0.497318,-0.060422,-0.000105,0.31129,0.159481,0.115399,-0.636277,0.0,0.0,0.0,0.0,0.0,0.0]
383 root_rot_z_pose=[-0.261382,-0.479591,-0.490714,1.26471,-0.722778,0.018041,0.31129,-0.159481,-0.115399,-0.636277,0.0,0.0,0.0,-0.313108,-0.610397,-0.535653,1.24943,-0.571839,-0.013257,0.31129,0.159481,0.115399,-0.636277,0.0,0.0,0.0,0.0,0.0,0.0]
385 root_rot_xyz_pose=[-0.378611,-0.81283,-0.238181,1.23534,-0.577915,0.061071,0.31129,-0.159481,-0.115399,-0.636277,0.0,0.0,0.0,-0.351695,-0.768514,-0.225097,1.05221,-0.442267,0.050849,0.31129,0.159481,0.115399,-0.636277,0.0,0.0,0.0,0.0,0.0,0.0]
386 hcf.startAutoBalancer();
387 changeSTAlgorithm (OpenHRP.StabilizerService.EEFMQPCOP)
388 print >> sys.stderr,
" init" 390 hcf.seq_svc.setJointAngles(root_rot_x_pose, 1.0);hcf.waitInterpolation();
391 hcf.seq_svc.setJointAngles(root_rot_x_pose, 1.0);hcf.waitInterpolation();
392 print >> sys.stderr,
" root rot x done." 394 hcf.seq_svc.setJointAngles(root_rot_y_pose, 1.0);hcf.waitInterpolation();
395 hcf.seq_svc.setJointAngles(root_rot_y_pose, 1.0);hcf.waitInterpolation();
396 print >> sys.stderr,
" root rot y done." 398 hcf.seq_svc.setJointAngles(root_rot_z_pose, 1.0);hcf.waitInterpolation();
399 hcf.seq_svc.setJointAngles(root_rot_z_pose, 1.0);hcf.waitInterpolation();
400 print >> sys.stderr,
" root rot z done." 402 hcf.seq_svc.setJointAngles(root_rot_xyz_pose, 1.0);hcf.waitInterpolation();
403 hcf.seq_svc.setJointAngles(root_rot_xyz_pose, 1.0);hcf.waitInterpolation();
404 hcf.seq_svc.setJointAngles(initial_pose, 1.0);hcf.waitInterpolation();
405 print >> sys.stderr,
" root rot xyz done." 408 print >> sys.stderr,
" ST root rot change => OK" 411 print >> sys.stderr,
" This sample is neglected in High-gain mode simulation" 414 print >> sys.stderr,
"11. ST mimic rough terrain walk" 416 hcf.setFootSteps([OpenHRP.AutoBalancerService.Footsteps([OpenHRP.AutoBalancerService.Footstep([0,-0.09,0], [1,0,0,0],
"rleg")]),
417 OpenHRP.AutoBalancerService.Footsteps([OpenHRP.AutoBalancerService.Footstep([0.22,0.09,terrain_height_diff], [1,0,0,0],
"lleg")]),
418 OpenHRP.AutoBalancerService.Footsteps([OpenHRP.AutoBalancerService.Footstep([0.44,-0.09,0], [1,0,0,0],
"rleg")]),
419 OpenHRP.AutoBalancerService.Footsteps([OpenHRP.AutoBalancerService.Footstep([0.44,0.09,0], [1,0,0,0],
"lleg")])]);
420 hcf.abc_svc.waitFootSteps();
421 hcf.setFootSteps([OpenHRP.AutoBalancerService.Footsteps([OpenHRP.AutoBalancerService.Footstep([0,-0.09,0], [1,0,0,0],
"rleg")]),
422 OpenHRP.AutoBalancerService.Footsteps([OpenHRP.AutoBalancerService.Footstep([0.22,0.09,-1*terrain_height_diff], [1,0,0,0],
"lleg")]),
423 OpenHRP.AutoBalancerService.Footsteps([OpenHRP.AutoBalancerService.Footstep([0.44,-0.09,0], [1,0,0,0],
"rleg")]),
424 OpenHRP.AutoBalancerService.Footsteps([OpenHRP.AutoBalancerService.Footstep([0.44,0.09,0], [1,0,0,0],
"lleg")])]);
425 hcf.abc_svc.waitFootSteps();
428 print >> sys.stderr,
" ST mimic rough terrain walk => OK" 431 print >> sys.stderr,
" This sample is neglected in High-gain mode simulation" 435 OPENHRP3_DIR=check_output([
'pkg-config',
'openhrp3.1',
'--variable=prefix']).rstrip()
436 if os.path.exists(OPENHRP3_DIR+
"/share/OpenHRP-3.1/sample/model/sample1_bush.wrl"):
438 if StrictVersion(hrpsys_version) >= StrictVersion(
'315.5.0'):
451 print >> sys.stderr,
"Skip st test because of missing sample1_bush.wrl" 453 if __name__ ==
'__main__':
def checkParameterFromLog(port_name, log_fname="/tmp/test-samplerobot-stabilizer-check-param", save_log=True, rtc_name="SampleRobot(Robot)0")
def changeSTAlgorithm(new_st_alg)
def changeContactDecisionThre(thre)
def demoSTTransitionAirGround()
def checkActualBaseAttitude(thre=5.0)
def readDataPort(port, timeout=1.0)
read data from a data port
def saveLogForCheckParameter(log_fname="/tmp/test-samplerobot-stabilizer-check-param")
def demoStartStopTPCCST()
def demoSTRootRotChange()
def demoStartStopEEFMQPST()
def demoSTMimicRouchTerrainWalk(terrain_height_diff=0.04)