Here's a possibility: wheel speed sensors are electrical devices and are subject to grounding problems. And of course wiring problems too.
But if the device actually moves or seats itself somehow when tapped with a hammer, it could havbe both mechanical and electrical ground problems.
My guess is an ABS fault code will merely indicate a wheel sensor failure on that wheel, though it might show whether it is a short or an open circuit. At least, though, that would confirm or deny the empiracle diagnosis made with the hammer.
__________________
Gary Brinck
2004 American Tradition; 2007 GMC Acadia
Homebase in the Ocala Nat'l Forest near Ocala, FL