Robot Inverse Kinematics

This inverse kinematic solver is only included in Professional.

With inverse kinematics you can control robots with the toolcenter position (TCP). The possible solutions to reach the toolcenter positions are calculated by the inverse kinematics.

With inverse kinematics, a robot can move along a path in point to point mode (PTP) or in a linear motion.

The Robot IK is located in this directory Assets/realvirtual/Professional/IK. Here you also find two demo scenes. The main demo scene can be also opened by selecting Additional demos > Robot Inverse Kinematic

Autonox demo models and prefabs

Explore the capabilities of Autonox robots with our dedicated demonstration model, featuring three distinct robot types within a single demo scene. Access these robots directly as prefabs for seamless integration into your projects.

Demo Scene Location:

  • Scene Path: Assets/realvirtual/Professional/IK/AutonoxRobots.unity

Prefabs Directory:

  • Prefab Location: Assets/realvirtual/Professional/IK/AUTONOX


  • Inverse kinematics can only be used for standard 6-axis industrial robots.

  • Only robots that can align the TCP, Axis6, 5 and 4 on a straight line are possible.

  • Only linear accelarations are possible, smooth (sinoide) accelarations of robot axis are currently not supported.

  • It is necessary that the positions of the robot axes can be defined by the following parameters:

Robot Preparation

The robot must be prepared for inverse kinematics taking into account the following things:

  • The zero point of the robot must have the Unity X axis aligned forward, Z upward, and Y to the left (in the following picture you see an additional right handed coirdinate system - which is normally used in industrial robotis - Unity’s coordinate system is left handed)

  • The RobotIK script itself must be connected to the game object in the zero point.

  • The first rotation axis must also be at the zero point.

  • All other axes must not be rotated with respect to the zero point (i.e. again X to the front, Z to the top and Y to the left)

  • The TCP (standard TCP as well as possibly own shifted TCPs for tools) must also have Z aligned to the top, Y to the left and X to the front in the stretched position).

  • On each Axis a Drive needs to be attached. For the drive limits and accelarations needs to be defined. The upper and lower limits are considered for calculating the possible solutions

  • All 6 axis needs to be assigned in the Axis list in RobotIK.

Prepared robot kinematic prefab

Simplify the process of defining new robots with our preconfigured robot kinematic prefab. This prefab streamlines the setup by including essential components like the RobotIK Script, Axis hierarchy with drives, and a predefined pick and place path. All you need to do is add the 3D data of the robot meshes.

Empty Robot Kinematic Prefab:

  • Prefab Path: Assets/realvirtual/Professional/IK/EmptyRobotKinematic.prefab

Steps to Customize Your Robot:

  1. Add Prefab to Scene:

    • Drag the prefab into your Unity scene to begin customization.

  2. Unpack Prefab:

    • Unpack the prefab in the scene to access its individual components for adjustment.

  3. Adjust Axis Positions:

    • Modify the positions of Axis 1 to Axis 6 to match the specifications provided in the robot's datasheet.

  4. Import CAD Data:

    • Use CADLink to import the robot's CAD data in STEP format for accurate representation.

  5. Export as FBX:

    • Create an FBX asset based on the imported CAD data using the FBX exporter.

  6. Add FBX to Model:

    • Place the exported FBX file into your Unity scene.

  7. Organize Components:

    • Move the components of Axis 1 to Axis 6 under the corresponding Axis in the unpacked prefab hierarchy.

  8. Calculate Kinematic Parameters:

    • Start "Calc Kinematic Parameters" in the RobotIK script to compute kinematic parameters automatically (see below)

  9. Start Testing:

    • Enter play mode to begin testing your robot's functionality and behavior within the Unity environment.

Calculating the kinematic parameters

Calculating the kinematic parameters needs to be done once when the robot is prepared. All parameters (a1,a2,b,c1,c2,c3,c4) which are shown in the picture above are automatically calculated und used later on for calculating the inverse kinematic solutions. Before calculating the parameters you also need to define in which position the robot is in editor mode. If the Elbow is oriented in Unity X-Direction you need to select Elbow in Unity X. Activate "Do not follow in Edit Mode" to override the parameterv "Follow in Edit Mode" at all current Target positions. After everything is prepared Calc Kinematic Parameters can be pushed and you will see all parameters in the RobotIK inspector window.

Defining Pathes

Robot paths are defined by lining up targets. A target is the alignment of the robot’s TCP at a defined position. Robot paths and targets must be created under the RobotIK script (the robot’s zero point) as a child game object.

To create a path, an empty gameobject must first be created and an IKPath script added. New targets can be added in the IKPath Inspector window by pushing Add new target. As soon as a target is active, the robot will also follow in the editor to the defined position. If this is not reachable, then a red sphere appears around the target.

If the path is activated, all targets below the path can be moved in the editor window. If the CTRL key is held down, the targets can be rotated.

The secuence of the pathes can be arranged by changing the order in the target list.

Axis correction

In some situations it might happen, that an axis is missallgined by 360 degrees. If you are using PTP movements you can use the Axis correction values to set the Axis positions for the defined target to a manually corrected value:

Turn correction

In some special cases it might happens, that IK calculation is returning axis 4 and 6, each of them turned 180 degrees to much (which is 360 degrees together). If you turn on Turn correction in the case of a sum of 360 of axis 3 and 5 on both axis the value is corrected by -180 degrees.

Position correction

When working with large robots, the inverse kinematics (IK) system may experience some inaccuracies in positioning. To address this, a correction value can be applied to improve accuracy. This value is calculated by comparing the desired tool center point (TCP) position, as defined by the target, with the actual TCP position. To apply the correction, the user must manually press the "Set Correction" button within the Target interface. The correction value can be removed by pressing the "Clear Correction" button.

Path Properties

Speed Override

Override Speed between 0 and 1 to slow down the path. Standard is 1.

Set new TCP

Optional. Sets a new TCP for the robot which is used for the path

Draw Path

Draws the path as a sequence of lines in editor window. Linear movements are drawn in green, PTP movements in yellow.

Draw Targets

Draws the targets in editor window. Targets can be moved by the handles. With pressed CTRL they can be rotated.


Sequence of targets.

Signal Start

A PLCOutput signal for starting the Path.


Starts the path directly at simulation start.

Loop Path

Starts the path again as soon as the path is ended.

Signal is Started

A PLCInput signal when the Path is started.

Signal Ended

A PLCInput signal when the Path has ended.

Start Next Path

A Pointer to the next path which can be started after this path.


Targets are the destination points in pathes. Within the target several parameters of the destination are controlled

Target Properties

Right Handed Robot Corrdinates

(Readonly) The position of the target in right handed coordinate system.

Speed to Target

The speed to the target. If set to 1 all axis are driving with the maximum speed (on PTP) or the given linear speed (on Linear Interpolation).

Linear Acceleration

Only applicable for Linear Move mode. The accelaration on the linear Path.

Interpolation to Target

The interpolation mode to the target.

Point to Point (PTP) All Axis will arrive at the same time at destination. The time is controlled by the axis which takes the longest time. The other axis acceleration is reduced so that they reach the target in the same time as the slowest axis. The movement of the TCP is in this case non linear and can not be controlled.

Point to Point unsynced Same as above but all axis drive with maximmum speed and reach the destination at different times.

Linear Linear Movement between the two Targets with the given linear accelaration and linear speed.

Linear Speed to Target

The linear speed to the target for Linear Interpolation.

Set Signal

Sets the defined Signal when the Target is reached.

Set Signal Duration

Sets the Signal for the defined duration

Wait for Seconds

The robot waits for the defined time after reaching the target.

Wait For Signal

Waits at the target before continuing the path until the defined signal is getting to true.

Pick and Place

Enables picking and placing MUs with a fixer at the Target


Reference to the Fixer object (which should be at the TCP)


True if Fixer should pick at the target


True if Fixer should place at the target


Slider for selecting one of the 8 possible solutions. Maybe not all solutions are possible.


An overview over all solutions (different positions of the robot axis) to reach the target. Some of the solutions might not be possible.

Axis Pos

The Axis positions (rotations) for the selected solutions.


True, if the Point is reachable with the selected solution.

© 2022 in2Sight GmbH - All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including printing, saving, photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher.

Last updated