In our previous work, an obstacle avoidance algorithm, which used potential fields and a similar strategy to that adopted by a blind person to avoid obstacles whilst walking, was proposed. The problem analyzed consists of an AGV (Autonomous Guided Vehicle) which moves within an office environment with a known floor plan and uses an "electronic stick" made up of infrared sensors to detect unknown obstacles in its path. Initially, a global potential navigation function, defined for each room in the floor plan, incorporates information about the dimensions of the room and the position of the door which the AGV must use to leave the room. Whilst the AGV moves, this global potential navigation function is properly modified to incorporate information about any newly detected obstacle. The main interesting aspect of the proposed approach is that the potential function adaptation involves very low computational burden allowing for the use of Ultra-fast AGVs. Other distinctive features of the algorithm are that it is free from local minima, the obstacles can have any shape, low cost sensors can be used to detect obstacles and an appropriate balance is achieved between the use of the global and the local approaches for collision avoidance. Our present work is a refinement of this strategy that allows for an automatic real time adaptation of the algorithm's parameters. Now, the algorithm's functioning requires only that the minimum distance at which the AGV can approach an obstacle (i.e. the closest it can get to any obstacle) is defined a priori. Aspects of the real implementation of the algorithm are also discussed.