File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 55
66#include < yarp/os/Value.h>
77#include < yarp/os/Property.h>
8+ #include < yarp/dev/ControlBoardInterfaces.h>
89
910#include < ColorDebug.hpp>
1011
@@ -90,6 +91,29 @@ bool TransCoords::configure(yarp::os::ResourceFinder &rf)
9091 return false ;
9192 }
9293
94+ yarp::dev::IControlLimits * iControlLimits;
95+
96+ if (!robotDevice.view (iControlLimits))
97+ {
98+ CD_ERROR (" Could not view iControlLimits.\n " );
99+ return false ;
100+ }
101+
102+ std::vector<double > qMin, qMax;
103+
104+ for (int i = 0 ; i < numRobotJoints; i++)
105+ {
106+ double min, max;
107+ iControlLimits->getLimits (i, &min, &max);
108+ qMin.push_back (min);
109+ qMax.push_back (max);
110+ }
111+
112+ if (qMin[0 ] != qMax[0 ])
113+ {
114+ iCartesianSolver->setLimits (qMin, qMax);
115+ }
116+
93117 CD_SUCCESS (" numRobotJoints: %d.\n " , numRobotJoints);
94118 }
95119 else
You can’t perform that action at this time.
0 commit comments