Skip to content

Commit 7c6f530

Browse files
committed
Merge branch 'clarify-simulator-vision-differences'
2 parents 100f3f4 + 06e289d commit 7c6f530

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

programming/sr/vision/index.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ while True:
5656
print("I cannot see marker 0!")
5757
~~~~~
5858

59+
<div class="info" markdown="1">
60+
The simulated camera does not have `capture` or `save` methods.
61+
</div>
62+
5963
save
6064
: Take a photo through the webcam, and save it to the provided location.
6165

@@ -133,6 +137,10 @@ id
133137
size
134138
: The physical size of the marker, as the vision system expects it.
135139

140+
<div class="info" markdown="1">
141+
Pixel coordinate information is not available in the simulator.
142+
</div>
143+
136144
pixel_centre
137145
: A [`PixelCoordinates`](#PixelCoordinates) describing the position of the centre of the marker.
138146

@@ -156,6 +164,10 @@ cartesian
156164
[`PixelCoordinates`](#PixelCoordinates) {#PixelCoordinates}
157165
---------
158166

167+
<div class="info" markdown="1">
168+
Pixel coordinate information is not available in the simulator.
169+
</div>
170+
159171
A named tuple of `x` and `y` coordinates for the point, in pixels relative to the top left of the image.
160172

161173
~~~~~ python
@@ -179,9 +191,15 @@ print(marker.cartesian.x, marker.cartesian.y, marker.cartesian.z)
179191
[`Orientation`](#Orientation) {#Orientation}
180192
---------------
181193

182-
<div class="info">
194+
<div class="info" markdown="1">
183195
Orientation information is returned in different formats between the simulator and the physical robot kits.
184196
One (possibly both) of them may change to resolve this.
197+
198+
In the simulator the `roll`, `pitch` and `yaw` properties are strict aliases for the `rot_x`, `rot_y` and `rot_z` properties.
199+
Additionally the `rotation_matrix` and `quaternion` properties are not present.
200+
</div>
201+
<div class="warning" markdown="1">
202+
There is a bug in the simulator such that the `rot_x` and `rot_z` values are not reliable -- specifically they depend on the orientation of the robot itself within the simulated environment in addition to the orientation of the marker. This is believed to be a bug in Webots simulation software.
185203
</div>
186204

187205
An `Orientation` object describes the orientation of a marker.
@@ -254,6 +272,12 @@ quaternion
254272
[`SphericalCoordinate`](#SphericalCoordinate) {#SphericalCoordinate}
255273
---------------
256274

275+
<div class="info" markdown="1">
276+
Spherical coordinate information is returned in different formats between the simulator and the physical robot kits.
277+
278+
The simulator does not provide the `theta` or `phi` values and the values for `rot_x` and `rot_y` may be slightly different for equivalent positions.
279+
</div>
280+
257281
The spherical coordinates system has three values to specify a specific point in space.
258282

259283
distance

simulator/programming/index.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,9 @@ The simulated robot has a camera which provides position and orientation
126126
information about other objects within the simulation. This simulates the
127127
system of fiducial markers which the physical robot's camera can detect.
128128

129-
The information returned by the simulated vision API is generally in the same
130-
format and units as the physical robot's [vision API](/docs/programming/sr/vision/).
131-
132-
<div class="info">
133-
Orientation information is returned in different formats between the simulator and the physical robot kits.
134-
One (possibly both) of them may change to resolve this.
135-
</div>
129+
The information returned by the simulated vision API is similar to the physical
130+
robot's [vision API](/docs/programming/sr/vision/), however there are a number
131+
of differences as are noted in the vision docs.
136132

137133
### Pressure sensing
138134

0 commit comments

Comments
 (0)