Blog from February, 2018

Suppose, the GPS unit on a vehicle is offset from the vehicle geometrical centre. Therefore, you most likely need to convert the GPS trajectory as 6DOF points (x,y,z,roll,pitch,yaw) to the trajectory of the vehicle centre.

The other (almost identical) use case: you have got a trajectory from Visual SLAM relative to a lidar and now want to convert it into the vehicle centre trajectory.

Now, it can be done as following:

> gps_unit_offset=1,2,3,0.1,0.2,0.3
> cat gps_unit_trajectory.csv | points-frame --position $gps_unit_offset --fields frame

In the past, in such a situation, one would need to jump through the hoops with points-frame as following:

> cat gps_unit_trajectory.csv | csv-paste - value=$gps_unit_offset | points-frame --fields frame,position | csv-shuffle --fields ,,,,,,,,,,,,x,y,z,roll,pitch,yaw --output-fields x,y,z,roll,pitch,yaw

When joining two point clouds, if you would like to output a few nearest points, now you can use points-join with --size option:

> # single nearest point (same as before):
> echo 0,0,0 | points-join <( echo 0,0,1; echo 0,0,2; echo 0,0,3 ) --radius 5
0,0,0,0,0,1
> # up to a given number of nearest points:
> echo 0,0,0 | points-join <( echo 0,0,1; echo 0,0,2; echo 0,0,3 ) --radius 5 --size 2
0,0,0,0,0,1
0,0,0,0,0,2

Suppose, you have two point clouds cloud 1 and cloud 2. Suppose, for each point P from cloud 1 you would like to get all the points from cloud 2 that are not farther then a given radius from P

Then, you could use points-join --all

> cat cloud-1.csv | points-join cloud-2.csv --radius 1.5 --all

Now, you also can specify variable radius for points in cloud 1. (E.g. your radius may vary depending on your point cloud density or structure, as it happened in our use case.)

Then you could run:

> cat cloud-1.csv | points-join --fields x,y,z,radius cloud-2.csv --radius 1.5 --all

(Note that, as a limitation, the point-specific radius should not exceed --radius value.)