Skip to content

Commit 6de4868

Browse files
PeterJCLawWillB97
andcommitted
Rework the orientation description accounting for differences
It turns out that there's a subtlety in the code which I missed; the rot_{x,y,z} properties are in fact not simple aliases of the {yaw,pitch,roll} properties and turn out to have completely different values (i.e: not merely different arrangements of the same values, but actually a completely different representation of the same underlying orientation). Co-Authored-By: Will Barber <[email protected]>
1 parent edecab2 commit 6de4868

File tree

1 file changed

+31
-8
lines changed

1 file changed

+31
-8
lines changed

programming/sr/vision/index.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -187,35 +187,58 @@ One (possibly both) of them may change to resolve this.
187187
An `Orientation` object describes the orientation of a marker.
188188

189189
rot_x
190-
: Rotation of the marker about the cartesian x-axis, in radians.
190+
: Rotation of the marker about the cartesian x-axis, in radians. This is a
191+
pitch-like rotation.
191192

192193
Leaning a marker towards the camera increases the value of `rot_x`, while
193194
leaning it away from the camera decreases it. A value of either π or -π
194195
indicates that the marker is upright (there is a discontinuity in the value
195196
at π and -π, as both values represent the same position).
196197

197198
rot_y
198-
: Rotation of the marker about the cartesian y-axis, in radians.
199+
: Rotation of the marker about the cartesian y-axis, in radians. This is a
200+
yaw-like rotation.
199201

200202
Turning a marker clockwise (as viewed from above) decreases the value of
201203
`rot_y`, while turning it anticlockwise increases it. A value of 0 means
202204
that the marker is perpendicular to the line of sight of the camera.
203205

204206
rot_z
205-
: Rotation of the marker about the cartesian z-axis, in radians.
207+
: Rotation of the marker about the cartesian z-axis, in radians. This is a
208+
roll-like rotation.
206209

207210
Turning a marker anticlockwise (as viewed from the camera) increases the
208211
value of `rot_z`, while turning it clockwise decreases it. A value of 0
209212
indicates that the marker is upright.
210213

211-
roll
212-
: An alias for `rot_x`.
214+
There are additional attributes for the [principal axis rotations](https://en.wikipedia.org/wiki/Aircraft_principal_axes) of the marker.
215+
216+
yaw
217+
: A rotation about the about the vertical axis, in radians (an axis top to
218+
bottom through the token). Turning a marker clockwise (as viewed from above)
219+
increases the value of `yaw`, while turning it anticlockwise decreases it. A
220+
value of 0 means that the marker is perpendicular to the line of sight of
221+
the camera.
222+
223+
This differs from `rot_y` in the direction that increases the value.
213224

214225
pitch
215-
: An alias for `rot_y`.
226+
: A rotation about the transverse axis, in radians (an axis right to left
227+
across the token). Tilting the marker backward increases the value of
228+
`pitch`, while tilting it forwards decreases it. A value of 0 indicates that
229+
the marker is facing the camera square-on.
230+
231+
This differs from `rot_x` in the zero point and direction to increase the value.
232+
233+
roll
234+
: A rotation about the longitudinal axis, in radians (an axis normal from the
235+
apparent front to the back of the token, normal to the marker). Rotating the
236+
marker anti-clockwise (from the perspective of the camera) increases the
237+
value of `roll`, while rotating it clockwise decreases it. A value of 0
238+
indicates that the marker is upright.
239+
240+
This differs from `rot_x` in the zero point and direction to increase the value.
216241

217-
yaw
218-
: An alias for `rot_z`.
219242

220243
rotation_matrix
221244
: The rotation matrix represented by this orientation. A list of 3 lists, each with 3 items.

0 commit comments

Comments
 (0)