Conventional underground gas pipeline equipment can only map straight pipelines at close distances. As such, a dual-robot mapping technique is proposed in this study, based on laser ranging and a gyroscope, for application to straight, bent, or sloped underground pipelines. This process is facilitated by two robots (a detecting vehicle and a mapping vehicle) alternately moving from the entrance to the exit of a pipe system. The two vehicles acquire data using individual distance sensors and a gyroscope, producing 3D maps of each section. Mapping results can then be produced for the entire pipeline by splicing images from multiple sections. Simulated validation experiments were conducted using horizontal straight, bent horizontal fixed turning radius, sloped uphill or downhill, and composite sections. Results showed this approach could effectively map different types of pipelines with inner diameters of 300–500 mm. Distance errors over 2000 m of travel were within 1 m, while the angular error was within 1.5°, demonstrating our approach to be highly accurate for complex pipeline system mapping.