Skip to content

Commit

Permalink
[sample/SampleRobot/samplerobot_auto_balancer.py] set acceptable erro…
Browse files Browse the repository at this point in the history
…r between reference and actual default_zmp_offsets
  • Loading branch information
eisoku9618 committed Sep 1, 2015
1 parent ebb7459 commit 1f83310
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sample/SampleRobot/samplerobot_auto_balancer.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def demoAutoBalancerSetParam():
hcf.startAutoBalancer();
hcf.stopAutoBalancer();
ret=hcf.abc_svc.getAutoBalancerParam()
flag = (ret[0] and ret[1].default_zmp_offsets == abcp.default_zmp_offsets)
flag = (ret[0] and all([numpy.allclose(act, ref, 1e-6) for act, ref in zip(ret[1].default_zmp_offsets, abcp.default_zmp_offsets)]))
if flag:
print >> sys.stderr, " setAutoBalancerParam() => OK"
assert (flag), (ret[0], ret[1].default_zmp_offsets, abcp.default_zmp_offsets)
Expand Down

0 comments on commit 1f83310

Please sign in to comment.