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

[Stabilizer] Set detection time whether robot is in air #1090

Merged
merged 3 commits into from
Mar 13, 2017

Conversation

kyawawa
Copy link
Contributor

@kyawawa kyawawa commented Jan 5, 2017

https://github.com/fkanehiro/hrpsys-base/blob/master/rtc/Stabilizer/Stabilizer.cpp#L1226
にある通り,現状1周期でもcontact_decision_thresholdを下回るとsync_2_idleが呼ばれ,制御が止まってしまいます.
ロボットに衝撃が加わった時にこちらが原因でロボットが止まってしまうという報告が実機・シミュレーションともにありまして,ある程度の時間連続して宙に浮いている状態が続いてからMODE_SYNC_TO_AIRへ切り替えるようにいたしました.
よろしくお願いします.

@YutaKojio
Copy link
Contributor

速い歩行や転倒回避等で着地が荒い時にこの問題で動作が止まってしまうことが起きていました.

以下再現コードです.

openhrp-project-generator `rospack find openhrp3`/sample/model/sample1_bush.wrl,0,0,0,0,0,1,1.57 `rospack find openhrp3`/sample/model/longfloor.wrl,0,0,-0.1,1,0,0,0 --use-highgain-mode false --output /tmp/SampleRobot_for_torquecontrol_with_wall.xml --timeStep 0.001 --dt 0.002 && export BUSH_CUSTOMIZER_CONFIG_PATH=`rospack find openhrp3`/sample/example/customizer/sample1_bush_customizer_param.conf && rtmlaunch hrpsys_ros_bridge samplerobot.launch PROJECT_FILE:=/tmp/SampleRobot_for_torquecontrol_with_wall.xml hrpsys_precreate_rtc:=PDcontroller USE_UNSTABLE_RTC:=true RUN_RVIZ:=false
(progn
(require "package:https://hrpsys_ros_bridge/euslisp/samplerobot-interface.l")
(samplerobot-init)
(send *ri* :set-gait-generator-param
        :default-step-time 0.65
        :default-step-height 0.2)
(send *ri* :angle-vector (send *sr* :reset-pose) 2000)
(send *ri* :wait-interpolation)
(send *ri* :start-auto-balancer)
(send *ri* :start-st)
(send *ri* :go-velocity 0 0 0))
  • いままで
    without_pr

  • PRあり
    with_pr

@k-okada
Copy link
Contributor

k-okada commented Jan 5, 2017

Refer to this link for build results (access rights to CI server needed):
http:https://jenkins.jsk.imi.i.u-tokyo.ac.jp:8080/job/hrpsys-qnx/2767/
Test PASSed.

@snozawa
Copy link
Contributor

snozawa commented Mar 9, 2017

今までは接地フラグは力センサの値にローパスをかけてたんだけど、
このPRのようにローパス+時間にしたほうがいいのか、
ローパスのききを強くしたほうが良いのかって、どっちなんだろう?

ちなみに、ちゅうにういている時間とかって、実機やsimuとかで実際にどれくらいか分かったりするかな?

@kyawawa
Copy link
Contributor Author

kyawawa commented Mar 9, 2017

@snozawa
PRなしの状態でもう一度再現コードを実行し,ログを取ってみました(simulator,最後こけています)
以下,1枚目のグラフが今回のパターンでのローパスかけた力センサの値および両足の合計値です
2枚目が1回目の立ち下がりを拡大したもので,現在の閾値50[N]を下回っているのは4周期分(8[ms])となっております
個人的には,あまりローパスを強くすると接地判定が遅くなってしまう副作用も大きいと思っております

st_prevactforce_srwalk

st_prevactforce_srwalk_zoom

@YoheiKakiuchi
Copy link
Contributor

個人的には,あまりローパスを強くすると接地判定が遅くなってしまう副作用も大きいと思っております

この副作用はどんなものがあって、どれぐらいの影響があるのかな?
現状では、stが入っている時の吊り降ろしが問題のほぼすべてのように思えますが、他にありますか?

それで、副作用が我慢できる範囲まで設置判定の時間を遅らせればいいように思います。

@kyawawa
Copy link
Contributor Author

kyawawa commented Mar 9, 2017

ローパスをかけた力センサの値を使った接地判定には2種類あって,on_groundとact_contact_statesがあります
act_contact_statesはref forceの分配など,STの主な制御に関わっていて,ローパスを強くするとact_contact_statesの切り替わりが遅くなり,STの挙動に大きく関わってきます
一方,on_groundを使っているものの一つにmode_airへの切り替わりがあり,今回のPRでは切り替わりの時間のみを遅くしています

@snozawa
Copy link
Contributor

snozawa commented Mar 10, 2017

なるほど。
ローパスは、接地判定自体に関係してくるので、
遅く(カットオフ周波数を低く)するのはマズそうですね。
なので、このPRの内容でOKそうです。

デフォルト値0.2秒というのも実機か何かで空中につりおろしをしてみて確認したかな?
それとも、デフォルトの挙動がまずはかわらないように、デフォルト値を0(であってる?)にしておくのはどうかな?

@kyawawa kyawawa force-pushed the change_time_to_detect_on_ground branch from 47555b9 to b9739bb Compare March 10, 2017 07:07
@kyawawa
Copy link
Contributor Author

kyawawa commented Mar 10, 2017

デフォルト値0.2秒というのも実機か何かで空中につりおろしをしてみて確認したかな?

ロボットの運用は行っていましたが,あまり細かな確認はしておりません
とりあえず,デフォルトの挙動が変わらないようにデフォルト値を0にいたしました

@@ -227,6 +227,8 @@ module OpenHRP
DblArray2 limb_stretch_avoidance_vlimit;
/// Sequence of limb length margin from max limb length [m]
sequence<double> limb_length_margin;
/// Detection time whether is in air [s]
double sync_to_air_max_time;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

細かいことだけど、 sync_to_air_max_time は変数名として分かりにくくないかな?
説明文は書いてあって、読めば分かる(し思い出す)とは思うけど、変数名から機能の推測がしにくそうです。
説明文の中にある単語を組み合わせるくらいが良くない? (air と timeは入ってるけど、 detectionは欲しいところ)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメントありがとうございます
そうですね,かなり微妙な感じです
コミット前にこちらでご意見伺いたいのですが,
detection_time_to_air
detection_counter_to_air
current_detection_counter_to_air
などで分かりやすいでしょうか?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1
detection_time_to_air

@k-okada
Copy link
Contributor

k-okada commented Mar 10, 2017

Refer to this link for build results (access rights to CI server needed):
http:https://jenkins.jsk.imi.i.u-tokyo.ac.jp:8080/job/hrpsys-qnx/2802/
Test PASSed.

@kyawawa
Copy link
Contributor Author

kyawawa commented Mar 10, 2017

変数名を変更し,加えてsetParameterした際に表示されるようにいたしました
こちらで問題なさそうであれば,マージお願いいたします

@snozawa
Copy link
Contributor

snozawa commented Mar 10, 2017

LGTM.

@k-okada
Copy link
Contributor

k-okada commented Mar 10, 2017

Refer to this link for build results (access rights to CI server needed):
http:https://jenkins.jsk.imi.i.u-tokyo.ac.jp:8080/job/hrpsys-qnx/2803/

Build Log
last 10 lines

[...truncated 4.11 KB...]
   at org.jenkinsci.plugins.ghprb.GhprbRepository.createCommitStatus(GhprbRepository.java:122)
   at org.jenkinsci.plugins.ghprb.GhprbBuilds.onCompleted(GhprbBuilds.java:118)
   at org.jenkinsci.plugins.ghprb.GhprbBuildListener.onCompleted(GhprbBuildListener.java:27)
   at org.jenkinsci.plugins.ghprb.GhprbBuildListener.onCompleted(GhprbBuildListener.java:12)
   at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:211)
   at hudson.model.Run.execute(Run.java:1773)
   at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
   at hudson.model.ResourceController.execute(ResourceController.java:98)
   at hudson.model.Executor.run(Executor.java:405)

Test FAILed.

@kyawawa kyawawa force-pushed the change_time_to_detect_on_ground branch from f5e5416 to 7e41043 Compare March 10, 2017 11:14
@k-okada
Copy link
Contributor

k-okada commented Mar 10, 2017

Refer to this link for build results (access rights to CI server needed):
http:https://jenkins.jsk.imi.i.u-tokyo.ac.jp:8080/job/hrpsys-qnx/2807/
Test PASSed.

@YoheiKakiuchi
Copy link
Contributor

@fkanehiro
test通っていますので、マージしていただけるとありがたいです。

@fkanehiro fkanehiro merged commit bb54d2b into fkanehiro:master Mar 13, 2017
@YoheiKakiuchi
Copy link
Contributor

ありがとうございます。

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.

None yet

6 participants