Forum

Author Topic: Definitive help in how Photoscan defines its Yaw Pitch and Roll Angles  (Read 8880 times)

kauevestena

  • Newbie
  • *
  • Posts: 7
    • View Profile
I need help to define in a definitive way to how photoscan defines its Yaw, Pitch and Roll... (the detailed convention)

The only definition I've found on the photoscan manual, is:

"yaw axis runs from top to bottom, pitch  axis  runs  from  left  to  right  wing  of  the  drone,  roll  axis  runs  from  tail  to  nose  of  the  drone"

I have already seen many posts here, but no one have a satisfatory answer for me

apparently, this guy define the orientation in the same way that photoscan defines:

http://danceswithcode.net/engineeringnotes/rotations_in_3d/rotations_in_3d_part1.html

Which is: "Tait-Bryan Euler angle convention using active, intrinsic rotations around the axes in the order z-y-x" (and in a right-handed system)
So:
Yaw is along the   Z axis;
Pitch is along the Y axis;
Roll is along the  X axis;
(that seems to be in accordance with the definition in photoscan manual)

That can define the Rz,Rx and Ry matrices, respectively, and the composed rotation (R) is defined by:


R = Rz*Rx*Ry


Are those right suppositions?

I want to know if the elemental rotations are defined in the same way thatthey are defined in the first image.

I want to know that if I have a rotation matrix I can extract the angles in the same using the formulas in the second image


Best regards,
Kaue

Grey_Area

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Definitive help in how Photoscan defines its Yaw Pitch and Roll Angles
« Reply #1 on: November 15, 2016, 12:06:51 AM »
I don't know if it's just a language thing but I was confused by your use of "along". Along implies transverse movement so left/right would be "along" X axis, up/down "along" Y axis and in/out (of screen) along Z axis. That would mirror the "start position of Agisoft's 3 axes (X (red), Y (green) and Z (blue).

So if we assumed the drone was facing into the screen, using the same start points...

Pitch would be AROUND X axis
Yaw would be AROUND Y axis
Roll would be AROUND Z axis

and if you look at the equatorial "grab handles" on the trackball, they match the colours too...when you start

The red one is vertical, and "edge on" = pitch (X, red)
The green one is horizontal and "edge on" = yaw (Y, green)
The blue one is "face on" = roll (Z, blue)

So

Red = X = Left/RIght = Pitch
Green = Y = Up/Down = Yaw
Blue = Z = In/Out (or forward/back if you prefer) = Roll

...I think...!

It doesn't help that Agisoft always starts with that orientation in terms of the axes - but puts my point clouds and photos in upside down!

Grey_Area

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Definitive help in how Photoscan defines its Yaw Pitch and Roll Angles
« Reply #2 on: November 15, 2016, 12:28:39 AM »
Or, since a picture is a thousand words...(thank you, Powerpoint!)

What I don't know is which direction the scale runs on each axis...is moving pitch from 0 to 10 degrees nose down or up?

Mind you, I have to say in terms of the lateral distance, I don't know if "10" is right and "-10" left of zero either!

The three axes Agisoft displays initially would indicate (to me at least) that positive movements along the axes represent;

X = Right
Y = Up
Z = Near (since the blue axis initally points towards you, implying -ve is "far" and +ve "near)

But that's just my assumption.


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15086
    • View Profile
Re: Definitive help in how Photoscan defines its Yaw Pitch and Roll Angles
« Reply #3 on: November 15, 2016, 06:19:11 PM »
Hello kauevestena,

Rotational angle axis directions and orientations can be checked even in Wikipedia: http://en.wikipedia.org/wiki/Flight_dynamics

The angles are applied in the following sequence: roll, pitch, negative yaw. This means that roll and pitch have clockwise and yaw - counterclockwise rotation meaning.

Could you please check if this approach applies correctly to your case?
Best regards,
Alexey Pasumansky,
Agisoft LLC

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15086
    • View Profile
Re: Definitive help in how Photoscan defines its Yaw Pitch and Roll Angles
« Reply #4 on: November 15, 2016, 06:22:09 PM »
It doesn't help that Agisoft always starts with that orientation in terms of the axes - but puts my point clouds and photos in upside down!

Hello Grey_Area,

The orientation of the unreferenced projects is mostly relied on the camera coordinate system, where Z axis is pointing from camera to the object, so for aerial datasets where the cameras are looking to the ground by default Z will be pointing from the camera to the ground and not in the opposite direction.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Grey_Area

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Definitive help in how Photoscan defines its Yaw Pitch and Roll Angles
« Reply #5 on: November 15, 2016, 10:08:50 PM »
I thought that too Alexey...except I recently shot some pphotos from my Pentax, feet firmly on the ground...and Agisoft STILL turned the model upside down!

kauevestena

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Definitive help in how Photoscan defines its Yaw Pitch and Roll Angles
« Reply #6 on: November 16, 2016, 02:43:40 PM »
It doesn't help that Agisoft always starts with that orientation in terms of the axes - but puts my point clouds and photos in upside down!

Hello Grey_Area,

The orientation of the unreferenced projects is mostly relied on the camera coordinate system, where Z axis is pointing from camera to the object, so for aerial datasets where the cameras are looking to the ground by default Z will be pointing from the camera to the ground and not in the opposite direction.

So, if we already define a system, using, for example, positions for the CP of the camera then the orientation of the camera will be defined in a system of axes with the same conventions of the reference?

I'm asking all of these, because I have a navigation system that can give me the orientation of the camera, related with the Local Level Frame, using the ENU convention. (That have the Y axis pointing forward, X to the right and Z up).

But, the euler angles are given in another convention and I need to apply a boresight direction cosine matrix. Then I need to extract from this matrix the Yaw, Pitch and Roll in the Photoscan convention, in order to use in Photoscan.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15086
    • View Profile
Re: Definitive help in how Photoscan defines its Yaw Pitch and Roll Angles
« Reply #7 on: November 16, 2016, 02:51:17 PM »
Hello kauevestena,

If you reference the model using control points (markers) PhotoScan will calculate the transformation that should be applied to the internal coordinate system to get the results in the real world or local coordinate system.

There's Python function PhotoScan.utils.mat2ypr() that extracts yaw, pitch and roll from the 3x3 rotation matrix, you can use that for your task, I assume.
Best regards,
Alexey Pasumansky,
Agisoft LLC