mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
NoEventsExample updated using camera rate
This commit is contained in:
@@ -57,7 +57,7 @@ void showUsage()
|
|||||||
int main(int argc, char * argv[])
|
int main(int argc, char * argv[])
|
||||||
{
|
{
|
||||||
ULogger::setType(ULogger::kTypeConsole);
|
ULogger::setType(ULogger::kTypeConsole);
|
||||||
ULogger::setLevel(ULogger::kWarning);
|
ULogger::setLevel(ULogger::kError);
|
||||||
|
|
||||||
if(argc < 8)
|
if(argc < 8)
|
||||||
{
|
{
|
||||||
@@ -100,7 +100,7 @@ int main(int argc, char * argv[])
|
|||||||
false, // no timestamps in filenames
|
false, // no timestamps in filenames
|
||||||
"", // no file with timestamps
|
"", // no file with timestamps
|
||||||
false, // assume that images are already rectified
|
false, // assume that images are already rectified
|
||||||
0.0f, // inf rate
|
(float)cameraRate,
|
||||||
opticalRotation);
|
opticalRotation);
|
||||||
|
|
||||||
if(camera.init(calibrationDir, calibrationName))
|
if(camera.init(calibrationDir, calibrationName))
|
||||||
@@ -113,7 +113,6 @@ int main(int argc, char * argv[])
|
|||||||
MapBuilder mapBuilder;
|
MapBuilder mapBuilder;
|
||||||
mapBuilder.show();
|
mapBuilder.show();
|
||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
float sleepTime = 1.0f/float(cameraRate);
|
|
||||||
|
|
||||||
SensorData data = camera.takeImage();
|
SensorData data = camera.takeImage();
|
||||||
int cameraIteration = 0;
|
int cameraIteration = 0;
|
||||||
@@ -150,7 +149,6 @@ int main(int argc, char * argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
data = camera.takeImage();
|
data = camera.takeImage();
|
||||||
uSleep(sleepTime);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mapBuilder.isVisible())
|
if(mapBuilder.isVisible())
|
||||||
|
|||||||
Reference in New Issue
Block a user