A sensor device for detecting a positional relationship between a first
member and a second member, includes a first charge-holding electrode
provided on a surface of the first member and holding a charge, a second
charge-holding electrode provided on the surface of the first member and
holding a charge differing from the charge held by the first
charge-holding electrode, a first charge-induced electrode provided on a
surface of the second member, the first charge-induced electrode having a
charge induced therein in accordance with the charge held by the first
charge-holding electrode, when the first charge-holding electrode
approaches the first charge-induced electrode, a second charge-induced
electrode provided on the surface of the second member, the second
charge-induced electrode having a charge induced therein in accordance
with the charge held by the second charge-holding electrode, when the
second charge-holding electrode approaches the second charge-induced
electrode.