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

[jskeus/irteus/irtmodel.l] fix target joint table in :angle-vector #477

Closed

Conversation

mmurooka
Copy link
Member

@mmurooka mmurooka commented Jan 4, 2018

No description provided.

@mmurooka
Copy link
Member Author

mmurooka commented Jan 4, 2018

もっと良いテストコードが作れそうですが,

(load "package://hrpsys_ros_bridge_tutorials/euslisp/hrp2jsknts-interface.l")

(setq *robot* (instance hrp2jsknts-robot :init))
(objects (list *robot*))

(send *robot* :init-pose)
(send *robot* :lleg :crotch-r :joint-angle 1.2058)
(send *robot* :lleg :crotch-p :joint-angle -111.255)

(format t "crotch-r: ~a  crotch-p: ~a~%"
        (send *robot* :lleg :crotch-r :joint-angle)
        (send *robot* :lleg :crotch-p :joint-angle))

(send *robot* :angle-vector (send *robot* :angle-vector))

(format t "crotch-r: ~a  crotch-p: ~a~%"
        (send *robot* :lleg :crotch-r :joint-angle)
        (send *robot* :lleg :crotch-p :joint-angle))

をやっていて,発見しました.
PR前だと,以下のようにcrotch-pの角度が元から大きく変わってしまいおかしいです.

crotch-r: 1.2058  crotch-p: -111.255
crotch-r: 1.18522  crotch-p: -19.0

PR後だと,以下のように正しく修正されます.

crotch-r: 1.2058  crotch-p: -111.255
crotch-r: 1.0  crotch-p: -111.255

となります.

@k-okada
Copy link
Member

k-okada commented Jan 5, 2018

なかなか凄いバグなきがしますが,いままで出てこなかったんでしょうか?それともなんか変だなぁ,で,スルーしてきたのでしょうか.

@snozawa
Copy link
Contributor

snozawa commented Jan 5, 2018

euslibの時代からあった問題で、euslibの時代には治ってて、
irteusに移植するときにバグが入ったように思います。
testコードがirteusになかったのが良くなかったように思います。
(irteus/test/joint.lにmin-max-tableのテストがあるので、そこに追加できると良いかも)

mmurooka added a commit to mmurooka/jskeus that referenced this pull request Jan 5, 2018
…th min-max-table is on the edge of table shape. min-max-table test becomes failure with this update because of euslisp#477 issue.
mmurooka added a commit to mmurooka/jskeus that referenced this pull request Jan 5, 2018
…th min-max-table is on the edge of table shape. min-max-table test becomes failure with this update because of euslisp#477 issue.
mmurooka added a commit to mmurooka/jskeus that referenced this pull request Jan 5, 2018
…th min-max-table is on the edge of table shape. min-max-table test becomes failure with this update because of euslisp#477 issue.
mmurooka added a commit to mmurooka/jskeus that referenced this pull request Jan 6, 2018
…th min-max-table is on the edge of table shape. min-max-table test becomes failure with this update because of euslisp#477 issue.
mmurooka added a commit to mmurooka/jskeus that referenced this pull request Jan 6, 2018
…th min-max-table is on the edge of table shape. min-max-table test becomes failure with this update because of euslisp#477 issue.
mmurooka added a commit to mmurooka/jskeus that referenced this pull request Jan 6, 2018
…th min-max-table is on the edge of table shape. min-max-table test becomes failure with this update because of euslisp#477 issue.
mmurooka added a commit to mmurooka/jskeus that referenced this pull request Jan 6, 2018
…th min-max-table is on the edge of table shape. min-max-table test becomes failure with this update because of euslisp#477 issue.
mmurooka added a commit to mmurooka/jskeus that referenced this pull request Jan 6, 2018
…th min-max-table is on the edge of table shape. min-max-table test becomes failure with this update because of euslisp#477 issue.
mmurooka added a commit to mmurooka/jskeus that referenced this pull request Jan 6, 2018
…th min-max-table is on the edge of table shape. min-max-table test becomes failure with this update because of euslisp#477 issue.
@mmurooka
Copy link
Member Author

mmurooka commented Jan 6, 2018

#478 で再現テストと本PRの修正を合わせたPRにしたので,こちらはcloseします.

それともなんか変だなぁ,で,スルーしてきたのでしょうか.

だと思います.
・ min-max-tableの行列が2つの関節で同じような値を持っていると,大きなズレは生じない.
・ rotational-jointの:joint-angleメソッドの中でmin-max-tableを確認しているところは正しくて,:angle-vectorの中では間違えていたので,IKを解いてirtviewerで眺めるだけでは大丈夫で,*ri*に:angle-vectorを送るときにはじめて問題が起きる.
あたりがバグを見つけづらくしていたと思います.

@mmurooka mmurooka closed this Jan 6, 2018
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.

3 participants