Cockroach antennae have been extensively used for studying the multi functional sensory appendage that generates the olfactory, gustatory, tactile, thermal, and humidity senses. Of the variety of senses, the tactile sense is thought to play a key role for perceiving physical objects. Because most cockroach species are nocturnal, the tactile sense of the antenna would be essential to determine the position, shape, and texture of surrounding objects in the dark.
hope it helps

more detailed answer 
Antennae is essential for cockroaches to overcome obstacles they use antennae as sensory organs to gather information about any obstacle and also it's distance from them.