Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

The angle between angle between two 3D positions around a specific axis can be found with:

For yaw(about Z-axis) atan2(dx, dy)

For pitch(about Y-axis) atan2(dz, dx)

where dx, dy, and dz are the distances between the two models along the respective axis.

You should check that math.