An insect-inspired bionic sensor for tactile localization and material classification with state-dependent modulation