0

If I have two 3D (XYZ) positions at time t and time t+1, is it possible to compute the euler/orientation angles of the 2nd position (t+1) relative to t?

I can get yaw/Z pretty easily. Change of y over x, or atan2(dx, dy). Pitch/Y I think would be change of Z over distance travelled. And no I have no idea about roll/X.

In order to do this what other information is required? More points? Starting orientation?

I am trying to generate/simulate position, velocity, and orientation data where all I have is a series of points/waypoints, and the time between waypoints. Similar API to this matlab toolbox, where a user can enter waypoints, and time between waypoints, and generate the velocity, and orientation between waypoints. https://www.mathworks.com/help/nav/ref/waypointtrajectory-system-object.html

user2840470
  • 919
  • 1
  • 11
  • 23

1 Answers1

0

you can always construct 3 basis vectors and origin determining coordinate system just from 2 consequent points on your trajectory exploiting cross product.

However such system will tend to rotate along the trajectory axis as you have no anchor defined. To remedy that usually Up vector or whatever fixed direction you got is used as a start for the cross products. However if your trajectory gets too parallel to it rotation/twist singularities still occur.

To obtain Euler angles from this you can use Is there a way to calculate 3D rotation on X and Y axis from a 4x4 matrix.

Spektre
  • 49,595
  • 11
  • 110
  • 380