This paper presents a cost-effective strategy for real-time obstacle detection in unknown environments using autonomous service robots equipped with stereoscopic vision and a bio-inspired algorithm mimicking bacterial behavior. The approach utilizes dual cameras to estimate obstacle distances, significantly enhancing the robot's navigation capabilities in dynamic indoor settings. Laboratory tests demonstrate the algorithm's effectiveness and efficiency, showing high performance in obstacle location without requiring extensive computational resources.