rtabmap
rtabmap copied to clipboard
Modifying the Signature Node SensorData
Hi,
I'm trying to create depth images from the point cloud, and project in to existing rgb images, so far so good, I managed to create something satisfying in the util3d.cpp projectCloudToCamerasImpl() method, however I'm trying to add the depth image (32FC1 format) into the corresponding node by this method :
node.sensorData().setRGBDImage(rgb,rgbdStiched,node.sensorData().cameraModels(),false)
But it seems that the sensorData() created previously did not have the RGBD information. Any help or suggestion?
It depends when this happens. In the main loop, the raw data is cleared here: https://github.com/introlab/rtabmap/blob/8682026396bb6043b1a54194d5b69ca1192b46c1/corelib/src/Rtabmap.cpp#L3533
So when I setRGBDImage my RGBDimage should be in CV_8UC1 type (compressed) therefore preventing from deleting.
If it is set before the memory is updated, it will be compressed by default and kept. It depends where you are currently doing the change. Here are the main steps:
- Acquire SensorData "data"
-
Rtabmap::process(data, ...)
-
Memory::update(data, ...)
-
Memory::createSignature(data, ...)
<- compressed in there
-
- loop closure detection and graph optimization stuff...
- Remove raw data
- Publish latest data
If you can modify the SensorData before it enters
Rtabmap::process()
that would be the best.
-