Skip to content

Inverse Kinematics for custom robot. Help required to build proper reduced model to generate IK solver. #2076

Answered by jorisv
threedee003 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @threedee003,

Your IK code is minimizing the error between the joint 6 (that support ur_arm_flange) and the desired configuration.
You should minimize the error between the frame ur_arm_flange and the desired configuration.

The following code will do the job (I put comment to explain the difference with your code) :

        while True:
            # framesForwardKinematics instead of forwardKinematics to compute the frame configuration
            pin.framesForwardKinematics(self.reduced_model, self.model_data, q)
            # oMf instead of oMi to take the frame (not the joint)
            iMd = self.model_data.oMf[self.id_end_effector].actInv(oMdes)
            err = pin.log(iMd).v…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@threedee003
Comment options

Answer selected by threedee003
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants