From 10ccce9871f3d3361e267b5f886fafdbe120b369 Mon Sep 17 00:00:00 2001 From: Stefano Date: Tue, 10 Sep 2024 14:34:05 +0200 Subject: [PATCH] Cleamed more warnings --- .../src/OpenXRJoypadModule.cpp | 1 - modules/SRanipal_module/src/GazeRetargeting.cpp | 16 ++++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/modules/OpenXRJoypad_module/src/OpenXRJoypadModule.cpp b/modules/OpenXRJoypad_module/src/OpenXRJoypadModule.cpp index 70e32c2a..d42d3b28 100644 --- a/modules/OpenXRJoypad_module/src/OpenXRJoypadModule.cpp +++ b/modules/OpenXRJoypad_module/src/OpenXRJoypadModule.cpp @@ -10,7 +10,6 @@ #include // YARP -#include #include #include #include diff --git a/modules/SRanipal_module/src/GazeRetargeting.cpp b/modules/SRanipal_module/src/GazeRetargeting.cpp index 70bcbf2a..3aacc3a2 100644 --- a/modules/SRanipal_module/src/GazeRetargeting.cpp +++ b/modules/SRanipal_module/src/GazeRetargeting.cpp @@ -20,7 +20,7 @@ void GazeRetargeting::setRobotEyeControlMode(int controlMode) { mode = controlMode; } - m_eyesMode->setControlModes(m_eyeAxis.size(), m_eyeAxis.data(), m_eyeControlModes.data()); + m_eyesMode->setControlModes(static_cast(m_eyeAxis.size()), m_eyeAxis.data(), m_eyeControlModes.data()); } } @@ -42,9 +42,9 @@ bool GazeRetargeting::homeRobotEyes() double expectedTime = maxError / iDynTree::deg2rad(m_maxEyeSpeedInDegS); - m_eyesPos->setRefSpeeds(m_eyeAxis.size(), m_eyeAxis.data(), m_eyemaxPositionMoveSpeeds.data()); + m_eyesPos->setRefSpeeds(static_cast(m_eyeAxis.size()), m_eyeAxis.data(), m_eyemaxPositionMoveSpeeds.data()); - if (!m_eyesPos->positionMove(m_eyeAxis.size(), m_eyeAxis.data(), m_eyePositionReferences.data())) + if (!m_eyesPos->positionMove(static_cast(m_eyeAxis.size()), m_eyeAxis.data(), m_eyePositionReferences.data())) { return false; } @@ -81,7 +81,7 @@ bool GazeRetargeting::setDesiredRobotEyeVelocities(double vergenceSpeedInDegS, d *m_vergenceVelocityptr = vergenceSpeedInDegS; *m_tiltVelocityptr = tiltSpeedInDegS; - return m_eyesVel->velocityMove(m_eyeAxis.size(), m_eyeAxis.data(), m_eyesVelocityReferences.data()); + return m_eyesVel->velocityMove(static_cast(m_eyeAxis.size()), m_eyeAxis.data(), m_eyesVelocityReferences.data()); } double GazeRetargeting::saturateRobotEyeVelocity(double inputVelocity, double inputPosition, double maxVelocity, double jointLowerBound, double jointUpperBound) @@ -203,7 +203,7 @@ bool GazeRetargeting::configure(const yarp::os::ResourceFinder &rf, std::shared_ for (size_t i = 0; i < nAxes; ++i) { std::string axisName; - if (!axisInfo->getAxisName(i, axisName)) + if (!axisInfo->getAxisName(static_cast(i), axisName)) { yError() << "[GazeRetargeting::configure] Failed to get the axis name of the neck joint with index" << i <<"." ; return false; @@ -211,15 +211,15 @@ bool GazeRetargeting::configure(const yarp::os::ResourceFinder &rf, std::shared_ if (m_useVersion && (axisName.find(eyes_version_name) != std::string::npos)) { - m_eyeVersIndex = i; + m_eyeVersIndex = static_cast(i); } else if (m_useVergence && (axisName.find(eyes_vergence_name) != std::string::npos)) { - m_eyeVergIndex = i; + m_eyeVergIndex = static_cast(i); } else if (m_useTilt && (axisName.find(eyes_tilt_name) != std::string::npos)) { - m_eyeTiltIndex = i; + m_eyeTiltIndex = static_cast(i); } }