3 #ifndef __TECHNOSOFT_IPOS_HPP__
4 #define __TECHNOSOFT_IPOS_HPP__
6 #include "TechnosoftIposBase.hpp"
22 public yarp::dev::IAxisInfoRaw,
23 public yarp::dev::IControlLimitsRaw,
24 public yarp::dev::IControlModeRaw,
25 public yarp::dev::ICurrentControlRaw,
26 public yarp::dev::IEncodersTimedRaw,
27 public yarp::dev::IImpedanceControlRaw,
28 public yarp::dev::IInteractionModeRaw,
29 public yarp::dev::IJointFaultRaw,
30 public yarp::dev::IMotorRaw,
31 public yarp::dev::IMotorEncodersRaw,
32 public yarp::dev::IPidControlRaw,
33 public yarp::dev::IPositionControlRaw,
34 public yarp::dev::IPositionDirectRaw,
35 public yarp::dev::IRemoteVariablesRaw,
36 public yarp::dev::ITorqueControlRaw,
37 public yarp::dev::IVelocityControlRaw,
47 bool open(yarp::os::Searchable & config)
override;
48 bool close()
override;
50 std::string id()
const override
51 {
return impl->id(); }
56 {
return impl->
getId(); }
78 bool getAxisNameRaw(
int axis, std::string & name)
override
79 {
return impl->getAxisNameRaw(axis, name); }
81 bool getJointTypeRaw(
int axis, yarp::dev::JointTypeEnum & type)
override
82 {
return impl->getJointTypeRaw(axis, type); }
86 bool setLimitsRaw(
int axis,
double min,
double max)
override
87 {
return impl->setLimitsRaw(axis, min, max); }
89 bool getLimitsRaw(
int axis,
double * min,
double * max)
override
90 {
return impl->getLimitsRaw(axis, min, max); }
92 bool setVelLimitsRaw(
int axis,
double min,
double max)
override
93 {
return impl->setVelLimitsRaw(axis, min, max); }
95 bool getVelLimitsRaw(
int axis,
double * min,
double * max)
override
96 {
return impl->getVelLimitsRaw(axis, min, max); }
100 bool getControlModeRaw(
int j,
int * mode)
override
101 {
return impl->getControlModeRaw(j, mode); }
103 bool getControlModesRaw(
int * modes)
override
104 {
return impl->getControlModesRaw(modes); }
106 bool getControlModesRaw(
int n_joint,
const int * joints,
int * modes)
override
107 {
return impl->getControlModesRaw(n_joint, joints, modes); }
109 bool setControlModeRaw(
int j,
int mode)
override
110 {
return impl->setControlModeRaw(j, mode); }
112 bool setControlModesRaw(
int * modes)
override
113 {
return impl->setControlModesRaw(modes); }
115 bool setControlModesRaw(
int n_joint,
const int * joints,
int * modes)
override
116 {
return impl->setControlModesRaw(n_joint, joints, modes); }
122 bool getCurrentRaw(
int m,
double * curr)
override
123 {
return impl->getCurrentRaw(m, curr); }
125 bool getCurrentsRaw(
double * currs)
override
126 {
return impl->getCurrentsRaw(currs); }
128 bool getCurrentRangeRaw(
int m,
double * min,
double * max)
override
129 {
return impl->getCurrentRangeRaw(m, min, max); }
131 bool getCurrentRangesRaw(
double * min,
double * max)
override
132 {
return impl->getCurrentRangesRaw(min, max); }
134 bool setRefCurrentRaw(
int m,
double curr)
override
135 {
return impl->setRefCurrentRaw(m, curr); }
137 bool setRefCurrentsRaw(
const double * currs)
override
138 {
return impl->setRefCurrentsRaw(currs); }
140 bool setRefCurrentsRaw(
int n_motor,
const int * motors,
const double * currs)
override
141 {
return impl->setRefCurrentsRaw(n_motor, motors, currs); }
143 bool getRefCurrentRaw(
int m,
double * curr)
override
144 {
return impl->getRefCurrentRaw(m, curr); }
146 bool getRefCurrentsRaw(
double * currs)
override
147 {
return impl->getRefCurrentsRaw(currs); }
151 bool getAxes(
int * ax)
override
152 {
return impl->getAxes(ax); }
154 bool resetEncoderRaw(
int j)
override
155 {
return impl->resetEncoderRaw(j); }
157 bool resetEncodersRaw()
override
158 {
return impl->resetEncodersRaw(); }
160 bool setEncoderRaw(
int j,
double val)
override
161 {
return impl->setEncoderRaw(j, val); }
163 bool setEncodersRaw(
const double * vals)
override
164 {
return impl->setEncodersRaw(vals); }
166 bool getEncoderRaw(
int j,
double * v)
override
167 {
return impl->getEncoderRaw(j, v); }
169 bool getEncodersRaw(
double * encs)
override
170 {
return impl->getEncodersRaw(encs); }
172 bool getEncoderSpeedRaw(
int j,
double * sp)
override
173 {
return impl->getEncoderSpeedRaw(j, sp); }
175 bool getEncoderSpeedsRaw(
double * spds)
override
176 {
return impl->getEncoderSpeedsRaw(spds); }
178 bool getEncoderAccelerationRaw(
int j,
double * spds)
override
179 {
return impl->getEncoderAccelerationRaw(j, spds); }
181 bool getEncoderAccelerationsRaw(
double * accs)
override
182 {
return impl->getEncoderAccelerationsRaw(accs); }
186 bool getEncoderTimedRaw(
int j,
double * encs,
double * time)
override
187 {
return impl->getEncoderTimedRaw(j, encs, time); }
189 bool getEncodersTimedRaw(
double * encs,
double * time)
override
190 {
return impl->getEncodersTimedRaw(encs, time); }
196 bool getImpedanceRaw(
int j,
double * stiffness,
double * damping)
override
197 {
return impl->getImpedanceRaw(j, stiffness, damping); }
199 bool setImpedanceRaw(
int j,
double stiffness,
double damping)
override
200 {
return impl->setImpedanceRaw(j, stiffness, damping); }
202 bool setImpedanceOffsetRaw(
int j,
double offset)
override
203 {
return impl->setImpedanceOffsetRaw(j, offset); }
205 bool getImpedanceOffsetRaw(
int j,
double * offset)
override
206 {
return impl->getImpedanceOffsetRaw(j, offset); }
208 bool getCurrentImpedanceLimitRaw(
int j,
double * min_stiff,
double * max_stiff,
double * min_damp,
double * max_damp)
override
209 {
return impl->getCurrentImpedanceLimitRaw(j, min_stiff, max_stiff, min_damp, max_damp); }
213 bool getInteractionModeRaw(
int axis, yarp::dev::InteractionModeEnum * mode)
override
214 {
return impl->getInteractionModeRaw(axis, mode); }
216 bool getInteractionModesRaw(
int n_joints,
int * joints, yarp::dev::InteractionModeEnum * modes)
override
217 {
return impl->getInteractionModesRaw(n_joints, joints, modes); }
219 bool getInteractionModesRaw(yarp::dev::InteractionModeEnum * modes)
override
220 {
return impl->getInteractionModesRaw(modes); }
222 bool setInteractionModeRaw(
int axis, yarp::dev::InteractionModeEnum mode)
override
223 {
return impl->setInteractionModeRaw(axis, mode); }
225 bool setInteractionModesRaw(
int n_joints,
int * joints, yarp::dev::InteractionModeEnum * modes)
override
226 {
return impl->setInteractionModesRaw(n_joints, joints, modes); }
228 bool setInteractionModesRaw(yarp::dev::InteractionModeEnum * modes)
override
229 {
return impl->setInteractionModesRaw(modes); }
233 bool getLastJointFaultRaw(
int j,
int & fault, std::string & message)
override
234 {
return impl->getLastJointFaultRaw(j, fault, message); }
238 bool getNumberOfMotorsRaw(
int * num)
override
239 {
return impl->getNumberOfMotorsRaw(num); }
241 bool getTemperatureRaw(
int m,
double * val)
override
242 {
return impl->getTemperatureRaw(m, val); }
244 bool getTemperaturesRaw(
double * vals)
override
245 {
return impl->getTemperaturesRaw(vals); }
247 bool getTemperatureLimitRaw(
int m,
double * temp)
override
248 {
return impl->getTemperatureLimitRaw(m, temp); }
250 bool setTemperatureLimitRaw(
int m,
double temp)
override
251 {
return impl->setTemperatureLimitRaw(m, temp); }
253 bool getGearboxRatioRaw(
int m,
double * val)
override
254 {
return impl->getGearboxRatioRaw(m, val); }
256 bool setGearboxRatioRaw(
int m,
double val)
override
257 {
return impl->setGearboxRatioRaw(m, val); }
261 bool getNumberOfMotorEncodersRaw(
int * num)
override
262 {
return impl->getNumberOfMotorEncodersRaw(num); }
264 bool resetMotorEncoderRaw(
int m)
override
265 {
return impl->resetMotorEncoderRaw(m); }
267 bool resetMotorEncodersRaw()
override
268 {
return impl->resetMotorEncodersRaw(); }
270 bool setMotorEncoderCountsPerRevolutionRaw(
int m,
double cpr)
override
271 {
return impl->setMotorEncoderCountsPerRevolutionRaw(m, cpr); }
273 bool getMotorEncoderCountsPerRevolutionRaw(
int m,
double * cpr)
override
274 {
return impl->getMotorEncoderCountsPerRevolutionRaw(m, cpr); }
276 bool setMotorEncoderRaw(
int m,
double val)
override
277 {
return impl->setMotorEncoderRaw(m, val); }
279 bool setMotorEncodersRaw(
const double * vals)
override
280 {
return impl->setMotorEncodersRaw(vals); }
282 bool getMotorEncoderRaw(
int m,
double * v)
override
283 {
return impl->getMotorEncoderRaw(m, v); }
285 bool getMotorEncodersRaw(
double * encs)
override
286 {
return impl->getMotorEncodersRaw(encs); }
288 bool getMotorEncoderTimedRaw(
int m,
double * encs,
double * stamp)
override
289 {
return impl->getMotorEncoderTimedRaw(m, encs, stamp); }
291 bool getMotorEncodersTimedRaw(
double * encs,
double * stamps)
override
292 {
return impl->getMotorEncodersTimedRaw(encs, stamps); }
294 bool getMotorEncoderSpeedRaw(
int m,
double * sp)
override
295 {
return impl->getMotorEncoderSpeedRaw(m, sp); }
297 bool getMotorEncoderSpeedsRaw(
double * spds)
override
298 {
return impl->getMotorEncoderSpeedsRaw(spds); }
300 bool getMotorEncoderAccelerationRaw(
int m,
double * spds)
override
301 {
return impl->getMotorEncoderAccelerationRaw(m, spds); }
303 bool getMotorEncoderAccelerationsRaw(
double * vaccs)
override
304 {
return impl->getMotorEncoderAccelerationsRaw(vaccs); }
308 bool setPidRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j,
const yarp::dev::Pid & pid)
override
309 {
return impl->setPidRaw(pidtype, j, pid); }
311 bool setPidsRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
const yarp::dev::Pid * pids)
override
312 {
return impl->setPidsRaw(pidtype, pids); }
314 bool setPidReferenceRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j,
double ref)
override
315 {
return impl->setPidReferenceRaw(pidtype, j, ref); }
317 bool setPidReferencesRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
const double * refs)
override
318 {
return impl->setPidReferencesRaw(pidtype, refs); }
320 bool setPidErrorLimitRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j,
double limit)
override
321 {
return impl->setPidErrorLimitRaw(pidtype, j, limit); }
323 bool setPidErrorLimitsRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
const double * limits)
override
324 {
return impl->setPidErrorLimitsRaw(pidtype, limits); }
326 bool getPidErrorRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j,
double * err)
override
327 {
return impl->getPidErrorRaw(pidtype, j, err); }
329 bool getPidErrorsRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
double * errs)
override
330 {
return impl->getPidErrorsRaw(pidtype, errs); }
332 bool getPidOutputRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j,
double * out)
override
333 {
return impl->getPidOutputRaw(pidtype, j, out); }
335 bool getPidOutputsRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
double * outs)
override
336 {
return impl->getPidOutputsRaw(pidtype, outs); }
338 bool getPidRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j, yarp::dev::Pid * pid)
override
339 {
return impl->getPidRaw(pidtype, j, pid); }
341 bool getPidsRaw(
const yarp::dev::PidControlTypeEnum & pidtype, yarp::dev::Pid * pids)
override
342 {
return impl->getPidsRaw(pidtype, pids); }
344 bool getPidReferenceRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j,
double * ref)
override
345 {
return impl->getPidReferenceRaw(pidtype, j, ref); }
347 bool getPidReferencesRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
double * refs)
override
348 {
return impl->getPidReferencesRaw(pidtype, refs); }
350 bool getPidErrorLimitRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j,
double * limit)
override
351 {
return impl->getPidErrorLimitRaw(pidtype, j, limit); }
353 bool getPidErrorLimitsRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
double * limits)
override
354 {
return impl->getPidErrorLimitsRaw(pidtype, limits); }
356 bool resetPidRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j)
override
357 {
return impl->resetPidRaw(pidtype, j); }
359 bool disablePidRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j)
override
360 {
return impl->disablePidRaw(pidtype, j); }
362 bool enablePidRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j)
override
363 {
return impl->enablePidRaw(pidtype, j); }
365 bool setPidOffsetRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j,
double v)
override
366 {
return impl->setPidOffsetRaw(pidtype, j, v); }
368 bool isPidEnabledRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j,
bool * enabled)
override
369 {
return impl->isPidEnabledRaw(pidtype, j, enabled); }
375 bool positionMoveRaw(
int j,
double ref)
override
376 {
return impl->positionMoveRaw(j, ref); }
378 bool positionMoveRaw(
const double * refs)
override
379 {
return impl->positionMoveRaw(refs); }
381 bool positionMoveRaw(
int n_joint,
const int * joints,
const double * refs)
override
382 {
return impl->positionMoveRaw(n_joint, joints, refs); }
384 bool relativeMoveRaw(
int j,
double delta)
override
385 {
return impl->relativeMoveRaw(j, delta); }
387 bool relativeMoveRaw(
const double * deltas)
override
388 {
return impl->relativeMoveRaw(deltas); }
390 bool relativeMoveRaw(
int n_joint,
const int * joints,
const double * deltas)
override
391 {
return impl->relativeMoveRaw(n_joint, joints, deltas); }
393 bool checkMotionDoneRaw(
int j,
bool * flag)
override
394 {
return impl->checkMotionDoneRaw(j, flag); }
396 bool checkMotionDoneRaw(
bool * flag)
override
397 {
return impl->checkMotionDoneRaw(flag); }
399 bool checkMotionDoneRaw(
int n_joint,
const int * joints,
bool * flag)
override
400 {
return impl->checkMotionDoneRaw(n_joint, joints, flag); }
402 bool setRefSpeedRaw(
int j,
double sp)
override
403 {
return impl->setRefSpeedRaw(j, sp); }
405 bool setRefSpeedsRaw(
const double * spds)
override
406 {
return impl->setRefSpeedsRaw(spds); }
408 bool setRefSpeedsRaw(
int n_joint,
const int * joints,
const double * spds)
override
409 {
return impl->setRefSpeedsRaw(n_joint, joints, spds); }
411 bool setRefAccelerationRaw(
int j,
double acc)
override
412 {
return impl->setRefAccelerationRaw(j, acc); }
414 bool setRefAccelerationsRaw(
const double * accs)
override
415 {
return impl->setRefAccelerationsRaw(accs); }
417 bool setRefAccelerationsRaw(
int n_joint,
const int * joints,
const double * accs)
override
418 {
return impl->setRefAccelerationsRaw(n_joint, joints, accs); }
420 bool getRefSpeedRaw(
int j,
double * ref)
override
421 {
return impl->getRefSpeedRaw(j, ref); }
423 bool getRefSpeedsRaw(
double * spds)
override
424 {
return impl->getRefSpeedsRaw(spds); }
426 bool getRefSpeedsRaw(
int n_joint,
const int * joints,
double * spds)
override
427 {
return impl->getRefSpeedsRaw(n_joint, joints, spds); }
429 bool getRefAccelerationRaw(
int j,
double * acc)
override
430 {
return impl->getRefAccelerationRaw(j, acc); }
432 bool getRefAccelerationsRaw(
double * accs)
override
433 {
return impl->getRefAccelerationsRaw(accs); }
435 bool getRefAccelerationsRaw(
int n_joint,
const int * joints,
double * accs)
override
436 {
return impl->getRefAccelerationsRaw(n_joint, joints, accs); }
438 bool stopRaw(
int j)
override
439 {
return impl->stopRaw(j); }
441 bool stopRaw()
override
442 {
return impl->stopRaw(); }
444 bool stopRaw(
int n_joint,
const int * joints)
override
445 {
return impl->stopRaw(n_joint, joints); }
447 bool getTargetPositionRaw(
int joint,
double * ref)
override
448 {
return impl->getTargetPositionRaw(joint, ref); }
450 bool getTargetPositionsRaw(
double * refs)
override
451 {
return impl->getTargetPositionsRaw(refs); }
453 bool getTargetPositionsRaw(
int n_joint,
const int * joints,
double * refs)
override
454 {
return impl->getTargetPositionsRaw(n_joint, joints, refs); }
460 bool setPositionRaw(
int j,
double ref)
override
461 {
return impl->setPositionRaw(j, ref); }
463 bool setPositionsRaw(
const double * refs)
override
464 {
return impl->setPositionsRaw(refs); }
466 bool setPositionsRaw(
int n_joint,
const int * joints,
const double * refs)
override
467 {
return impl->setPositionsRaw(n_joint, joints, refs); }
469 bool getRefPositionRaw(
int joint,
double * ref)
override
470 {
return impl->getRefPositionRaw(joint, ref); }
472 bool getRefPositionsRaw(
double * refs)
override
473 {
return impl->getRefPositionsRaw(refs); }
475 bool getRefPositionsRaw(
int n_joint,
const int * joints,
double * refs)
override
476 {
return impl->getRefPositionsRaw(n_joint, joints, refs); }
480 bool getRemoteVariableRaw(std::string key, yarp::os::Bottle & val)
override
481 {
return impl->getRemoteVariableRaw(key, val); }
483 bool setRemoteVariableRaw(std::string key,
const yarp::os::Bottle & val)
override
484 {
return impl->setRemoteVariableRaw(key, val); }
486 bool getRemoteVariablesListRaw(yarp::os::Bottle * listOfKeys)
override
487 {
return impl->getRemoteVariablesListRaw(listOfKeys); }
493 bool getRefTorqueRaw(
int j,
double * t)
override
494 {
return impl->getRefTorqueRaw(j, t); }
496 bool getRefTorquesRaw(
double * t)
override
497 {
return impl->getRefTorquesRaw(t); }
499 bool setRefTorqueRaw(
int j,
double t)
override
500 {
return impl->setRefTorqueRaw(j, t); }
502 bool setRefTorquesRaw(
int n_joint,
const int * joints,
const double * t)
override
503 {
return impl->setRefTorquesRaw(n_joint, joints, t); }
505 bool setRefTorquesRaw(
const double * t)
override
506 {
return impl->setRefTorquesRaw(t); }
508 bool getTorqueRaw(
int j,
double * t)
override
509 {
return impl->getTorqueRaw(j, t); }
511 bool getTorquesRaw(
double * t)
override
512 {
return impl->getTorquesRaw(t); }
514 bool getTorqueRangeRaw(
int j,
double * min,
double * max)
override
515 {
return impl->getTorqueRangeRaw(j, min, max); }
517 bool getTorqueRangesRaw(
double * min,
double * max)
override
518 {
return impl->getTorqueRangesRaw(min, max); }
520 bool getMotorTorqueParamsRaw(
int j, yarp::dev::MotorTorqueParameters * params)
override
521 {
return impl->getMotorTorqueParamsRaw(j, params); }
523 bool setMotorTorqueParamsRaw(
int j,
const yarp::dev::MotorTorqueParameters params)
override
524 {
return impl->setMotorTorqueParamsRaw(j, params); }
530 bool velocityMoveRaw(
int j,
double sp)
override
531 {
return impl->velocityMoveRaw(j, sp); }
533 bool velocityMoveRaw(
const double * sp)
override
534 {
return impl->velocityMoveRaw(sp); }
536 bool velocityMoveRaw(
int n_joint,
const int * joints,
const double * spds)
override
537 {
return impl->velocityMoveRaw(n_joint, joints, spds); }
539 bool getRefVelocityRaw(
int joint,
double * vel)
override
540 {
return impl->getRefVelocityRaw(joint, vel); }
542 bool getRefVelocitiesRaw(
double * vels)
override
543 {
return impl->getRefVelocitiesRaw(vels); }
545 bool getRefVelocitiesRaw(
int n_joint,
const int * joints,
double * vels)
override
546 {
return impl->getRefVelocitiesRaw(n_joint, joints, vels); }
560 TechnosoftIposBase * impl {
nullptr};
Abstract base for a CAN bus sharer.
Definition: ICanBusSharer.hpp:25
virtual bool synchronize(double timestamp)=0
Perform synchronized action on CAN master's request.
Implementation-agnostic consumer for TX CAN transfers.
Definition: ICanSenderDelegate.hpp:22
unsigned int getId() override
Retrieve CAN node ID.
Definition: ICanBusSharerImpl.cpp:39
bool initialize() override
Perform CAN node initialization.
Definition: ICanBusSharerImpl.cpp:67
std::vector< unsigned int > getAdditionalIds() override
Retrieve more associated CAN node IDs, if any.
Definition: ICanBusSharerImpl.cpp:46
bool notifyMessage(const can_message &message) override
Notify observers that a new CAN message has arrived.
Definition: ICanBusSharerImpl.cpp:176
bool registerSender(ICanSenderDelegate *sender) override
Pass a handle to a CAN sender delegate instance.
Definition: ICanBusSharerImpl.cpp:58
bool finalize() override
Finalize CAN node communications.
Definition: ICanBusSharerImpl.cpp:134
Implementation for the Technosoft iPOS as a single CAN bus joint (control board raw interfaces).
Definition: TechnosoftIpos.hpp:39
bool synchronize(double timestamp) override
Perform synchronized action on CAN master's request.
Definition: TechnosoftIpos.hpp:73
std::vector< unsigned int > getAdditionalIds() override
Retrieve more associated CAN node IDs, if any.
Definition: TechnosoftIpos.hpp:58
bool notifyMessage(const can_message &message) override
Notify observers that a new CAN message has arrived.
Definition: TechnosoftIpos.hpp:61
bool registerSender(ICanSenderDelegate *sender) override
Pass a handle to a CAN sender delegate instance.
Definition: TechnosoftIpos.hpp:70
bool finalize() override
Finalize CAN node communications.
Definition: TechnosoftIpos.hpp:67
unsigned int getId() override
Retrieve CAN node ID.
Definition: TechnosoftIpos.hpp:55
bool initialize() override
Perform CAN node initialization.
Definition: TechnosoftIpos.hpp:64
The main, catch-all namespace for Robotics Lab UC3M.
Definition: groups.dox:6
Proxy CAN message structure.
Definition: CanMessage.hpp:20