51 _subDevVerbose(false),
120 std::string parentName;
170 if ( ((
iMode==
nullptr)) && (_subDevVerbose )) {
174 if ((
iTorque==
nullptr) && (_subDevVerbose)) {
178 if ((
iCurr ==
nullptr) && (_subDevVerbose)) {
182 if ((
iPWM ==
nullptr) && (_subDevVerbose)) {
186 if ((
iImpedance==
nullptr) && (_subDevVerbose)) {
190 if ((
iInteract==
nullptr) && (_subDevVerbose)) {
194 if ((
iMotEnc==
nullptr) && (_subDevVerbose)) {
198 if ((
imotor==
nullptr) && (_subDevVerbose)) {
202 if ((
iVar ==
nullptr) && (_subDevVerbose)) {
206 if ((
info ==
nullptr) && (_subDevVerbose)) {
215 yCError(
CONTROLBOARDWRAPPER,
"Neither IPositionControl nor IPositionControl2 interface was not found in subdevice. Quitting");
221 yCError(
CONTROLBOARDWRAPPER,
"Neither IVelocityControl nor IVelocityControl2 interface was not found in subdevice. Quitting");
238 if(deviceJoints <= 0)
240 yCError(
CONTROLBOARDWRAPPER,
"Part <%s>: attached device has an invalid number of joints (%d)", parentName.c_str(), deviceJoints);
253 yCError(
CONTROLBOARDWRAPPER,
"Part <%s>: attached device has an invalid number of joints (%d)", parentName.c_str(), deviceJoints);
258 if (deviceJoints<
axes)
261 than the one specified during configuration '%d' for %s.", parentName.c_str(), deviceJoints,
axes, k.c_str());
268 yCError(
CONTROLBOARDWRAPPER) <<
"Device <" << parentName <<
"> attached to subdevice " << k.c_str() <<
" but it was not ready yet. \n" \
269 <<
"Please check the device has been correctly created and all required initialization actions has been performed.";
const yarp::os::LogComponent & CONTROLBOARDWRAPPER()
yarp::dev::IControlLimits * lim
yarp::dev::IImpedanceControl * iImpedance
bool configure(int wbase, int wtop, int base, int top, int axes, const std::string &id, ControlBoardWrapper *_parent)
yarp::dev::IMotorEncoders * iMotEnc
yarp::dev::IControlMode * iMode
yarp::dev::IEncodersTimed * iJntEnc
yarp::dev::IVelocityControl * vel
yarp::sig::Vector subDev_motor_encoders
yarp::sig::Vector subDev_joint_encoders
yarp::sig::Vector motorEncodersTimes
yarp::dev::PolyDriver * subdevice
yarp::dev::IAmplifierControl * amp
yarp::dev::IAxisInfo * info
yarp::dev::IMotor * imotor
yarp::dev::IInteractionMode * iInteract
yarp::sig::Vector jointEncodersTimes
yarp::dev::IPositionControl * pos
yarp::dev::ITorqueControl * iTorque
yarp::dev::IPidControl * pid
yarp::dev::IPreciselyTimed * iTimed
bool attach(yarp::dev::PolyDriver *d, const std::string &id)
ControlBoardWrapper * parent
yarp::dev::IRemoteVariables * iVar
yarp::dev::IPWMControl * iPWM
yarp::dev::IPositionDirect * posDir
yarp::dev::IControlCalibration * calib
yarp::dev::ICurrentControl * iCurr
bool view(T *&x)
Get an interface to the device driver.
virtual bool getAxes(int *ax)=0
Get the number of controlled axes.
A container for a device driver.
bool isValid() const
Check if device is valid.
void resize(size_t size) override
Resize the vector.
#define yCError(component,...)
#define yCWarning(component,...)
An interface for the device drivers.
An interface to the operating system, including Port based communication.