Skip to content

Commit

Permalink
Delete ICartesianSolver::setLimits per #145
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Feb 23, 2018
1 parent 10240fa commit 7ea0609
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 51 deletions.
3 changes: 0 additions & 3 deletions libraries/YarpPlugins/AsibotSolver/AsibotSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ class AsibotSolver : public yarp::dev::DeviceDriver, public ICartesianSolver
// Perform inverse dynamics.
virtual bool invDyn(const std::vector<double> &q,const std::vector<double> &qdot,const std::vector<double> &qdotdot, const std::vector< std::vector<double> > &fexts, std::vector<double> &t);

// Set joint limits.
virtual bool setLimits(const std::vector<double> &qMin, const std::vector<double> &qMax);

// -------- DeviceDriver declarations. Implementation in IDeviceImpl.cpp --------

/**
Expand Down
23 changes: 0 additions & 23 deletions libraries/YarpPlugins/AsibotSolver/ICartesianSolverImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,26 +497,3 @@ bool roboticslab::AsibotSolver::invDyn(const std::vector<double> &q,const std::v
}

// -----------------------------------------------------------------------------

bool roboticslab::AsibotSolver::setLimits(const std::vector<double> &qMin, const std::vector<double> &qMax)
{
for (int motor = 0; motor < NUM_MOTORS; motor++)
{
if (qMin[motor] > qMax[motor])
{
CD_ERROR("qMin > qMax at joint q%d (%f vs %f).\n", motor + 1, qMin[motor], qMax[motor]);
return false;
}
else if (qMin[motor] == qMax[motor])
{
CD_WARNING("qMin = qMax at joint q%d.\n", motor + 1);
}

this->qMax[motor] = qMax[motor];
this->qMin[motor] = qMin[motor];
}

return true;
}

// -----------------------------------------------------------------------------
10 changes: 0 additions & 10 deletions libraries/YarpPlugins/ICartesianSolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,6 @@ class ICartesianSolver
*/
virtual bool invDyn(const std::vector<double> &q,const std::vector<double> &qdot, const std::vector<double> &qdotdot, const std::vector< std::vector<double> > &fexts, std::vector<double> &t) = 0;

/**
* @brief Set joint limits
*
* @param qMin Vector of minimum joint values expressed in meters or degrees.
* @param qMax Vector of maximum joint values expressed in meters or degrees.
*
* @return true on success, false otherwise
*/
virtual bool setLimits(const std::vector<double> &qMin, const std::vector<double> &qMax) = 0;

};

} // namespace roboticslab
Expand Down
12 changes: 0 additions & 12 deletions libraries/YarpPlugins/KdlSolver/ICartesianSolverImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,15 +331,3 @@ bool roboticslab::KdlSolver::invDyn(const std::vector<double> &q,const std::vect
}

// -----------------------------------------------------------------------------

bool roboticslab::KdlSolver::setLimits(const std::vector<double> &qMin, const std::vector<double> &qMax)
{
for (int motor = 0; motor < getChain().getNrOfJoints(); motor++)
{
this->qMax(motor) = KinRepresentation::degToRad(qMax[motor]);
this->qMin(motor) = KinRepresentation::degToRad(qMin[motor]);
}
return true;
}

// -----------------------------------------------------------------------------
3 changes: 0 additions & 3 deletions libraries/YarpPlugins/KdlSolver/KdlSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ class KdlSolver : public yarp::dev::DeviceDriver, public ICartesianSolver
// Perform inverse dynamics.
virtual bool invDyn(const std::vector<double> &q,const std::vector<double> &qdot,const std::vector<double> &qdotdot, const std::vector< std::vector<double> > &fexts, std::vector<double> &t);

// Set joint limits.
virtual bool setLimits(const std::vector<double> &qMin, const std::vector<double> &qMax);

// -------- DeviceDriver declarations. Implementation in IDeviceImpl.cpp --------

/**
Expand Down

0 comments on commit 7ea0609

Please sign in to comment.