diff --git a/source/RobotAPI/components/ArViz/ArVizStorage.cpp b/source/RobotAPI/components/ArViz/ArVizStorage.cpp index 1dc7d72978d50bc00aa39f448a09e81e88a022dc..e5d8c926aacb1feb00ca256e8134afed32730d02 100644 --- a/source/RobotAPI/components/ArViz/ArVizStorage.cpp +++ b/source/RobotAPI/components/ArViz/ArVizStorage.cpp @@ -92,8 +92,11 @@ void ArVizStorage::onConnectComponent() void ArVizStorage::onDisconnectComponent() { - recordingTask->stop(); - recordingTask = nullptr; + if (recordingTask) + { + recordingTask->stop(); + recordingTask = nullptr; + } } @@ -171,9 +174,10 @@ viz::data::LayerUpdates armarx::ArVizStorage::pullUpdatesSince(Ice::Long revisio result.updates.reserve(currentState.size()); for (auto& layer : currentState) { - if (revision < layer.revision) + if (layer.revision > revision) { result.updates.push_back(layer.update); + result.revision = std::max(result.revision, layer.revision); } } diff --git a/source/RobotAPI/components/ArViz/Coin/VisualizationRobot.cpp b/source/RobotAPI/components/ArViz/Coin/VisualizationRobot.cpp index e5b070ec0af7dfa8b6abb15772bd63694e7db3a1..7de0d53c86251b34067e1573f82100e3b414bd61 100644 --- a/source/RobotAPI/components/ArViz/Coin/VisualizationRobot.cpp +++ b/source/RobotAPI/components/ArViz/Coin/VisualizationRobot.cpp @@ -49,6 +49,9 @@ namespace armarx::viz::coin ARMARX_INFO << "Loading robot from " << fullFilename; result = VirtualRobot::RobotIO::loadRobot(fullFilename, loadMode); result->setThreadsafe(false); + // Do we want to propagate joint values? Probably not... + // Closing the hand on the real robot could be implemented on another level + result->setPropagatingJointValuesEnabled(false); } catch (std::exception const& ex) {