# Inverse Kinematics for a Telescoping Arm

Hello! Because I was asked in this thread, I’m writing up a brief derivation for an inverse kinematic model for a 3-degree-of-freedom telescoping arm.

I did this derivation a long time ago, so there’s a decent chance I’ve forgotten something in the intervening years. Let me know if I’ve missed something important.

# Setup

First, we need to clarify exactly what we want from our inverse kinematic model. In general, inverse kinematics exists to convert a desired position for an end effector into a set of joint positions that can be controlled by a robot. In our case, this means we want to convert the (x, y, \theta) pose of our manipulator into our shoulder angle \phi_1, telescope length L, and wrist angle \phi_2.

In order to make this a little more clear, I’ve included a (custom, hand-made with love) drawing explaining every variable we’ll be using for this derivation:

Here’s a description of each variable:

## End-effector positions

• x: the X-position of our end-effector.
• y: the Y-position of our end-effector.
• \theta: the angle of the end-effector from horizontal.

## Joint values

• \phi_1: the angle of the shoulder joint’s pivot from horizontal.
• L: the length of the linear telescoping actuator.
• \phi_2: the angle of the wrist joint’s pivot from the axis of the shoulder joint.

## Intermediate values

• a: The X-position of the wrist joint.
• b: the Y-position of the wrist joint.

## Fixed constants

• r: the length of the fixed wrist limb.

# Forward kinematics

To begin, I’ll make a brief derivation of the forward-kinematic model for sake of completeness. This one is relatively easy to derive, so I’ll keep it short and sweet.

We start by deriving the position of the wrist joint:

a = L \cos(\phi_1)
b = L \sin(\phi_1)

We can then use these values to derive the position of the end effector:

\theta = \phi_1 + \phi_2
\begin{align} x &= a + r \cos (\theta) \\ &= L \cos(\phi_1) + r \cos (\phi_1 + \phi_2) \end{align}
\begin{align} y &= b + r \sin (\theta) \\ &= L \sin(\phi_1) + r \sin (\phi_1 + \phi_2) \end{align}

# Inverse kinematics

And now, the inverse model. We’ll start from the end effector and work our way backward:

a = x - r \cos( \theta)
b = y - r \sin (\theta)
\begin{align} L &= \sqrt{a^2 + b^2} \\ &= \sqrt{(x - r \cos( \theta))^2 + (y - r \sin (\theta))^2} \\ &= \sqrt{x^2 + y^2 + r^2 - 2rx \cos(\theta) - 2ry \sin(\theta)} \end{align}
\begin{align} \phi_1 &= \arctan_2(b, a) \\ &= \arctan_2(y - r \sin (\theta), x - r \cos( \theta)) \end{align}
\begin{align} \phi_2 &= \theta - \phi_1 \\ &= \theta - \arctan_2(y - r \sin (\theta), x - r \cos( \theta)) \end{align}

(where \arctan_2 is the 2-argument arc tangent).

I think that you should all be able to convert a global position on your robot to an (x, y, \theta) pose with little trouble, and likewise convert (\phi_1, L, \phi_2) setpoints to encoder values as well.

Thanks for reading this. Let me know if you have any questions (or if I did my math wrong).

13 Likes

Nice work. If anyone is interested in extending this to another configuration of robot arm, you might want to read about the Denavit–Hartenberg method

4 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.