Aligning pcd with UTM frame
Dear community,
I'd like to use GPS data together with NDT matching for vehicle localization. Specifically, I'm using Autoware which allows to use a pose derived from GPS to correct NDT matching. However, to do that, there must be a valid transform between the pose provided by the GPS (I guess the UTM frame)_ and the PCD (I guess the map frame). I saw some given examples where the pcd that is used is already referenced in the UTM frame. That is, the pcd points are specified in UTM coordinates. However, I have built the pcd by myself using ndt mapping and, as result, it has its own frame. How would you address this issue?
So far, I computed the transformation matrix to align my pcd to the UTM frame. I did that using cloudcompare. From the transformation matrix I derived a tf transform. However, the alignment is not fully correct (reasonably good in the x-y plane, but quite bad in z). There are several places in the map where the height difference w.r.t. other points does not correspond to reality. The wrong z value makes ndt failing to initialize the mapping algorithm, although the x-y points are a pretty good initial guess. I was thinking to project the GPS point (i.e., the derived UTM coordinate) into the pcd to get the corresponding z value. Does that make sense? I feel I am missing something here and that there must be a standard way to tackle this issue.
Thanks a lot,
Eduardo
Can't you tranform you map in z direction (or maybe in pitch and roll direction) so that height of pcd matches with GPS point?
I tried using only translation transform in z and it helps a bit, but it isn't a proper solution. I'm afraid that playing with pitch and roll might affect the current goodness of x-y values. I also noticed that, in the pcd, streets that are supposed to be flat, look slightly bent in the z axis. This is probably due to the outcome of mapping, but I guess it is a normal result, right? I think the real question is whether transforming the pcd is the best solution, or are there other alternative approches to achieve the same result?
Hello Eduardo, Can I ask how you set the transformation matrix to UTM coordinate? Thanks!
Even I faced the same problem, there seems to be some translation along the z-axis while map stitching using NDT. I tried with both, ndt_mapping and approximate_ndt_mapping.
I also tried fixing the z_pose to zero while mapping, so as to remove any translations along the z-axis. But the result was improperly stitched and still had some translations along the z-axis. I verified this translation by visualizing the ndt_pose(output pose form ndt_matching). It had some transform along z-axis.
Rather than trying to transform the pointcloud to UTM coordinates, I shifted the origin of the local "map" frame to the UTM coordinate.