SharpIRSim
- class wpilib.simulation.SharpIRSim(*args, **kwargs)
Bases:
pybind11_object
Simulation class for Sharp IR sensors.
Overloaded function.
__init__(self: wpilib.simulation._simulation.SharpIRSim, sharpIR: wpilib._wpilib.SharpIR) -> None
Constructor.
- Parameters:
sharpIR – The real sensor to simulate
__init__(self: wpilib.simulation._simulation.SharpIRSim, channel: typing.SupportsInt) -> None
Constructor.
- Parameters:
channel – Analog channel for this sensor
- setRange(rng: wpimath.units.centimeters) → None
Set the range returned by the distance sensor.
- Parameters:
rng – range of the target returned by the sensor