diff --git a/libraries/VisionIDL/vision.thrift b/libraries/VisionIDL/vision.thrift index d437d20c..bac6c175 100644 --- a/libraries/VisionIDL/vision.thrift +++ b/libraries/VisionIDL/vision.thrift @@ -38,12 +38,18 @@ service SceneReconstructionIDL /** * pause the scene reconstruction process */ - void pause(); + bool pause(); /** * start/resume the scene reconstruction process */ - void resume(); + bool resume(); + + /** + * reset the currently stored reconstruction + * @return bool + */ + bool reset(); /** * get current camera pose diff --git a/programs/sceneReconstruction/SceneReconstruction.cpp b/programs/sceneReconstruction/SceneReconstruction.cpp index 9789f672..b0ae68bb 100644 --- a/programs/sceneReconstruction/SceneReconstruction.cpp +++ b/programs/sceneReconstruction/SceneReconstruction.cpp @@ -310,16 +310,25 @@ bool SceneReconstruction::close() return cameraDriver.close(); } -void SceneReconstruction::pause() +bool SceneReconstruction::pause() { yCDebug(KINFU) << "Pausing"; isRunning = false; + return true; } -void SceneReconstruction::resume() +bool SceneReconstruction::resume() { yCDebug(KINFU) << "Resuming"; isRunning = true; + return true; +} + +bool SceneReconstruction::reset() +{ + yCDebug(KINFU) << "Resetting"; + kinfu->reset(); + return true; } return_pose SceneReconstruction::getPose() diff --git a/programs/sceneReconstruction/SceneReconstruction.hpp b/programs/sceneReconstruction/SceneReconstruction.hpp index 9c322be9..f4ec29ca 100644 --- a/programs/sceneReconstruction/SceneReconstruction.hpp +++ b/programs/sceneReconstruction/SceneReconstruction.hpp @@ -60,9 +60,11 @@ class SceneReconstruction : public yarp::os::RFModule, bool close() override; - void pause() override; + bool pause() override; - void resume() override; + bool resume() override; + + bool reset() override; return_pose getPose() override;