Fixed error that if near the base there is a obstacle the agent set the
base in the obstacle