A pile driver - like melee weapon.
A common weapon in Real Robot Genre and other SF, but not necessarry used by the mecha themselves, as there are sometimes hand-held versions. They work much like real pile drivers, but rather then operating continuosly (for example, hydraulicaly), they typicaly work with a one-shot chemical charge driving the metal stake, complete with Spent Shells Shower and a revolver mechanism. Pile bunkers are are sometimes build into a special gauntlet or arm for mecha or humans. Often, like This Is a Drill, justified by the need to penetrate mecha armor. The spike returns to it's original position after each "shot" (how is not always apparent). Also, Pile Bunkers firing mechanism must be made from incredibly strong materials, or it will explode every time the spike strikes the target, like a gun with jammed barrel. Or, alternatively, won't be able to penetrate tough enough target. Guns that fire the spike away should go in the nailgun category.
Examples:Anime and Manga