The transformer does not scale if many line points need to be transformed.
The resource intensive part lies in the point cloud 2 library and is not trivially optimizable.
I therefore suggest to scale the incomming mask down by a fix factor. The pointcloud is currently very dense, so dense that the localization drops most of its points.
This reduces the CPU load from 200% to 20% with a scaling by 0.5. The resulting point cloud is nearly indestigishable from the full res one.
Proposed changes
The transformer does not scale if many line points need to be transformed. The resource intensive part lies in the point cloud 2 library and is not trivially optimizable. I therefore suggest to scale the incomming mask down by a fix factor. The pointcloud is currently very dense, so dense that the localization drops most of its points. This reduces the CPU load from 200% to 20% with a scaling by 0.5. The resulting point cloud is nearly indestigishable from the full res one.
Necessary checks
catkin build