Skip to content

Commit 96309b3

Browse files
authored
Merge pull request #287 from sourcebots/docs-22
Update docs for SP2022
2 parents a7408d9 + f02311d commit 96309b3

File tree

2 files changed

+6
-35
lines changed

2 files changed

+6
-35
lines changed

docs/source/api/vision/index.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,19 @@ Position
7474

7575
Each marker has a position in 3D space, relative to your webcam.
7676

77-
You can access the position using ``m.bearing`` and ``m.distance``.
77+
You can access the position using ``m.distance``, ``m.cartesian`` and ``m.spherical``.
7878

7979
.. code:: python
8080
8181
markers = r.camera.see()
8282
8383
for m in markers:
84-
print(m.bearing) # Bearing to the marker from the origin, in radians
85-
print(m.distance) # Distance to the marker from the origin, in metres
84+
print(m.distance) # Distance to the marker from the webcam, in metres
85+
print(m.spherical.y) # Bearing to the marker from the webcam, in radians
8686
87-
* ``m.bearing`` is equivalent to ``m.position.cylindrical.phi``.
88-
* ``m.distance`` is equivalent to ``m.position.cylindrical.p``.
87+
* ``m.distance`` is equivalent to ``m.cartesian.z`` or ``m.spherical.dist``.
8988

90-
For further information on position, including how to use ``m.position`` and the coordinate systems,
89+
For further information on position, including how to use ``m.cartesian``, ``m.spherical``, and the coordinate systems,
9190
see `Position <position.html>`__.
9291

9392
It is also possible to look at the `Orientation <orientation.html>`__ of the marker.

docs/source/api/vision/position.rst

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ Your robot supports three different coordinates systems for position:
55

66
* Cartesian
77
* Spherical
8-
* Cylindrical
98

10-
The latter are both variants of a `Polar Coordinates system <https://en.wikipedia.org/wiki/Polar_coordinate_system>`_.
9+
The latter is a `Polar Coordinates system <https://en.wikipedia.org/wiki/Polar_coordinate_system>`_.
1110

1211
Cartesian
1312
---------
@@ -67,30 +66,3 @@ The camera is located at the origin, where the coordinates are ``(0, 0, 0)``.
6766

6867
.. Note:: When searching for spherical coordinates, you may find a references with phi and theta the other way around.
6968
This is due to there being *two* conventions for this. We use the ISO 80000-2 16.3 system, as often found in physics.
70-
71-
Cylindrical
72-
-----------
73-
74-
.. figure:: /_static/api/vision/cylindrical.png
75-
:alt: The cylindrical coordinates system
76-
:scale: 40%
77-
78-
The cylindrical coordinates system
79-
80-
The `cylindrical coordinates system <https://en.wikipedia.org/wiki/Cylindrical_coordinate_system>`_ has three values
81-
to specify a point in space.
82-
83-
* ``ρ`` (rho) - The axial distance from the origin, in metres.
84-
* ``φ`` (phi) - The polar angle from the plane of the camera to the point, in radians.
85-
* ``z`` - The height of the point from the plane of the camera.
86-
87-
.. code:: python
88-
89-
markers = r.camera.see()
90-
91-
for m in markers:
92-
print(m.position.cylindrical.p) # The axial distance from the origin.
93-
print(m.position.cylindrical.phi) # The polar angle from the plane of the camera to the point, in radians.
94-
print(m.position.cylindrical.z) # The height of the point from the plane of the camera, in metres.
95-
96-
.. Note:: Whilst ``ρ`` is technically rho, we denote it as ``p`` in the API to make it easier to type.

0 commit comments

Comments
 (0)