From 369934fa80608fa32b74157ecf256611821c0320 Mon Sep 17 00:00:00 2001 From: Joan Sola <jsola@iri.upc.edu> Date: Wed, 21 Mar 2018 14:34:14 +0100 Subject: [PATCH] Improve CM buffer print --- src/problem.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/problem.cpp b/src/problem.cpp index 3989d2695..11852deb2 100644 --- a/src/problem.cpp +++ b/src/problem.cpp @@ -849,24 +849,21 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks) cout << endl; } - if (C->isMotion() && metric) + if (C->isMotion() ) { - try + CaptureMotionPtr CM = std::dynamic_pointer_cast<CaptureMotion>(C); + cout << " buffer size : " << CM->getBuffer().get().size() << endl; + if ( metric && ! CM->getBuffer().get().empty()) { - CaptureMotionPtr CM = std::static_pointer_cast<CaptureMotion>(C); - cout << " buffer size : " << CM->getBuffer().get().size() << endl; - if ( CM->getCalibSize() > 0 && ! CM->getBuffer().get().empty()) + cout << " delta preint : (" << CM->getDeltaPreint().transpose() << ")" << endl; + if (CM->hasCalibration()) { - cout << " delta preint : (" << CM->getDeltaPreint().transpose() << ")" << endl; cout << " calib preint : (" << CM->getCalibrationPreint().transpose() << ")" << endl; cout << " jacob preint : (" << CM->getJacobianCalib().row(0) << ")" << endl; cout << " calib current: (" << CM->getCalibration().transpose() << ")" << endl; cout << " delta correct: (" << CM->getDeltaCorrected(CM->getCalibration()).transpose() << ")" << endl; } } - catch (std::runtime_error& e) - { - } } if (depth >= 3) -- GitLab