Skip to content

Commit

Permalink
add jointPtr->GetLimits
Browse files Browse the repository at this point in the history
recover joint movement
  • Loading branch information
jgvictores committed Jun 6, 2017
1 parent 3f40266 commit e4dd0ee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions yarpplugins/YarpOpenraveControlboard/DeviceDriverImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ bool roboticslab::YarpOpenraveControlboard::open(yarp::os::Searchable& config) {

axes = manipulatorIDs.size();

for(int i=0; i<axes; i++)
{
OpenRAVE::RobotBase::JointPtr jointPtr = probot->GetJointFromDOFIndex(manipulatorIDs[i]);

std::vector<OpenRAVE::dReal> vLowerLimit;
std::vector<OpenRAVE::dReal> vUpperLimit;
jointPtr->GetLimits(vLowerLimit,vUpperLimit);

CD_INFO("Limits %d: [%f,%f]\n",i,vLowerLimit[0]*180.0/M_PI,vUpperLimit[0]*180.0/M_PI);

vectorOfJointPtr.push_back(jointPtr);
}

return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ class YarpOpenraveControlboard : public yarp::dev::DeviceDriver, public yarp::de
OpenRAVE::RobotBasePtr probot;
std::vector< int > manipulatorIDs;
std::vector<OpenRAVE::dReal> dEncRaw;

std::vector<OpenRAVE::RobotBase::JointPtr> vectorOfJointPtr;

};

Expand Down

0 comments on commit e4dd0ee

Please sign in to comment.