This paper proposes that pathfinding for mobile robots, in unknown environment, be based on extracting 3D features of an object using 2D image edge detection and infrared (IR) distance measuring sensor. Standard VGA color camera gives very good results only in environment that is very well illuminated. Our solution is based on IR camera which enables robot to navigate between obstacles even in complete darkness.