From 904f3595ba9adeb9e16838167bfcde0f68f2e932 Mon Sep 17 00:00:00 2001 From: Martina Marek <martina.marek@gmail.com> Date: Wed, 15 Jul 2015 14:59:51 +0200 Subject: [PATCH] MMMPlayer: made nodesetname configurable --- source/RobotAPI/components/MMMPlayer/MMMPlayer.cpp | 4 ++-- source/RobotAPI/components/MMMPlayer/MMMPlayer.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/RobotAPI/components/MMMPlayer/MMMPlayer.cpp b/source/RobotAPI/components/MMMPlayer/MMMPlayer.cpp index 9c3ff7a6a..96170872e 100644 --- a/source/RobotAPI/components/MMMPlayer/MMMPlayer.cpp +++ b/source/RobotAPI/components/MMMPlayer/MMMPlayer.cpp @@ -45,7 +45,7 @@ void MMMPlayer::onInitComponent() desiredFPS = 1; usePIDController = getProperty<bool>("UsePIDController").getValue(); if(usePIDController) - usingTopic("RobotState"); + usingTopic(getProperty<std::string>("RobotNodeSetName").getValue()); } @@ -137,7 +137,7 @@ void MMMPlayer::run() if(currentFrame +1 < (int)motion->getNumFrames()) nextFrame = motion->getMotionFrame(currentFrame+1); targetPositionValues.clear(); - ARMARX_INFO << deactivateSpam(1) << "frame: " << currentFrame << " iv: " << interpolationValue; + ARMARX_INFO << deactivateSpam(1) << "frame: " << currentFrame << " " << VAROUT(interpolationValue); StringVariantBaseMap debugTargetValues; ARMARX_CHECK_EXPRESSION((int)jointNames.size() == frame->joint.rows()); for (size_t i = 0; i < jointNames.size(); ++i) { diff --git a/source/RobotAPI/components/MMMPlayer/MMMPlayer.h b/source/RobotAPI/components/MMMPlayer/MMMPlayer.h index 1e4417ac4..272c8823d 100644 --- a/source/RobotAPI/components/MMMPlayer/MMMPlayer.h +++ b/source/RobotAPI/components/MMMPlayer/MMMPlayer.h @@ -74,6 +74,8 @@ namespace armarx defineOptionalProperty<float>("Ki", 0.00001f, "Integral gain value of PID Controller"); defineOptionalProperty<float>("Kd", 1.0f, "Differential gain value of PID Controller"); defineOptionalProperty<float>("absMaximumVelocity", 120.0f, "The PID will never set a velocity above this threshold in degree"); + defineOptionalProperty<std::string>("RobotNodeSetName", "RobotState", "The name of the robot node set to be used (only need for PIDController mode)"); + } }; -- GitLab