# TF quaternion rotation problem

My goal is to rotate a quaternion by a yaw angle. q1 is the quaternion that I want to rotate

```
q1 = quaternion_from_euler(math.pi/2, math.pi/4, math.pi/4)
```

I want to rotate q1 by 1/4 pi yaw so I create another quaternion q2 for the purpose

```
q2 = quaternion_from_euler(0, 0, math.pi/4)
```

I then rotate q1 and I expect the result to be (pi/2, pi/4, pi/2) roll-pitch-yaw

```
q3 = quaternion_multiply(q1, q2)
```

But when I convert the result to Euler below is the value.

```
e3 = euler_from_quaternion(q3)
print e3
(1.5707963267948966, -0.0, 0.7853981633974484)
```

Looks like it rotates pitch by -pi/4 instead of the yaw by pi/4. Am I doing something wrong? Thanks for any help.