mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 16:57:46 +08:00
rtabmap_conversions tests and doc (#1449)
* Initial tests * more tests * More in-depth deskew() testing * slightly less verbose clamping corruption warning * added tf buffer related tests * added remaining tests * Added rosdoc2, improve tests when we require sync of odom stamp and sensor stamp * cleanup doc * fixing ci
This commit is contained in:
@@ -165,6 +165,21 @@ void RGBDImageViewer::callback(
|
||||
QMetaObject::invokeMethod(warningLabel_, "clear");
|
||||
}
|
||||
|
||||
// rgbdImageFromROS() does not copy the pixels: the SensorData points into the ROS
|
||||
// message buffers, which the subscription queue recycles as soon as this callback
|
||||
// returns. The event below is posted asynchronously and so outlives the callback,
|
||||
// therefore the images must be deep-copied first.
|
||||
if(!data.imageRaw().empty() || !data.depthOrRightRaw().empty()) {
|
||||
cv::Mat image = data.imageRaw().clone();
|
||||
cv::Mat depthOrRight = data.depthOrRightRaw().clone();
|
||||
if(!data.stereoCameraModels().empty()) {
|
||||
data.setStereoImage(image, depthOrRight, data.stereoCameraModels());
|
||||
}
|
||||
else {
|
||||
data.setRGBDImage(image, depthOrRight, data.cameraModels());
|
||||
}
|
||||
}
|
||||
|
||||
this->post(new rtabmap::SensorEvent(data));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user