Obstacle visualization and detection are essential parts of autonomous driving. The capability of accurately and rapidly collecting 3D information of the surrounding environment plays a key role in driving decisions of autonomous vehicles. As an active detection device, LiDAR enables high-speed and real-time depth information acquisition by emitting laser pulses and then receiving echoes. However, the frame rate and density of the point cloud generated by conventional LiDARs are limited by the fixing trajectory of the beam-steering unit, which cannot satisfy the requirements of various scenes. This paper presented a novel non-repetitive scanning algorithm and a LiDAR prototype using a galvanometer scanner as the beam-steering unit. The algorithm achieves dynamic scanning between frame rate and lateral resolution by the superposition of multiple raw frames with sparser non-repetitive trajectory. The LiDAR was made of off-the-shelf components to limit the cost less than 450 US dollars and extend its application scenarios. Experimental results demonstrated that the proposed LiDAR achieved dynamic frame rate and lateral resolution. Each raw frame of point cloud has a lateral resolution of 190×16 and four raw frames with different trajectories synthesize a superposition frame with quadruple resolution of 190×64. Complex profiles of targets become clear with the superposition of multiple raw frames. Thus, the novel non-repetitive scanning improves the LiDAR performance of detecting obstacles with small sizes and maintains the detection of large obstacles at higher speed.