Skip to content

Commit

Permalink
Cleamed more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
S-Dafarra committed Sep 13, 2024
1 parent 228a7b2 commit 10ccce9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion modules/OpenXRJoypad_module/src/OpenXRJoypadModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <vector>

// YARP
#include <yarp/dev/FrameGrabberInterfaces.h>
#include <yarp/dev/IControlLimits.h>
#include <yarp/dev/IControlMode.h>
#include <yarp/dev/IEncodersTimed.h>
Expand Down
16 changes: 8 additions & 8 deletions modules/SRanipal_module/src/GazeRetargeting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int>(m_eyeAxis.size()), m_eyeAxis.data(), m_eyeControlModes.data());
}
}

Expand All @@ -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<int>(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<int>(m_eyeAxis.size()), m_eyeAxis.data(), m_eyePositionReferences.data()))
{
return false;
}
Expand Down Expand Up @@ -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<int>(m_eyeAxis.size()), m_eyeAxis.data(), m_eyesVelocityReferences.data());
}

double GazeRetargeting::saturateRobotEyeVelocity(double inputVelocity, double inputPosition, double maxVelocity, double jointLowerBound, double jointUpperBound)
Expand Down Expand Up @@ -203,23 +203,23 @@ 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<int>(i), axisName))
{
yError() << "[GazeRetargeting::configure] Failed to get the axis name of the neck joint with index" << i <<"." ;
return false;
}

if (m_useVersion && (axisName.find(eyes_version_name) != std::string::npos))
{
m_eyeVersIndex = i;
m_eyeVersIndex = static_cast<int>(i);
}
else if (m_useVergence && (axisName.find(eyes_vergence_name) != std::string::npos))
{
m_eyeVergIndex = i;
m_eyeVergIndex = static_cast<int>(i);
}
else if (m_useTilt && (axisName.find(eyes_tilt_name) != std::string::npos))
{
m_eyeTiltIndex = i;
m_eyeTiltIndex = static_cast<int>(i);
}
}

Expand Down

0 comments on commit 10ccce9

Please sign in to comment.