2D Inverse Kinematics Implementation

前端 未结 4 506
不思量自难忘°
不思量自难忘° 2021-02-06 02:03

I am trying to implement Inverse Kinematics on a 2D arm(made up of three sticks with joints). I am able to rotate the lowest arm to the desired position. Now, I have some questi

4条回答
  •  遥遥无期
    2021-02-06 02:09

    I'll give it a shot, but since my Robotics are two decades in the past, take it with a grain of salt.

    The way I learned it, every joint was described by its own rotation matrix, defined relative to its current position and orientation. The coordinate of the whole arm's endpoint was then calculated by combining the rotation matrices together.

    This achieved exactly the effect you are looking for: you could move only one joint (change its orientation), and all the other joints followed automatically.

    You won't have much chance in getting around matrices here - in fact, if you use homogeneous coordinates, all joint calculations (rotations as well as translations) can be modeled with matrix multiplications. The advantage is that the full arm position can then be described with a single matrix (plus the arm's origin).

    With this transformation matrix, you can tackle the inverse kinematic problem: since the transformation matrix' elements will depend on the angles of the joints, you can treat the whole calculation 'endpoint = startpoint x transformation' as a system of equations, and with startpoint and endpoint known, you can solve this system to determine the unknown angles. The difficulty herein lies that the equation may not be solvable, or that there are multiple solutions.

    I don't quite understand your second question, though - what are you looking for?

提交回复
热议问题