Robot Arm Animation Using IK

About Inverse Kinematics (IK)

In an object hierarchy, parents normally transform their children as they are themselves transformed. For example, when a parent rotates 90°, its child also rotates 90°. These transformations are defined by rotation around pivot points and motion and scaling along pivot axes. Each object applies its parent’s transformation to its own. This way, all of the objects in the hierarchy get transformed. This method of applying transformation is called forward kinematics.

In order to have the objects at the end of the hierarchy do something particular, it may be necessary to add additional keyframes to objects in the middle of the chain. This is rarely accurate and usually has to be redone every time something changes. To avoid this, a system must be applied that will let objects at the end of the chain achieve the transformation (movement, scaling, rotation) goal. Since this involves working out the motion from the goals back to the beginning of the chain, this system is called inverse kinematics (IK).

An IK structure is basically a chain of parent/child relationships between objects having a start and stop (goal) point. IK calculates the behavior of the objects in the chain.

Tutorial: Animate a Robot Arm

In this section, you will use Bongo 2.0 to animate a robot arm that moves around in a circle. See the video below to see the result you are trying to achieve.

Before you start, if you don’t have any previous experience with Bongo. You might want to have a look at how animation hierarchies works in Bongo 2.

Open the example model

  1. Open the model RobotArmStart.3dm.
  2. From the Bongo menu or toolbar, open the Timeline and Animation Manager.

We will link parts of a robot arm together and control the arm movements through these links.

  1. From the Bongo Menu Select Utilities > Link Chain or use the BongoLinkChain command or click on the Link Chain icon in the toolbar. Link Chain icon
  2. At the Select Parent prompt, select the robot Base.
  3. At the Select Point To Move Pivot To prompt. Press Enter. No need to move object’s pivot, since it is already in the center. Select Bottom Part
  4. At the Select new link prompt, select the next robot Arm. At the Select Point To Move Pivot To prompt. Press Enter. Select arm nr 1
  5. At the Select new link prompt, select the next robot Arm. At the Select Point To Move Pivot To prompt. Select the point by having Osnap to Point on, see image below.
    Select arm nr 2
  6. At the Select new link prompt, select the next robot Arm. At the Select Point To Move Pivot To prompt. Select the point by having Osnap to Point on, see image below.
    Select arm nr 3
  7. At the Select new link prompt, select the next robot Arm. At the Select Point To Move Pivot To prompt. Select the point by having Osnap to Point on, see image below.
    Select arm nr 4
  8. At the Select new link prompt, select the last robot Arm. At the Select Point To Move Pivot To prompt. Select the center by having Osnap to Center on, see image below.
    Select arm nr 5
  9. At the Select new link prompt, select the point at the end of the robot arm. At the Select Point To Move Pivot To prompt. Press Enter. No need to move object’s pivot, since it is already in place.
    Select arm nr 6
  10. Press Enter to end the command.

Add the movement

  1. Select the point that’s on the circle. See image.
    Point to follow
  2. From the Properties tab, choose Bongo > Simple Constraints.
  3. Add a To Path constraint, when prompt Select curve, select the circle.
  4. Scrub the Timeline Slider or click the Play button to see that the point moves around the circle.

We will link the arm to the moving point and control the movement of the robot arm by using the Ik settings.

  1. Select the robot Base.
  2. From the Properties tab, choose Bongo > Part of an IK chain > Joint. For type choose Hinge, and Rotation Z, since we want the object to only rotate in the direction of the Z-axis.
  3. Select the next robot arm part.
  4. From the Properties tab, choose Bongo > Part of an IK chain > Joint. For type choose Hinge, and Rotation Z.
  5. Select the next robot arm part.
  6. From the Properties tab, choose Bongo > Part of an IK chain > Joint. For type choose Hinge, and Rotation Y, since we want the object to only rotate in the direction of the Y-axis.
  7. Select the next robot arm part.
  8. From the Properties tab, choose Bongo > Part of an IK chain > Joint. For type choose Hinge, and Rotation Y.
  9. Select the next robot arm part.
  10. From the Properties tab, choose Bongo > Part of an IK chain > Joint. For type choose Hinge, and Rotation Y.
  11. Select the next robot arm part.
  12. From the Properties tab, choose Bongo > Part of an IK chain > Joint. For type choose Hinge, and Rotation Y. Select the point at the end of the robot arm.
    Select arm nr 6
  13. From the Properties tab, choose Bongo > Part of an IK chain > Constraint. Press the Select Object -button, to constrain the point to an object.

    When prompt Select Object, select the point that is constrained to the circle.

    After you’ve selected the point, your robot arm will bend in order to constrain the two points.

Scrub the Timeline Slider or click the Play button to see that the robot arm moves around the circle.