Skip to content
Snippets Groups Projects
Commit 7fe70ab4 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Merge branch...

Merge branch '126-arviz-recording-record-full-initial-scene-in-first-revision-when-recording-is-started' into 'master'

Resolve "ArViz Recording: Record full initial scene in first revision when recording is started"

Closes #126

See merge request !339
parents e3f0519b d30acfcf
No related branches found
No related tags found
1 merge request!339Resolve "ArViz Recording: Record full initial scene in first revision when recording is started"
......@@ -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();
......
......@@ -110,6 +110,7 @@ namespace armarx
std::vector<viz::data::TimestampedLayerUpdate> currentState;
std::vector<viz::data::TimestampedLayerUpdate> history;
long revision = 0;
bool firstBatch = false;
// We store all interactions in here
// But we curate them, so that only the last interaction with an element is reported
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment