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 5
5
6
6
#include < yarp/os/Value.h>
7
7
#include < yarp/os/Property.h>
8
+ #include < yarp/dev/ControlBoardInterfaces.h>
8
9
9
10
#include < ColorDebug.hpp>
10
11
@@ -90,6 +91,29 @@ bool TransCoords::configure(yarp::os::ResourceFinder &rf)
90
91
return false ;
91
92
}
92
93
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
+
93
117
CD_SUCCESS (" numRobotJoints: %d.\n " , numRobotJoints);
94
118
}
95
119
else
You can’t perform that action at this time.
0 commit comments