I don't think what you're asking is possible with the state of the art sadly. You cannot, AFAIK, generate a 3D map from a hand held 2D LIDAR without any other sensors. It's a very interesting question you're raising but I think it's a research question :)
A LIDAR is going to give you a 2D laserscan/Pointcloud. That 2D data will not possible to extrapolate to 3D, at least not in a straight forward way:
Let say you want to something like ICP and match the laser scan onto each other building the map. Now you rotate your 2D laserscan by x degree along the yaw axis. Assuming in your environment walls are straight and vertical, the 2D laser scan will be slightly larger than the original 2D laser scan. How will ICP be able to tell you that this laser scan is the same as the one before but tilted since they do not have overlapping regions. And that's where lies the whole problem of using a 2D laser scan to build a 3D map. You wont have enough of those overlaping areas.
That said, not everything is lost and you can still make it. Here is my take on this:
- Start the lidar with a horizontal scan.
- Use the first scan and start building a 2D map.
- Extrapolate the map assuming all walls are verticals and infinite.
- Using ICP or other algorithms to match incoming scans to your virtual walls. Correct the walls if needed.
- To detect roofs, progressively match incoming scans to walls until you find a scan that can't be match onto your walls.
- Using those scan to build fake walls that are perpendicular to the closest walls in the environment, but passes by a certain number of laser points. Note on scan can create multiple fake walls.
- Start again using ICP against your artificial walls.
- After a lot of scans, you should have a 3D map of the environment.
See how this algo "fakes" overlapping regions and use the incoming scans to figure out which overlapping regions are the correct ones.
If this ends up being a research paper, please contact me :P. Good luck to you.