Skip to content

Commit 2878722

Browse files
Distances are actually metres
Distance units are internally consistent, so as we define the sizes as millimetres, so are the outputs
1 parent 21b6036 commit 2878722

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

programming/sr/vision/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ while True:
4141
print("I can see", len(markers), "markers:")
4242

4343
for m in markers:
44-
print(" - Marker #{0} is {1} metres away".format(m.id, m.distance))
44+
print(" - Marker #{0} is {1} metres away".format(m.id, m.distance / 1000))
4545
~~~~~
4646

4747
see_ids
@@ -148,7 +148,7 @@ pixel_corners
148148
: A list of 4 [`Coordinate`](#Coordinate) instances, each representing the position of the corners of the marker.
149149

150150
distance
151-
: The distance between the camera and the centre of the marker, in metres.
151+
: The distance between the camera and the centre of the marker, in millimetres.
152152

153153
orientation
154154
: An [`Orientation`](#Orientation) instance describing the orientation of the marker.
@@ -219,7 +219,7 @@ The spherical coordinates system has three values to specify a specific point in
219219

220220
![A visual representation of Spherical coordinates. Source: SourceBots]({{ site.baseurl }}/images/content/vision/spherical.png)
221221

222-
- r - The radial distance, the distance from the origin to the point, in metres.
222+
- r - The radial distance, the distance from the origin to the point, in millimetres.
223223
- θ (theta) - The angle from the azimuth to the point, in radians.
224224
- φ (phi) - The polar angle from the plane of the camera to the point, in radians.
225225

@@ -230,6 +230,6 @@ rot_y
230230
: Rotation around the Y-axis, in radians, corresponding to `phi` on the diagram.
231231

232232
dist
233-
: Distance, in metres, corresponding to `r` on the diagram.
233+
: Distance, in millimetres, corresponding to `r` on the diagram.
234234

235235
The camera is located at the origin, where the coordinates are (0, 0, 0).

0 commit comments

Comments
 (0)