27 size_t subIndex =
device.
lut[j].deviceEntry;
48 for (
size_t subDev_idx = 0; subDev_idx <
device.
subdevices.size(); subDev_idx++) {
55 int wrapped_joints =
static_cast<int>((p->
top - p->
base) + 1);
56 int* joints =
new int[wrapped_joints];
60 for (
int j_dev = 0; j_dev < wrapped_joints; j_dev++) {
61 joints[j_dev] =
static_cast<int>(p->
base + j_dev);
65 j_wrap += wrapped_joints;
70 if (joints !=
nullptr) {
90 for (
int j = 0; j < n_joints; j++) {
91 subIndex =
device.
lut[joints[j]].deviceEntry;
119 size_t subIndex =
device.
lut[j].deviceEntry;
147 for (
size_t juser = p->
wbase, jdevice = p->
base; juser <= p->wtop; juser++, jdevice++) {
148 accs[juser] = references[jdevice];
172 for (
int j = 0; j < n_joints; j++) {
173 subIndex =
device.
lut[joints[j]].deviceEntry;
194 for (
int j = 0; j < n_joints; j++) {
195 subIndex =
device.
lut[joints[j]].deviceEntry;
200 for (
int j = 0; j < n_joints; j++) {
218 size_t subIndex =
device.
lut[j].deviceEntry;
227 return p->
pos->
stop(
static_cast<int>(off + p->
base));
239 size_t subIndex =
device.
lut[l].deviceEntry;
267 for (
int j = 0; j < n_joints; j++) {
268 subIndex =
device.
lut[joints[j]].deviceEntry;
311 for (
size_t juser = p->
wbase, jdevice = p->
base; juser <= p->wtop; juser++, jdevice++) {
312 vals[juser] = currs[jdevice];
333 size_t subIndex =
device.
lut[j].deviceEntry;
const yarp::os::LogComponent & CONTROLBOARD()
bool getCurrent(int m, double *curr)
bool getRefAcceleration(int j, double *acc)
bool getNumberOfMotors(int *num)
bool setRefAcceleration(int j, double acc)
bool getCurrents(double *currs)
bool setRefAccelerations(const double *accs)
bool getRefAccelerations(double *accs)
void printError(const std::string &func_name, const std::string &info, bool result)
int * subdev_jointsVectorLen
SubDevice ** subdevices_p
yarp::dev::IAmplifierControl * amp
yarp::dev::IPositionControl * pos
yarp::dev::ICurrentControl * iCurr
std::vector< DevicesLutEntry > lut
size_t maxNumOfJointsInDevices
SubDeviceVector subdevices
SubDevice * getSubdevice(size_t i)
virtual bool getCurrents(double *vals)=0
virtual bool getCurrent(int j, double *val)=0
virtual bool getCurrents(double *currs)=0
Get the instantaneous current measurement for all motors.
virtual bool getCurrent(int m, double *curr)=0
Get the instantaneous current measurement for a single motor.
virtual bool getRefAcceleration(int j, double *acc)=0
Get reference acceleration for a joint.
virtual bool setRefAcceleration(int j, double acc)=0
Set reference acceleration for a joint.
virtual bool stop(int j)=0
Stop motion, single joint.
virtual bool setRefAccelerations(const double *accs)=0
Set reference acceleration on all joints.
virtual bool getRefAccelerations(double *accs)=0
Get reference acceleration of all joints.
#define yCError(component,...)