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

Fix race condition, add todo

parent 70b6ba2c
No related branches found
No related tags found
1 merge request!242Add Prediction Interface and linear position prediction model to Object Memory
...@@ -439,10 +439,15 @@ namespace armarx::armem::server::obj::instance ...@@ -439,10 +439,15 @@ namespace armarx::armem::server::obj::instance
const Ice::Current&) const Ice::Current&)
{ {
objpose::ObjectPosePredictionResultSeq results; objpose::ObjectPosePredictionResultSeq results;
for (const auto& request : requests) // TODO(@phesch): Only fetch the required data in the lock, perform the predictions
// locally in this function's thread.
segment.doLocked([this,&requests,&results]()
{ {
results.push_back(segment.predictObjectPose(request)); for (const auto& request : requests)
} {
results.push_back(segment.predictObjectPose(request));
}
});
return results; return results;
} }
......
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