Autonomous detection, following and mapping of an underwater chain using sonar