its about ex3.1

```
def pose2d(pose):
x, y = pose.position.x, pose.position.z
theta = 2 * math.atan2(pose.orientation.y, pose.orientation.w)
return (x, y, theta)
```

is this theta the eular angle of the link rotating? And if it is, I am confused by using atan2 here for y-axis rotation.

where can I find the explanation of this quaternio-to-theta transformation?

Hello @desphunter ,

Here, theta represents the orientation of the links with respect to the global frame (which is world). We use the Y-axis because the robot can only move in the XZ plane of the simulated world, so for simplicity, we project it to a plane: the Z-axis of the 3D world is considered as the Y-axis of the 2D plane.

You can read more about quaternion-to-euler conversion here: Conversion between quaternions and Euler angles - Wikipedia

Hope this helps,