Transforming Lidar Point Clouds

I was playing with datasets and wanted to share with what beautiful visualizations but wrong map alignment looks like.

The different colors represent scans but merged improperly (not aligned).

Looks like a mess.

But overall the coloring is important with debugging what this data represents.

Here’s what it looks like all merged together properly.

Especially the truck

Lidar map merging is a difficult task, and merging the data takes quite some time. So it is better to sample parts of a large data set and see if the algorithm is doing the right job.

At least the lidar above were all in the same 2D plane.

Here’s what it looks like if they weren’t — a blob of mess.

double roll = rtkMessage.roll();
double pitch = rtkMessage.pitch();
double yaw = – rtkMessage.heading();
double roll = deg2rad(rtkMessage.roll());
double pitch = deg2rad(rtkMessage.pitch());
double yaw = deg2rad(rtkMessage.heading());
double roll = deg2rad(rtkMessage.roll());
double pitch = deg2rad(rtkMessage.pitch());
double yaw = – deg2rad(rtkMessage.heading());

I tried a bunch of different methods and it turns out that I was using degrees in place of radians.

Here’s what after 5 days of working on this problem I finally solved

Here’s what the Google Maps view looks like

And here’s what the lidar point cloud data only looks like

Different view

Construction crane can be seen here.

radians roll/pitch

Very interesting in the map stitch process!

Compiling PDAL

sudo apt install libgdal-dev
git clone https://github.com/PDAL/PDAL.git
cd PDAL
mkdir build
cd build
cmake ..
make -j
sudo make install

List cmake options with installing this GUI

sudo apt-get install cmake-curses-gui ccmake ..
ccmake ..

To get geowave plugin support, you need JDK. Geowave increases the project’s complexity so I’ll defer that to later, if I get to it.

sudo apt install openjdk-8-jdk