diff --git a/content/api/vision/_index.md b/content/api/vision/_index.md index 9a6a7f94..09921604 100644 --- a/content/api/vision/_index.md +++ b/content/api/vision/_index.md @@ -20,6 +20,7 @@ The markers in the list have some useful attributes: - `pixel_centre` - returns the location in pixels of the centre of the marker in the captured image. - `cartesian` - returns details of the position of the marker in the [Cartesian](coordinates/#cartesian-coordinates) coordinate system. - `spherical` - returns details of the position of the marker in a [spherical](coordinates/#spherical-coordinates) coordinate system. +- `orientation` - returns the [Orientation](orientation) of the marker around its centre. - `polar` - *Deprecated*. Use the `spherical` attribute instead. {{% notice tip %}} diff --git a/content/api/vision/orientation.md b/content/api/vision/orientation.md new file mode 100644 index 00000000..6d4001a8 --- /dev/null +++ b/content/api/vision/orientation.md @@ -0,0 +1,31 @@ +--- +title: Orientation +--- + +{{% notice tip %}} +Orientation was added in version `1.2` of the robot software, see +[updates](/updates) how to update your robot. +{{% /notice %}} + +Orientation represents the rotation of a marker around the x, y, and z axes. +These can be accessed as follows: + +- `rot_x_radians` / `rot_x_degrees` - the angle of rotation in radians/degrees + counter-clockwise about the Cartesian x axis. +- `rot_y_radians` / `rot_y_degrees` - the angle of rotation in radians/degrees + counter-clockwise about the Cartesian y axis. +- `rot_z_radians` / `rot_z_degrees` - the angle of rotation in radians/degrees + counter-clockwise about the Cartesian z axis. (tip: in our use case the z + axis always faces the camera, and thus will appear as a clockwise rotation) + +Rotations are applied in order of z, y, x. + +The following table visually explains what positive and negative +rotations represent. + +| | | +|:-:|:-:| +| `rot_x_degrees = 45` | `rot_x_degrees = -45` | +| `rot_y_degrees = 45` | `rot_y_degrees = -45` | +| `rot_z_degrees = 45` | `rot_z_degrees= -45` | +| `0` in all axes | diff --git a/static/img/api/coordinate-orientations/m-45x0y0z.png b/static/img/api/coordinate-orientations/m-45x0y0z.png new file mode 100644 index 00000000..3e840b9f Binary files /dev/null and b/static/img/api/coordinate-orientations/m-45x0y0z.png differ diff --git a/static/img/api/coordinate-orientations/m0x-45y0z.png b/static/img/api/coordinate-orientations/m0x-45y0z.png new file mode 100644 index 00000000..9c6cdaea Binary files /dev/null and b/static/img/api/coordinate-orientations/m0x-45y0z.png differ diff --git a/static/img/api/coordinate-orientations/m0x0y-45z.png b/static/img/api/coordinate-orientations/m0x0y-45z.png new file mode 100644 index 00000000..daa4bfec Binary files /dev/null and b/static/img/api/coordinate-orientations/m0x0y-45z.png differ diff --git a/static/img/api/coordinate-orientations/m0x0y0z.png b/static/img/api/coordinate-orientations/m0x0y0z.png new file mode 100644 index 00000000..f66084cd Binary files /dev/null and b/static/img/api/coordinate-orientations/m0x0y0z.png differ diff --git a/static/img/api/coordinate-orientations/m0x0y45z.png b/static/img/api/coordinate-orientations/m0x0y45z.png new file mode 100644 index 00000000..84cdb274 Binary files /dev/null and b/static/img/api/coordinate-orientations/m0x0y45z.png differ diff --git a/static/img/api/coordinate-orientations/m0x45y0z.png b/static/img/api/coordinate-orientations/m0x45y0z.png new file mode 100644 index 00000000..34bb07d9 Binary files /dev/null and b/static/img/api/coordinate-orientations/m0x45y0z.png differ diff --git a/static/img/api/coordinate-orientations/m45x0y0z.png b/static/img/api/coordinate-orientations/m45x0y0z.png new file mode 100644 index 00000000..3034d941 Binary files /dev/null and b/static/img/api/coordinate-orientations/m45x0y0z.png differ