-
Notifications
You must be signed in to change notification settings - Fork 44
Touch Sensor
This simulates a touch sensor. Unlike those found on a Lego EV3 robot, you cannot add components to the button, but you may configure its width and depth.
This works by detecting physics collision with the red button at the bottom of the sensor. Unlike ray casting method used by the Ultrasonic and Laser sensors, the physics collision method can detect collision with any points in the sensor area, with no risk of the obstacles falling between rays.
-
You cannot add components to the button.
-
A real sensor is spring loaded, and requires the button to be sufficiently depressed to detect a press. The simulated sensor will detect a touch on even the slightest touch, and it exerts no spring pressure on the obstacle.
Default values are shown below.
"type": "TouchSensor",
"options": {
"width": 2,
"depth": 2
}
width: Width of the sensor body. Note that the detection area is 2mm shorter than the sensor body.
depth: Depth of the sensor body. Note that the detection area is 2mm shorter than the sensor body.
Python References