mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-11 04:19:50 +08:00
DataRecorder: Can record odometry data if odometry is published by the camera (zed or realsense)
This commit is contained in:
@@ -180,7 +180,10 @@ bool DataRecorder::handleEvent(UEvent * event)
|
|||||||
if(camEvent->data().isValid())
|
if(camEvent->data().isValid())
|
||||||
{
|
{
|
||||||
UINFO("Receiving rate = %f Hz", 1.0f/timer_.ticks());
|
UINFO("Receiving rate = %f Hz", 1.0f/timer_.ticks());
|
||||||
this->addData(camEvent->data());
|
this->addData(
|
||||||
|
camEvent->data(),
|
||||||
|
camEvent->info().odomPose,
|
||||||
|
camEvent->info().odomCovariance.empty()?cv::Mat::eye(6,6,CV_64FC1):camEvent->info().odomCovariance);
|
||||||
|
|
||||||
if(!processingImages_ && this->isVisible() && camEvent->data().isValid())
|
if(!processingImages_ && this->isVisible() && camEvent->data().isValid())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4601,7 +4601,7 @@ void MainWindow::startDetection()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_dataRecorder && _camera)
|
if(_dataRecorder && _camera && _odomThread)
|
||||||
{
|
{
|
||||||
UEventsManager::createPipe(_camera, _dataRecorder, "CameraEvent");
|
UEventsManager::createPipe(_camera, _dataRecorder, "CameraEvent");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user