Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add static message field mapping to Serializer class (#258)
* Add static message field mapping to Serializer class Currently, Serializer caches computed message field mapping in a protected field [1] of pcl::PointCloud<T> class. This commit adds a static variable to the Serializer::read() method and stores the mapping there instead. Motivation: as a part of boost::shared_ptr -> std::shared_ptr migration in PCL [2] we have changed the type of the aforementioned protected field. Later on we were informed that this broke pcl_ros. This was unexpected since the field and the associated accessor function are not a public API. After some investigation we came to conclusion that pcl_ros is probably the only user of that field. With this in mind, we'd like to get rid of it altogether. Therefore, this commit serves two purposes: unbreak pcl_ros for PCL master and get rid of the dependency on non-public API that is going to be deprecated/removed soon. References: [1] https://github.com/taketwo/pcl/blob/0a6508ab6c18b5adff3aaf6ef1d2884647f9acba/common/include/pcl/point_cloud.h#L606 [2] PointCloudLibrary/pcl#2792 * Remove DefaultMessageCreator specialization for PointCloud The mapping between message data and object fields is now stored in Serializer, so there is no need to use pcl::detail::getMapping()
- Loading branch information