Metallic spikes were a security measure used by the Galactic Empire aboard the Death Star. The Death Star included several of them throughout the station, with some not only being on the ground, but also on the ceilings and even directly on the walls.
During Luke Skywalker and Han Solo's rescue of the Rebel leader Princess Leia Organa from the battle station, they encountered several of these traps.
- Star Wars Hint Book