-
Notifications
You must be signed in to change notification settings - Fork 87
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
Support non-legged robot and leg-only robot in startDefaultUnstableControllers and stopDefaultUnstableControllers #1130
Support non-legged robot and leg-only robot in startDefaultUnstableControllers and stopDefaultUnstableControllers #1130
Conversation
Refer to this link for build results (access rights to CI server needed): |
よく分かっていないけどルールはなんだろう? |
ご指摘ありがとうございます. samplerobotの中にも4脚ロボット プログラム的には,どちらも場合でも あくまでデフォルトな使い方なので,ケースベースにいくと
の3つは実際にこれらロボットがhrpsys-baseで運用されており, 一方,
はこのPRでは対応できず,サブクラスで
のようにユーザがデフォルトにしたい設定を定義するかんじのことを想定しています. この辺,4脚ロボット vs 2脚2腕ロボットがよつんばいになったとき,
はrarm=前脚,のようなかんじにもみえますし,
も,人間逆立ちのような「デフォルト」っぽくないときにはどうなってるのかわからなさそうで, |
あ、なるほど、画面の幅が狭くて
+ if self.Groups != None and "rleg" in map (lambda x : x[0],
self.Groups)
しか見えていなかったです.
>> Groups
[['larm', [1, 2, 3]], ['rarm', [1, 2, 3]], ['lleg', [1, 2, 3]], ['rleg',
[1, 2, 3]]]
>> map(lambda x: x[0], filter(lambda x : re.match(".*leg", x[0]), Groups))
['lleg', 'rleg']
re は hrpsys_config.py にはなにけど、rtm.py にはimport しているから大丈夫かな.と.
Groups = None はありえるのかな?
https://github.com/snozawa/hrpsys-base/blob/0dfab9bc253567cd75e20a5dbe25ca73ff2b4b69/python/hrpsys_config.py#L287
で[]にしているんだけど、きになるなら、__init__とかで、
if Groups == None:
Groups = []
としておくのが綺麗にならないかな.
+ if self.Groups != None and "rleg" in map (lambda x : x[0],
self.Groups) and "lleg" in map (lambda x : x[0], self.Groups):
+ is_legged_robot = True
+ if abc_limbs==None:
+ if "rarm" in map (lambda x : x[0], self.Groups) and
"larm" in map (lambda x : x[0], self.Groups):
+ abc_limbs=["rleg", "lleg", "rarm", "larm"]
+ else:
+ abc_limbs=["rleg", "lleg"]
+ else:
+ is_legged_robot = False
は、leg を持っていたら、legged_robot,abc_limbは定義されいなければ、larm/rarmをもっていれば全てが
abc_limb そうでなけえれば、legがabc_limbs というるーるだと、
if map(lambda x: x[0], filter(lambda x : re.match(".*leg", x[0]),
Groups)):
is_legged_robot = True
if abs_limbs == None:
if filter(lambda x : x[0] in ['larm','rarm'], Groups) : # larm/larm
だとダメ
abc_limbs = map(lambda x: x[0], filter(lambda x :
re.match(".*(leg|arm)", x[0]), Groups))
else
abc_limbs = map(lambda x: x[0], filter(lambda x :
re.match(".*leg", x[0]), Groups))
ということかな.
+ ic_limbs = filter(lambda lnm : self.Groups != None and lnm in
map(lambda x : x[0], self.Groups), ic_limbs)
は、
map(lambda x: x[0], filter(lambda x : re.match(".*(leg|arm)", x[0]),
Groups))
か
map(lambda x: x[0], Groups)
か
+ is_legged_robot = self.Groups != None and "rleg" in map (lambda x
: x[0], self.Groups) and "lleg" in map (lambda x : x[0], self.Groups)
map(lambda x: x[0], filter(lambda x : re.match(".*leg", x[0]), Groups))
か.
…--
◉ Kei Okada
2017年5月2日 23:41 Shunichi Nozawa <[email protected]>:
よく分かっていないけどルールはなんだろう?
*legという名前のlimbは足=AutoBalancerで制御すべき?
4脚ロボットと2脚だけど四つん這いは違うもの?
ご指摘ありがとうございます.
実はこの辺は結構曖昧で,eusでいえばrbrainをirteusに移行する時代から
とくに決定打っぽいのはない気がしてます.
samplerobotの中にも4脚ロボット
https://github.com/fkanehiro/openhrp3/blob/master/sample/
model/sample_4leg_robot.wrl
がありますが,
4脚ロボット
と
2脚2腕のロボットが4脚モードになる
は区別が難しいですね.
逆に,4脚ロボットが後ろ足の2本足だちになったときに,
前脚は腕になるかならないのかも難しい問題な気がしてます
(余談ですが,Humanoids2016で4脚ロボットを後ろ足立ちさせて制御させて,
ほらHumanoidでしょ,とジョークをいれたプレゼンをした人がいました)
プログラム的には,どちらも場合でも
4脚ロボットの前脚,2脚2腕ロボットの腕:rarm, larm
4脚ロボットの後脚,2脚2腕ロボットの脚:rleg, lleg
にしています(confの設定も,引数で与えるものも)
https://github.com/fkanehiro/hrpsys-base/blob/master/
sample/Sample4LegRobot/Sample4LegRobot.conf.in#L5
https://github.com/fkanehiro/hrpsys-base/blob/master/sample/SampleRobot/
SampleRobot.conf.in#L5
(Euslispでも,irteusにコンバートした4脚ロボットは,名前はfrlegのようについてますがslot変数はrarmになてると思います)
あくまでデフォルトな使い方なので,ケースベースにいくと
- 2脚のみのロボットは,st/abcを使い,腕にimpedanceは使ってない
- 上半身型ロボットは,st/abcは使ってなくて,腕にimpedanceを使う
- 2脚2腕ロボットは,st/abcを使い,かつ腕にimpedanceもいれてる
の3つは実際にこれらロボットがhrpsys-baseで運用されており,
このPRのメソッド変更ではこれら3つがサポート可能です.
(st/impedanceは力制御っぽい機能をもつ点でカブっていたりもしますが)
一方,
- 4脚ロボットなので(2脚ロボット同様に),st/abcを手足にいれて,手(前脚)にimpedanceはいれたくない
はこのPRでは対応できず,サブクラスで
def startDefaultUnstableControllers (self, ic_limbs=[], abc_limbs=["rleg", "lleg", "rarm", "larm"]):
super(HrpsysConfigurator, self).startDefaultUnstableController(ic_limbs, abc_limbs)
のようにユーザがデフォルトにしたい設定を定義するかんじのことを想定しています.
この辺,4脚ロボット vs 2脚2腕ロボットがよつんばいになったとき,
2脚2腕ロボット vs 4脚ロボットが後脚のみでたっているとき,
の違いに関するルール決めは,生物学的にも
https://ja.wikipedia.org/wiki/%E8%84%9A
https://ja.wikipedia.org/wiki/%E8%85%95
難しそうな予感がしてます
例えば
生物学的には「人間の腕は哺乳類の前肢にあたる」とも、反対に「哺乳類の前肢はヒトの腕にあたる」とも表現可能である。
はrarm=前脚,のようなかんじにもみえますし,
一般に生物学に限らず体部下位に付属し支えるものを指して脚と呼び
も,人間逆立ちのような「デフォルト」っぽくないときにはどうなってるのかわからなさそうで,
ハンドのようなエフェクタの有無も生物・ロボットともに手足どっちもいけそうなきがしています
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1130 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAeG3No5exVFe8H8rxCAWEMrr6BkV1AEks5r10CggaJpZM4NN9p8>
.
|
7889fc4
to
a5c8b86
Compare
ありがとうございます。 また、filter文などはreを使うようにし、if文入れ子になってたので
と書き直して、全体的にコメント、documentation部分に先日挙げたuse caseに関してかきました。 |
memo
|
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
+ # Filter out limb names not included in "Groups"
趣味の範囲だろうけど、デフォルトの値をセットするところとエラーチェックのコードが混在しているね.
エラーチェックならstartAutoBalancerとか、あるいはstartDefaultUnstableControllersの先頭で引数チェックのコーナをつけて、エラーだったらちゃんとワーニングとかをだすほうが、整理されていますでしょうか.
…--
◉ Kei Okada
2017-05-08 22:03 GMT+09:00 Kei Okada <[email protected]>:
Refer to this link for build results (access rights to CI server needed):
https://jenkins.jsk.imi.i.u-tokyo.ac.jp:8080/job/hrpsys-qnx/2853/
Test PASSed.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1130 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAeG3M0jnnwuLWwvMlmfpjjRoPMC-WNYks5r3xKegaJpZM4NN9p8>
.
|
確かにおっしゃるとおりです |
とりあえずエレーチェックを抜いたPRをつくってマージして、残りはまた後日、でいいんでしょうか.
例えばICだとリムがなかえればRTCでエラーは表示しているとおもうので.
…--
◉ Kei Okada
2017年5月9日 9:28 Shunichi Nozawa <[email protected]>:
趣味の範囲だろうけど、デフォルトの値をセットするところとエラーチェックのコードが混在しているね.
エラーチェックならstartAutoBalancerとか、あるいはstartDefaultUnstableContro
llersの先頭で引数チェックのコーナをつけて、エラーだったらちゃんとワーニングとかをだすほうが、整理されていますでしょうか.
確かにおっしゃるとおりです
特に引数チェックと挙動の関係は、startDefaultUnstableControllersよりも中身側でしっかり行ったほうが良いですね。
ros service, euslispから使うことも考えると、idlよりも中身側の、RTCの内部で処理できるものは
したら良いきがしますので、一旦その方向も考えてみます。
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1130 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAeG3ELdjNUDbOg-UGs3Iia7mCfLym1_ks5r37M4gaJpZM4NN9p8>
.
|
… in startDefaultUnstableControllers and stopDefaultUnstableControllers
a5c8b86
to
404589a
Compare
そうですね、そのように変更しました。 |
Refer to this link for build results (access rights to CI server needed): |
travis通りました |
start/stop DefaultUnstableController関数で、上半身型、脚のみ型ロボットをサポートしました。
(そういえばsamplerobotの上半身のみバージョンはopenhrp3にないですね。脚のみは追加されてます)
よろしくお願いします。