I tried using Wil` Selby's code for google cartographer, but the SLAM do not work as expected. The map will rotate and move when the lidars position is altered. A recording of the issue is shown here.
I'm using the OS1-64 lidar on ubuntu 18.04 ROS Melodic. I followed all the neccesary steps given here, but the map still moves.