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) -> 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