The invention provides a comprehensive pipe gallery three-dimensional routing inspection robot with autonomous navigation and positioning functions. A stroke positioning self-adaption coding unit anda decoding control unit are used for monitoring the stroke of the robot and receiving the coding marks, sent by stroke detecting coding equipment, of different routing inspection points, the coding marks are verified, if error codes occur, the coding rule is changed, and meanwhile the decoded routing inspection point position marks are sent to a server and a remote monitoring terminal; the strokedetecting coding equipment codes the positions of the different routing points according to the coding rule sent by the stroke positioning self-adaption coding unit and the decoding control unit; andwhen the corresponding routing inspection positions are detected, positions codes are sent to the stroke positioning self-adaption coding unit and the decoding control unit. According to the comprehensive pipe gallery three-dimensional routing inspection robot, through the provided stroke positioning self-adaption coding unit, the remote monitoring terminal, the server, the decoding control unit and the stroke detecting coding equipment, the robot autonomous navigation and positioning functions are achieved, and the problem that the error codes are received by the rotor and thus the robot cannot normally operate is avoided.