EMB ERJ 145 ER/LR
Flight Crew Air Transport Pilot (ATP)
Human-Machine Interface; Troubleshooting
Aircraft Equipment Problem Less Severe
Flight Crew Returned To Departure Airport; Flight Crew Landed As Precaution; General Flight Cancelled / Delayed; General Declared Emergency
Aircraft
After gear retraction we heard a steady banging noise. I had the First Officer check the hydraulics page as it sounded a lot like Hydraulic Hammering. ATC cleared us up to 11;000 and we requested a lower altitude to look into a problem we were having. We leveled off at 4;000 per ATC and began troubleshooting. I noticed that the #1 Main gear was intermittently indicating 'in transit.'  We then referred to the QRH which had no guidance on this malfunction. I slowed the aircraft to 180 KTS and cycled the landing gear. When extended we got a good positive downlock indication (3 green [lights]). When retracted one more time we got the same result of Hydraulic Hammering and intermittent 'in transit' indications. Not knowing if this was a hydraulic system about to fail or a failed up lock; I had the landing gear extended; declared an emergency and returned to the airport for landing. We did not brace the passengers as the gear was solidly indicating green; down and locked and was not giving any indications otherwise.  Also; with the gear down the Hydraulic Hammering ceased. The landing was normal; and we were met by CFR who inspected the aircraft for external damage and then cleared us to continue to the gate. The flight was canceled shortly thereafter.
An E-145 flight crew opted to declare an emergency and return to their departure airport when the landing gear repeatedly failed to retract completely and; instead; produced a loud hammering noise.  The gear extended normally and a safe; normal landing was made.  The flight was canceled.