The application discloses a tunnel ROV centering cruising method and
system based on
sonar, and belongs to the technical field of
radio navigation. The method comprises the following steps: S1, echo data output by a forward-looking
sonar of an ROV traveling along a tunnel is acquired in real time, and adaptive
data analysis is performed frame by frame, a normalized intensity matrix after distance compensation, a
sonar range and a
detection threshold value obtained based on
maximum intensity value weighting are extracted therefrom; S2, a horizontal sector is divided into a
left half region, a right half region and a forward region, then target searching is performed and
left wall distance, right wall distance and forward distance are calculated; and then a
lateral movement speed instruction for controlling the ROV to move in the center is obtained by taking the difference between the
left wall distance and the right wall distance as the input of a
PID controller, and meanwhile, an advance speed instruction is planned according to the adaptive segmentation, and the centering cruising and forward
obstacle avoidance are realized by a flight control. The application can enable the ROV to always travel safely near the center line in the tunnel cross section, and improve the safety and autonomy of the inspection operation under the water filling state of the water conveying tunnel.