119
(1) Description: Returns "True" when the distance measured by the specified infrared distance sensor (No.)
meets the condition; otherwise, returns "False".
(2) Return value: Boolean
(3) Example: I retreat as you advance
In order to maintain an appropriate distance with the palm, the robot has mastered the "I retreat as you
advance, I advance as you retreat" strategy: if the distance measured by the infrared distance sensor is ≤ 20
cm, the robot translates backward; if the distance is ≥ 20 cm, the robot translates forward.
(1) Description: Obtain the distance measured by the specified infrared distance sensor (serial No.). The unit
is centimeter.
(2) Type: Information
(3) Example: Distance measuring using infrared beams
Measure the distance between the infrared distance sensor and your palm.