Fixing various issues detected by rtabmap_slam tests (#1773)

* Fixing getNodeData missing compressed grids

* Fixing roundtrip laserScan <-> Pointcloud2 on all formats.

* Keep already compressed user_data and laser_scan if possible

* fixed double compression of user_data

* reorder headers

* removed dead function declaration

* expand test coverage
This commit is contained in:
matlabbe
2026-09-26 21:07:59 -07:00
committed by GitHub
parent 16fb2f0541
commit 66c72be7db
12 changed files with 396 additions and 21 deletions
+5 -1
View File
@@ -731,11 +731,15 @@ public:
/**
* Set user data. Detect automatically if raw or compressed. If raw, the data is
* compressed too. A matrix of type CV_8UC1 with 1 row is considered as compressed.
* compressed too, unless compressed user data is already set (only possible with
* @p clearPreviousData=false), which is then assumed to be that raw data compressed
* and kept as is. A matrix of type CV_8UC1 with 1 row is considered as compressed.
* If you have one dimension unsigned 8 bits raw data, make sure to transpose it
* (to have multiple rows instead of multiple columns) in order to be detected as
* not compressed.
* @param clearPreviousData, clear previous raw and compressed user data before setting the new one.
* With false, setting the raw data of compressed user data already set keeps
* the compressed one, like setLaserScan() and setRGBDImage() do.
*/
void setUserData(const cv::Mat & userData, bool clearPreviousData = true);
const cv::Mat & userDataRaw() const {return _userDataRaw;}
@@ -41,10 +41,6 @@ namespace rtabmap
namespace util3d
{
int RTABMAP_CORE_EXPORT getCorrespondencesCount(const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud_source,
const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud_target,
float maxDistance);
/**
* @brief Estimates the rigid 3D transformation between two point clouds using SVD.
*