Robotics Playground – Contact Switch

Description
This block outputs 1 if the sensor comes near a wall or obstacle. Otherwise it outputs zero.
Parameters
Robot ID: Number identifying the robot for which the sensor will be attached to.
Trigger distance: Minimum distance to an obstacle at which the sensor will detect contact
Sensor Position Offset: Position offset in meters relative to the center of the robot
Sensor Orientation Offset: Orientation offset in degrees relative to the forward-facing position of the robot
Sensor sample time: Time step interval at which the sensor updates the output values
