[irtgeo.l] enable :rotation-axis :xy :yz :zx :yx :zy :xz#568
[irtgeo.l] enable :rotation-axis :xy :yz :zx :yx :zy :xz#568Naoki-Hiraoka wants to merge 4 commits intoeuslisp:masterfrom
Conversation
irteus/irtgeo.l
Outdated
| (:difference-rotation | ||
| (coords &key (rotation-axis t)) | ||
| "return difference in rotation of given coords, rotation-axis can take (:x, :y, :z, :xx, :yy, :zz, :xm, :ym, :zm)" | ||
| "return difference in rotation of given coords, rotation-axis can take (:x, :y, :z, :xy, :yz, :zx, :xx, :yy, :zz, :xm, :ym, :zm)" |
There was a problem hiding this comment.
How about adding :yx :zy :xz?
There was a problem hiding this comment.
The documentation of :difference-position does not have :yx :zy :xz.
I made the documentation of :difference-rotation similar to :difference-position.
Lines 56 to 58 in 8902642
There was a problem hiding this comment.
I see.
But rotation-axis, the argument of :difference-rotation, can take :yx, :zy, :zx. This is clear from your commit. c3603fe#diff-23ea0c1757d7ef177d46886dd7b78a15R91
I think that good documentation supports other users. So how about changing the document of difference-position?
irteus/irtgeo.l
Outdated
| (transform (transpose (send self :worldrot)) | ||
| (scale (acos (v. a0 a1)) (normalize-vector (v* a0 a1)))))) | ||
| ((:xy :yx :yz :zy :zx :xz) | ||
| (setq a0 (send self :axis (case rotation-axis ((:xy :yx) :z) ((:yz :zy) :x) ((:zx :xz) :y))) |
There was a problem hiding this comment.
How about use 'let'. The following code is my suggestion.
((:xy :yx :yz :zy :zx :xz)
(let ((ax1 (case rotation-axis ((:xy :yx) :z) ((:yz :zy) :x) ((:zx :xz) :y)))
(ax2 (case rotation-axis ((:xy :yx) :x) ((:yz :zy) :y) ((:zx :xz) :z))))
(setq a0 (send self :axis ax1)
a1 (send coords :axis ax1))
(setq dif-rot
(transform (transpose (send self :worldrot))
(scale (acos (v. a0 a1)) (normalize-vector (v* a0 a1)))))
(let ((self-coords (send (send self :copy-worldcoords) :rotate (norm dif-rot) dif-rot)))
(setq a0 (send self-coords :axis ax2)
a1 (send coords :axis ax2))
(setq dif-rot
(transform (transpose (send self-coords :worldrot))
(scale (acos (v. a0 a1)) (normalize-vector (v* a0 a1))))))))
k-okada
left a comment
There was a problem hiding this comment.
please improve documentation/examples at https://github.com/euslisp/jskeus/blob/master/doc/irtmodel.tex#L1903-L1921
|
Thank you for contributing jskeus documentation PDF version of Japanese jmanual: jmanual.pdf |
|
In 85d63f9 , I added documentation Lines 1608 to 1609 in 9a271ed Lines 1608 to 1610 in 85d63f9 This PR cannot improve the example at https://github.com/euslisp/jskeus/blob/master/doc/irtmodel.tex#L1903-L1921 because the goal condition of this example is that ''Z axis of target-coords is on XZ plane of move-target'', and rotation-axis is not enough to represent such a complicated condition.
|
a484bc1 to
85d63f9
Compare
|
Thank you for contributing jskeus documentation PDF version of Japanese jmanual: jmanual.pdf |
|
There are few cases where this new feature is effective, but it certainly exists. |
|
Sorry to be late. I think this PR is partly effective when the robot grasps the cylinder. |
|
ありがとうございます.
|
|
|
|
なるほど,確かにmove-targetのY軸とtarget-coordsのZ軸が直交するのとmove-targetのZ軸とtarget-coordsのY軸が直交するのは違うね. このPRの実装だと円柱の把持のIKができないという認識であってるよね?上記のPR2の例はたまたまよさげだけど.とすると,平岡くんの解釈でPRを作りなおすのが良い気がする. |
|
その通りです. |



I enabled :rotation-axis
:xy:yz:zx:yx:zy:xzfor :inverse-kinematics.