Skip to content

Commit ae8bb21

Browse files
committed
Add a section on simulated robot sensor inputs
1 parent c46578e commit ae8bb21

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

simulator/simulated_robot.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ This is shown as a red coloured block on the robot. You can access the servo usi
7373

7474
### Distance Sensors
7575

76+
<!-- Changing this? Consider updating the "Simulated robot inputs" section in `simulator/using_the_simulator.md` -->
77+
7678
Analogous to [ultrasound sensors](https://robocraze.com/blogs/post/what-is-ultrasonic-sensor), distance sensors allow you to retrieve the distance between your robot and an object. These are attached to analog pins A0-A5:
7779

7880
| Pin | Location | Required Mode |
@@ -104,10 +106,12 @@ Using the `digital_write` method, you can set these to `True` (On) or `False` (O
104106

105107
## Vision
106108

109+
<!-- Changing this? Consider updating the "Simulated robot inputs" section in `simulator/using_the_simulator.md` -->
110+
107111
The simulated robot has a camera which provides position and orientation
108112
information about other objects within the simulation. This simulates the
109113
system of fiducial markers which the physical robot's camera can detect.
110114

111-
You can access the camera with `robot.camera`. The simulated vision system matches the physical robot's vision API, so please use the [vision programming docs page]({{ site.baseurl }}/programming/vision/) as a reference. There are a few small differences between the simulator and the physical kit which are noted on that page.
115+
You can access the camera with `robot.camera`. The simulated vision system matches the physical robot's vision API, so please use the [vision programming docs page]({{ site.baseurl }}/programming/vision/) as a reference. There are a few small differences between the simulator and the physical kit which are noted on that page.
112116

113-
[arduino-programming]: {{ site.baseurl }}/programming/arduino/sr_firmware
117+
[arduino-programming]: {{ site.baseurl }}/programming/arduino/sr_firmware

simulator/using_the_simulator.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,16 @@ In the simulator, all logs are prefixed with the zone that the robot code is run
118118
~~~~~
119119

120120
This makes it possible to distinguish which logs are from which robot when they are viewed in Webots console panel.
121+
122+
## Simulated robot inputs
123+
124+
By default Webots will show an overlay of what the robot's [camera]({{ site.baseurl }}/simulator/simulated_robot#vision) can see in the top right of the simulation window.
125+
This can be useful to understand how the robot sees its world.
126+
Double-clicking this overlay will move the overlay to its own window.
127+
128+
Note that the view provided by Webots may include highlights of simulated markers which a real camera would not be able to see.
129+
These are filtered out for you by the simulated SR API.
130+
131+
The robot also features [distance sensors]({{ site.baseurl }}/simulator/simulated_robot#distance-sensors).
132+
To better understand how these sensors perceive the world it is possible to turn on a display of their interactions with the simulated world.
133+
Go to the menu **View** &rarr; **Optional Rendering** and select the option **Show DistanceSensor Rays**.

0 commit comments

Comments
 (0)