This is a simple implement to extract lines from 2d laser points. By the way, the code is simple but it works.
It's easy to compile the whole package if your enviroment is Ubuntu16.04 + ROS Kinetic, but it's ok to use the kernel algorithm in line_extractor.cpp without ROS. You have to write Makefile or CMakeLists.txt by yourself.
Good Luck!!