44 if ((top - base + 1) != axes) {
54 subDev_joint_encoders.resize(axes);
55 jointEncodersTimes.resize(axes);
56 subDev_motor_encoders.resize(axes);
57 motorEncodersTimes.resize(axes);
89 std::string parentName;
91 parentName = parent->getId();
114 if (subdevice->isValid()) {
115 subdevice->
view(pid);
116 subdevice->view(pos);
117 subdevice->view(posDir);
118 subdevice->view(vel);
119 subdevice->view(amp);
120 subdevice->view(lim);
121 subdevice->view(calib);
122 subdevice->view(info);
123 subdevice->view(iTimed);
124 subdevice->view(iTorque);
125 subdevice->view(iImpedance);
126 subdevice->view(iMode);
127 subdevice->view(iJntEnc);
128 subdevice->view(iMotEnc);
129 subdevice->view(iInteract);
130 subdevice->view(imotor);
131 subdevice->view(iVar);
132 subdevice->view(iCurr);
133 subdevice->view(iPWM);
179 size_t deviceJoints = 0;
183 yCError(
CONTROLBOARDWRAPPER,
"Part <%s>: IPositionControl interface was not found in subdevice. Quitting", parentName.c_str());
188 yCError(
CONTROLBOARDWRAPPER,
"Part <%s>: IVelocityControl nor IVelocityControl2 interface was not found in subdevice. Quitting", parentName.c_str());
197 if (pos !=
nullptr) {
199 if (!pos->getAxes(&tmp_axes)) {
204 yCError(
CONTROLBOARDWRAPPER,
"Part <%s>: attached device has an invalid number of joints (%d)", parentName.c_str(), tmp_axes);
207 deviceJoints =
static_cast<size_t>(tmp_axes);
210 if (!pos->getAxes(&tmp_axes)) {
215 yCError(
CONTROLBOARDWRAPPER,
"Part <%s>: attached device has an invalid number of joints (%d)", parentName.c_str(), tmp_axes);
218 deviceJoints =
static_cast<size_t>(tmp_axes);
221 if (deviceJoints < axes) {
223 than the one specified during configuration '%zu' for %s.",
232 if (!pos || !pos->getAxes(&subdevAxes)) {
233 yCError(
CONTROLBOARDWRAPPER) <<
"Device <" << parentName <<
"> attached to subdevice " << k.c_str() <<
" but it was not ready yet. \n"
234 <<
"Please check the device has been correctly created and all required initialization actions has been performed.";
238 totalAxis = deviceJoints;