Skip to content

Commit

Permalink
flip checks because fingers move with negative pids
Browse files Browse the repository at this point in the history
  • Loading branch information
mfussi66 committed Dec 19, 2024
1 parent 65f229b commit 6efc729
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tools/ergocub-fingers-tuning/cpp/ident-finger/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 6efc729

Please sign in to comment.