Possible conversion

If a particle rotates around an axis

its velocity is given by

Here, **angular velocity**.

The cross product is given by:

Which can be rewritten as a matrix product:

The motion of

differential equation:

Which have as solution:

** matrix exponential?**

Exponential of a *matrix* is defined as Taylor expansion:

Thanks to some nice properties on **Rodrigues' formula**

* Because

In

it about the

This is actually a rotation matrix!

**Example with Pinocchio**

```
# Rotates 1 radian about z
pin.exp3(np.array([0., 0., 1.]))
# array([[ 0.54030231, -0.84147098, 0. ],
# [ 0.84147098, 0.54030231, 0. ],
# [ 0. , 0. , 1. ]])
```

Here, the input is

Conversely, if we take

rotation matrix, the result will be:

We then found the rotation axis from the matrix!

**Example with Pinocchio**

```
# 1 radian about z (as computed previously)
R = np.array([[ 0.54030231, -0.84147098, 0. ],
[ 0.84147098, 0.54030231, 0. ],
[ 0. , 0. , 1. ]])
print(pin.log3(R))
# array([0., 0., 1.])
```

Here, the input is

such that

Back to the conversions...

If

rotating, we then have:

Because rotation affects equally all unit columns of

This implies the following identity:

What if a rigid body is rotating and translating ?

We can sum the velocity caused by rotation (

with some linear velocity

For another point

Varignon's formula

A **twist** is a 6-dimensional quantity packaging

We express a **twist** in a given frame,

The linear velocity

In 2D, a rotation + a translation result in a rotation about a different axis

In 3D, the object can also translate **along the rotation axis**

As a result, the motion can be **helicoidal**, like a *screw*.

That is why we refer to it as *screw theory*.

Suppose that we have

How to express it in

We now have a convenient way to change the frame of a twist:

the *adjoint map*

It turns out that

matrix representation of the twist:

We can integrate twists with exponential as well:

**Spatial algebra**

- Converts
*angular velocity*to*rotation matrix* `pin.exp3`

- Converts
- Converts
*rotation matrix*to*angular velocity* `pin.log3`

- Converts
- Converts
*twist*to*transformation matrix* `pin.exp6`

- Converts
- Converts
*transformation matrix*to twist `pin.log6`

- Converts

If this DoF rotates by

First, express the twist in

Then, express it in

And integrate it:

We could re-write

Thus:

We now show

**screw axis**.

A **screw axis** *twist* that is "unitary". It needs to be multiplied by a scalar to becomes a *twist*

For example,

For a serial robot, forward kinematics is given by:

where:

is the spatial*screw axis*of the*i-th*DoF is the displacement of the*i-th*DoF is the transformation matrix of the effector (when all DoF are zero)

In a "neutral" configuration, the twist

We need to account the fact that

*Jacobian*, it has dimension

is the number of degrees of freedom.

It maps a velocity

The same way *adjoint map*

to change

**Jacobian frames**

Some typical frames where we want to express the Jacobian:

`WORLD`

- The world frame,

`BODY`

- The body frame,

`LOCAL_WORLD_ALIGNED`

- A frame aligned with the world but placed at the body.

One way to think of it is by taking the following approximation:

This is an approximation because

during the motion, which is not taken in account in this formula.

**Computing target twist**

What if we cant to find the twist needed to move the robot from

to ?

We have

We want

Then

And hence:

Once we have a target twist, we can compute

Which is a linear equation, with naive solution:

Less naive:

--- For a given angular velocity $\omega$, we can note that: $R_{ab} [\omega] R_{ab}^T = [R_{ab} \omega]$ We can see the left hand term as: 1. Expressing a point from $a$ to $b$ 2. Computing its velocity 3. Taking the velocity back to $a$ This is then equivalent to changing $\omega$ from one basis to another.

Figure ?

T_ra = T_ra e^V_a