From 6efc729dd4c0aff3a5a5bf3e61a868a9af1dcdb4 Mon Sep 17 00:00:00 2001 From: Mattia Fussi Date: Thu, 19 Dec 2024 15:18:41 +0100 Subject: [PATCH] flip checks because fingers move with negative pids --- src/tools/ergocub-fingers-tuning/cpp/ident-finger/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tools/ergocub-fingers-tuning/cpp/ident-finger/main.cpp b/src/tools/ergocub-fingers-tuning/cpp/ident-finger/main.cpp index e8cbfc7f..75097eb9 100644 --- a/src/tools/ergocub-fingers-tuning/cpp/ident-finger/main.cpp +++ b/src/tools/ergocub-fingers-tuning/cpp/ident-finger/main.cpp @@ -74,8 +74,8 @@ class PWMThread : public PeriodicThread { data_vec.push_back(std::move(data)); - const bool above_max = data.enc >= thr_max && pwm_ > .1; - const bool below_min = data.enc <= thr_min && pwm_ < -.1; + const bool above_max = data.enc >= thr_max && pwm_ < -.1; + const bool below_min = data.enc <= thr_min && pwm_ > .1; if (above_max || below_min) { if (above_max) { @@ -128,6 +128,7 @@ int main(int argc, char *argv[]) { ResourceFinder rf; rf.configure(argc, argv); + rf.setVerbose(false); rf.setQuiet(true); auto port = rf.check("port", Value("/ergocub/left_arm")).asString();