Closed kosuke55 closed 5 years ago
you pass #'lambda
but you just eval
(actually funcall
) it inside :inverse-kinematics
method.
it seems that you can do the same thing as your example if you first calculate target coordinates before :inverse-kinematics
and pass it.
why do you need this function?
do you need this function for more complicated use case?
I wanted to move both grippers while keeping their relative positions.
When the shake-cocktail
sample function was executed with pr2, an error occurred in the pr2-roboto
part, so I modified it.
But certainly I can do the same if I eval before giving it to ik.
Also, I don't do anything more complicated than this function, so should I close it?
In your case, you don't need to modify this code because you just funcall x
with no args.
(setq c (mapcar #'(lambda (x) (if (functionp x) (funcall x) x)) c))
However, if you want to funcall x
with args or slot values, it would be interesting.
But I have no idea about how to use that kind of complicated use case.
If you think you don't need this function and you check that you can do the same thing without this PR, you can close this.
Sorry to reply late. I confirmed that I could do the same without this PR.
made it possible to give a function like lambda to the target value of inverse kinematics.
For example, the following shake-cocktail.