Skip to content
Snippets Groups Projects

Remove laser scanner features memory

Files
7
@@ -482,6 +482,12 @@ void armarx::ArVizStorage::recordBatch(armarx::viz::data::RecordingBatch& batch)
batch.header.lastRevision = last.revision;
batch.header.firstTimestampInMicroSeconds = first.timestampInMicroseconds;
batch.header.lastTimestampInMicroSeconds = last.timestampInMicroseconds;
if (firstBatch)
{
batch.initialState = currentState;
firstBatch = false;
}
std::string filename = batchFileName(batch.header);
std::filesystem::path filePath = recordingPath / filename;
@@ -571,6 +577,7 @@ std::string armarx::ArVizStorage::startRecording(std::string const& newRecording
recordingMetaData.batchHeaders.clear();
}
firstBatch = true;
recordingTask = new RunningTask<ArVizStorage>(this, &ArVizStorage::record);
recordingTask->start();
@@ -640,7 +647,7 @@ armarx::viz::data::RecordingBatch armarx::ArVizStorage::getRecordingBatch(std::s
return result;
}
if (batchIndex < 0 && batchIndex >= (long)recording->batchHeaders.size())
if (batchIndex < 0 || batchIndex >= (long)recording->batchHeaders.size())
{
ARMARX_WARNING << "Batch index is not valid. Index = " << batchIndex
<< "Batch count: " << recording->batchHeaders.size();
Loading