From 0fa3a7528d7862d4bbd8bdfaf53035f9e61bd98f Mon Sep 17 00:00:00 2001
From: Manfred Kroehnert <Manfred.Kroehnert@kit.edu>
Date: Tue, 25 Feb 2014 14:58:58 +0100
Subject: [PATCH] remove compiler warnings

---
 .../RobotAPI/GraspingWithTorques/GraspingWithTorques.cpp  | 8 ++------
 source/RobotAPI/OpenHand/OpenHand.cpp                     | 2 +-
 source/RobotAPI/motioncontrol/MotionControl.cpp           | 2 +-
 source/RobotAPI/motioncontrol/ZeroForceControl.cpp        | 2 +-
 source/RobotAPI/units/TCPControlUnit.cpp                  | 2 --
 5 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/source/RobotAPI/GraspingWithTorques/GraspingWithTorques.cpp b/source/RobotAPI/GraspingWithTorques/GraspingWithTorques.cpp
index 9d5477b55..c10bcd492 100644
--- a/source/RobotAPI/GraspingWithTorques/GraspingWithTorques.cpp
+++ b/source/RobotAPI/GraspingWithTorques/GraspingWithTorques.cpp
@@ -131,7 +131,7 @@ namespace armarx
         SingleTypeVariantList dataFields(VariantType::DatafieldRef);
 
 
-        for (int i=0; i<nodeSet->getSize(); i++)
+        for (size_t i=0; i<nodeSet->getSize(); i++)
         {
             jointNames.addVariant(nodeSet->getNode(i)->getName());      //nodes = joints
             dataFields.addVariant(context->getDatafieldRef(tempChannelRef, nodeSet->getNode(i)->getName()));
@@ -369,7 +369,7 @@ namespace armarx
         //set joint velocities manually to zero (DEBUG)
         //---------
 
-        RobotStatechartContext* rsContext = getContext<RobotStatechartContext>();
+        //RobotStatechartContext* rsContext = getContext<RobotStatechartContext>();
         SingleTypeVariantListPtr jointNames = getInput<SingleTypeVariantList>("jointNames");
         //SingleTypeVariantListPtr jointTorquesGraspList = getInput<SingleTypeVariantList>("jointTorquesGrasp");
         NameValueMap jointNamesAndValues;
@@ -381,11 +381,7 @@ namespace armarx
 
 
         //rsContext->kinematicUnitPrx->setJointTorques(jointNamesAndValues);
-
         //rsContext->kinematicUnitPrx->setJointVelocities(jointNamesAndValues);     //Auskommentiert nach letztem Test MP 2014-02-20
-
-
-
     }
 
 }
diff --git a/source/RobotAPI/OpenHand/OpenHand.cpp b/source/RobotAPI/OpenHand/OpenHand.cpp
index e756c1b24..a78a7cb41 100644
--- a/source/RobotAPI/OpenHand/OpenHand.cpp
+++ b/source/RobotAPI/OpenHand/OpenHand.cpp
@@ -88,7 +88,7 @@ namespace armarx
         SingleTypeVariantList dataFields(VariantType::DatafieldRef);
 
 
-        for (int i=0; i<nodeSet->getSize(); i++)
+        for (size_t i=0; i<nodeSet->getSize(); i++)
         {
             jointNames.addVariant(nodeSet->getNode(i)->getName());      //nodes = joints
             dataFields.addVariant(context->getDatafieldRef(tempChannelRef, nodeSet->getNode(i)->getName()));
diff --git a/source/RobotAPI/motioncontrol/MotionControl.cpp b/source/RobotAPI/motioncontrol/MotionControl.cpp
index b99a21ea9..644d0dcc4 100644
--- a/source/RobotAPI/motioncontrol/MotionControl.cpp
+++ b/source/RobotAPI/motioncontrol/MotionControl.cpp
@@ -483,7 +483,7 @@ void CalculateJointAngleConfiguration::defineParameters()
 
 void CalculateJointAngleConfiguration::run()
 {
-    RobotStatechartContext* context = getContext<RobotStatechartContext>();
+    //RobotStatechartContext* context = getContext<RobotStatechartContext>();
     //VirtualRobot::RobotPtr robot(new RemoteRobot(context->robotStateComponent->getRobotSnapshot("CalculateTCPPoseTime")));
 
     // TODO: with the following line, the IK doesn't find a solution, so this terrible hack must be used. Fix it!!!
diff --git a/source/RobotAPI/motioncontrol/ZeroForceControl.cpp b/source/RobotAPI/motioncontrol/ZeroForceControl.cpp
index 16f32e51b..f300daa87 100644
--- a/source/RobotAPI/motioncontrol/ZeroForceControl.cpp
+++ b/source/RobotAPI/motioncontrol/ZeroForceControl.cpp
@@ -125,7 +125,7 @@ namespace armarx {
         ARMARX_CHECK_EXPRESSION(vel->frame == curAcc->frame);
         ARMARX_CHECK_EXPRESSION(vel->frame == curForce->frame);
         float forceThreshold = 2.0f;
-        float maxSensitivity = 2.0f;
+        //float maxSensitivity = 2.0f;
 
         Eigen::Vector3f newVel(3);
         Eigen::Vector3f newAcc(3);
diff --git a/source/RobotAPI/units/TCPControlUnit.cpp b/source/RobotAPI/units/TCPControlUnit.cpp
index 2b8cfb88f..9af0f7958 100644
--- a/source/RobotAPI/units/TCPControlUnit.cpp
+++ b/source/RobotAPI/units/TCPControlUnit.cpp
@@ -631,14 +631,12 @@ namespace armarx
         while (step<maxNStep);
 
         float bestJVError = std::numeric_limits<float>::max();
-        int bestIndex = -1;
         for(unsigned int i=0; i < jointDeltaIterations.size(); i++)
         {
             if(jointDeltaIterations.at(i).first < bestJVError)
             {
                 bestJVError = jointDeltaIterations.at(i).first;
                 dThetaSum = jointDeltaIterations.at(i).second;
-                bestIndex = i;
             }
         }
 //        ARMARX_INFO << "best try: " <<  bestIndex << " with error: " << bestJVError;
-- 
GitLab