Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update default-zmp-offsets interface according to hrpsys-base change #808

Merged

Conversation

eisoku9618
Copy link
Member

#801 がreopenできなかったので移動しました.

@eisoku9618
Copy link
Member Author

fkanehiro/hrpsys-base#773 がマージされてからマージしていただけると幸いです.

@snozawa
Copy link
Contributor

snozawa commented Aug 28, 2015

さっき口頭で伝えたhrpsys-base側のset+getの部分もチェックプログラムを作っておいてください。

@eisoku9618
Copy link
Member Author

さっき口頭で伝えたhrpsys-base側のset+getの部分もチェックプログラムを作っておいてください。

はい.以下のPRのコミットに含めました.
手元では野沢さんにご指摘いただいた通り,ちゃんと失敗するので,失敗しないようなコミットを加えてみます.

fkanehiro/hrpsys-base@df74d2b

memo : ipython -i samplerobot_data_logger.pyでpythonからいじれる

@eisoku9618
Copy link
Member Author

すみません,確認させていただきたいのですが,現状は

  1. auto-balancerが入っていない状態
  2. default_zmp_offsetsを入れる
  3. hrpsysの出力画面ではdefault_zmp_offsetsの値が入っている
  4. getAutoBalancerParamしてもdefault_zmp_offsetsの値が変わっていない
  5. この状態でauto-balancerを入れる
  6. getAutoBalancerParamするとdefault_zmp_offsetsの値が変わっている

となっています.

先ほどお話していたときは,4番目のときの段階でこれまでは値が変わっていたのに,どこかのタイミングで値が変わらないようにしてしまったので直しましょう,という趣旨だと思っていたのですが,この挙動は以前からそうである気がしてきました.
(startAutoBalancerしないとzmp offsetsの補間が入らないので,値は変わらないはず)

これが正しいとすると,demoAutoBalancerSetParamで確認したいこと的には,以下のように比較するタイミングを後ろにずらすのが良さそうでしょうか.

diff --git a/sample/SampleRobot/samplerobot_auto_balancer.py b/sample/SampleRobot/samplerobot_auto_balancer.py
index 84061b4..2000704 100755
--- a/sample/SampleRobot/samplerobot_auto_balancer.py
+++ b/sample/SampleRobot/samplerobot_auto_balancer.py
@@ -77,12 +77,12 @@ def demoAutoBalancerSetParam():
     abcp=hcf.abc_svc.getAutoBalancerParam()[1]
     abcp.default_zmp_offsets = [[0.1,0,0], [0.1,0,0]]
     hcf.abc_svc.setAutoBalancerParam(abcp)
-    ret=hcf.abc_svc.getAutoBalancerParam()
-    if ret[0] and ret[1].default_zmp_offsets == abcp.default_zmp_offsets:
-        print >> sys.stderr, "  setAutoBalancerParam() => OK"
     print >> sys.stderr, "  default_zmp_offsets setting check in start and stop"
     hcf.startAutoBalancer();
     hcf.stopAutoBalancer();
+    ret=hcf.abc_svc.getAutoBalancerParam()
+    if ret[0] and ret[1].default_zmp_offsets == abcp.default_zmp_offsets:
+        print >> sys.stderr, "  setAutoBalancerParam() => OK"
     abcp.default_zmp_offsets = [[0,0,0], [0,0,0]]
     hcf.abc_svc.setAutoBalancerParam(abcp)

https://github.com/fkanehiro/hrpsys-base/blob/master/sample/SampleRobot/samplerobot_auto_balancer.py#L75

@eisoku9618
Copy link
Member Author

上に対応するPRを作って見ました

fkanehiro/hrpsys-base#782

@eisoku9618
Copy link
Member Author

hrpsys-baseの方のPRをマージしていただけたので,こちらもマージしていただけると幸いです.

@snozawa
Copy link
Contributor

snozawa commented Aug 30, 2015

origin/masterをmergeしてもらえると助かります。
testがはいったので。

@eisoku9618
Copy link
Member Author

マージしました

snozawa added a commit that referenced this pull request Aug 31, 2015
…terface

update default-zmp-offsets interface according to hrpsys-base change
@snozawa snozawa merged commit 588dfc8 into start-jsk:master Aug 31, 2015
@eisoku9618 eisoku9618 deleted the update-default-zmp-offsets-interface branch August 31, 2015 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants