SharpIRSim

class wpilib.simulation.SharpIRSim(*args, **kwargs)

Bases: pybind11_object

Simulation class for Sharp IR sensors.

Overloaded function.

  1. __init__(self: wpilib.simulation._simulation.SharpIRSim, sharpIR: wpilib._wpilib.SharpIR) -> None

Constructor.

Parameters:

sharpIR – The real sensor to simulate

  1. __init__(self: wpilib.simulation._simulation.SharpIRSim, channel: typing.SupportsInt | typing.SupportsIndex) -> None

Constructor.

Parameters:

channel – Analog channel for this sensor

setRange(range: wpimath.units.meters) None

Set the range returned by the distance sensor.

Parameters:

range – range of the target returned by the sensor