Skip to content

Commit

Permalink
Merge pull request #681 from robotology/Nicogene-patch-1
Browse files Browse the repository at this point in the history
gazebo_yarp_controlboard: Fix reading of actuatedAxesPosMax in COUPLING group that was broken in v4.11.0
  • Loading branch information
traversaro authored Apr 8, 2024
2 parents 9d45e7a + 562f61b commit 83f01b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/controlboard/src/ControlBoardDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ bool GazeboYarpControlBoardDriver::gazebo_init()
// TODO this should be done in a better way
m_actuatedAxesVelLimits = m_jointVelLimits;
std::vector<double> actuated_axis_pos_limit_min;
bool vecOk = getVectorFromConf(coupling_group_bottle, actuated_axis_pos_limit_min, "actuatedAxesPosMin", "Actuated axes max position", nrOfActuatedAxes);
bool vecOk = getVectorFromConf(coupling_group_bottle, actuated_axis_pos_limit_min, "actuatedAxesPosMin", "Actuated axes min position", nrOfActuatedAxes);
if (vecOk)
{
for(size_t i = 0; i < m_actuatedAxesPosLimits.size(); ++i)
Expand All @@ -403,8 +403,8 @@ bool GazeboYarpControlBoardDriver::gazebo_init()
}

std::vector<double> actuated_axis_pos_limit_max;
vecOk = getVectorFromConf(coupling_group_bottle, actuated_axis_pos_limit_min, "actuatedAxesPosMax", "Actuated axes max position", nrOfActuatedAxes);
if (!vecOk)
vecOk = getVectorFromConf(coupling_group_bottle, actuated_axis_pos_limit_max, "actuatedAxesPosMax", "Actuated axes max position", nrOfActuatedAxes);
if (vecOk)
{
for(size_t i = 0; i < m_actuatedAxesPosLimits.size(); ++i)
{
Expand All @@ -413,7 +413,7 @@ bool GazeboYarpControlBoardDriver::gazebo_init()
}
else
{
yCError(GAZEBOCONTROLBOARD) << "Failed to get actuated axes min limits";
yCError(GAZEBOCONTROLBOARD) << "Failed to get actuated axes max limits";
return false;
}
yCInfo(GAZEBOCONTROLBOARD) << "using coupling_xcub_hand_mk5";
Expand Down

0 comments on commit 83f01b9

Please sign in to comment.