YARP
Yet Another Robot Platform
Robot.cpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
7 
11 
12 #include <yarp/os/LogStream.h>
13 
14 #include <yarp/dev/PolyDriver.h>
16 
17 #include <algorithm>
18 #include <iostream>
19 #include <string>
20 #include <unordered_set>
21 
22 
24 {
25  dbg << "(name = \"" << t.name() << "\"";
26  if (!t.params().empty()) {
27  dbg << ", params = [";
28  dbg << t.params();
29  dbg << "]";
30  }
31  if (!t.devices().empty()) {
32  dbg << ", devices = [";
33  dbg << t.devices();
34  dbg << "]";
35  }
36  dbg << ")";
37  return dbg;
38 }
39 
40 
42 {
43 public:
44  Private(Robot* /*parent*/) :
45  build(0),
47  currentLevel(0)
48  {
49  }
50 
51  // return true if a device with the given name exists
52  bool hasDevice(const std::string& name) const;
53 
54  // return the device with the given name or <fatal error> if not found
55  Device* findDevice(const std::string& name);
56 
57  // return true if a device with the given name exists
58  // considering also the provided external devices
59  bool hasDeviceIncludingExternal(const std::string& name) const;
60 
61  // return the device with the given name or nullptr if not found,
62  // considering also the provided external devices
64 
65  // check if there is no external devices that has the same name of an internal device
66  // return true if there is a conflict, false otherwise
67  bool checkForNamingConflictsInExternalDevices(const yarp::dev::PolyDriverList& newExternalDevicesList);
68 
69  // open all the devices and return true if all the open calls were successful
70  bool openDevices();
71 
72  // close all the devices and return true if all the close calls were successful
73  bool closeDevices();
74 
75  // return a vector of levels that have actions in the requested phase
76  std::vector<unsigned int> getLevels(ActionPhase phase) const;
77 
78  // return a vector of actions for that phase and that level
79  std::vector<std::pair<Device, Action>> getActions(ActionPhase phase, unsigned int level) const;
80 
81 
82  // run configure action on one device
83  bool configure(const Device& device, const ParamList& params);
84 
85  // run calibrate action on one device
86  bool calibrate(const Device& device, const ParamList& params);
87 
88  // run attach action on one device
89  bool attach(const Device& device, const ParamList& params);
90 
91  // run abort action on one device
92  bool abort(const Device& device, const ParamList& params);
93 
94  // run detach action on one device
95  bool detach(const Device& device, const ParamList& params);
96 
97  // run park action on one device
98  bool park(const Device& device, const ParamList& params);
99 
100  // run custom action on one device
101  bool custom(const Device& device, const ParamList& params);
102 
103  std::string name;
104  unsigned int build;
105  std::string portprefix;
110  unsigned int currentLevel;
111 }; // class yarp::robotinterface::Robot::Private
112 
113 bool yarp::robotinterface::Robot::Private::hasDevice(const std::string& name) const
114 {
115  for (const auto& device : devices) {
116  if (name == device.name()) {
117  return true;
118  }
119  }
120  return false;
121 }
122 
124 {
125  for (auto& device : devices) {
126  if (name == device.name()) {
127  return &device;
128  }
129  }
130  return nullptr;
131 }
132 
134 {
135  if (hasDevice(name)) {
136  return true;
137  } else {
138  for (int i = 0; i < externalDevices.size(); i++) {
139  const yarp::dev::PolyDriverDescriptor* externalDevice = externalDevices[i];
140  if (name == externalDevice->key) {
141  return true;
142  }
143  }
144  }
145  return false;
146 }
147 
150 {
152  deviceFound.poly = nullptr;
153  deviceFound.key = "";
154 
155  for (auto& device : devices) {
156  if (name == device.name()) {
157  deviceFound.poly = device.driver();
158  deviceFound.key = device.name();
159  return deviceFound;
160  }
161  }
162 
163  for (int i = 0; i < externalDevices.size(); i++) {
164  const yarp::dev::PolyDriverDescriptor* externalDevice = externalDevices[i];
165  if (name == externalDevice->key) {
166  deviceFound = *externalDevice;
167  }
168  }
169 
170  return deviceFound;
171 }
172 
174 {
175  std::unordered_set<std::string> externalDevicesNames;
176 
177  for (int i = 0; i < externalDevicesList.size(); i++) {
178  const yarp::dev::PolyDriverDescriptor* externalDevice = externalDevicesList[i];
179  externalDevicesNames.insert(externalDevice->key);
180  }
181 
182  for (auto& device : devices) {
183  if (externalDevicesNames.find(device.name()) != externalDevicesNames.end()) {
184  yError() << "Device name " << device.name() << " is used for both an internal and external device.";
185  return true;
186  }
187  }
188 
189  return false;
190 }
191 
192 
194 {
195  bool ret = true;
196  for (auto& device : devices) {
197  // yDebug() << device;
198 
199  if (!device.open()) {
200  yWarning() << "Cannot open device" << device.name();
201  ret = false;
202  }
203  }
204  if (ret) {
205  // yDebug() << "All devices opened.";
206  } else {
207  yWarning() << "There was some problem opening one or more devices. Please check the log and your configuration";
208  }
209 
210  return ret;
211 }
212 
214 {
215  bool ret = true;
216  for (auto it = devices.rbegin(); it != devices.rend(); ++it) {
218 
219  // yDebug() << device;
220 
221  if (!device.close()) {
222  yWarning() << "Cannot close device" << device.name();
223  ret = false;
224  }
225  }
226  if (ret) {
227  // yDebug() << "All devices closed.";
228  } else {
229  yWarning() << "There was some problem closing one or more devices. Please check the log and your configuration";
230  }
231 
232  return ret;
233 }
234 
236 {
237  std::vector<unsigned int> levels;
238  for (const auto& device : devices) {
239  if (device.actions().empty()) {
240  continue;
241  }
242 
243  for (const auto& action : device.actions()) {
244  if (action.phase() == phase) {
245  levels.push_back(action.level());
246  }
247  }
248  }
249 
250  std::sort(levels.begin(), levels.end());
251  auto it = std::unique(levels.begin(), levels.end());
252  levels.resize(it - levels.begin());
253 
254  return levels;
255 }
256 
257 
258 std::vector<std::pair<yarp::robotinterface::Device, yarp::robotinterface::Action>> yarp::robotinterface::Robot::Private::getActions(yarp::robotinterface::ActionPhase phase, unsigned int level) const
259 {
260  std::vector<std::pair<yarp::robotinterface::Device, yarp::robotinterface::Action>> actions;
261  for (const auto& device : devices) {
262  if (device.actions().empty()) {
263  continue;
264  }
265 
266  for (const auto& action : device.actions()) {
267  if (action.phase() == phase && action.level() == level) {
268  actions.emplace_back(device, action);
269  }
270  }
271  }
272  return actions;
273 }
274 
275 
277 {
278  YARP_FIXME_NOTIMPLEMENTED("configure action")
279  return true;
280 }
281 
284 {
285  if (!yarp::robotinterface::hasParam(params, "target")) {
286  yError() << "Action \"" << ActionTypeToString(ActionTypeCalibrate) << R"(" requires "target" parameter)";
287  return false;
288  }
289  std::string targetDeviceName = yarp::robotinterface::findParam(params, "target");
290 
291  if (!hasDeviceIncludingExternal(targetDeviceName)) {
292  yError() << "Target device" << targetDeviceName << "does not exist.";
293  return false;
294  }
295  yarp::dev::PolyDriverDescriptor targetDevice = findDeviceIncludingExternal(targetDeviceName);
296 
297  return device.calibrate(targetDevice);
298 }
299 
302 {
303  int check = 0;
304  if (yarp::robotinterface::hasParam(params, "network")) {
305  check++;
306  }
307  if (yarp::robotinterface::hasParam(params, "networks")) {
308  check++;
309  }
311  check++;
312  }
313 
314  if (check > 1) {
315  yError() << "Action \"" << ActionTypeToString(ActionTypeAttach) << R"(" : you can have only one option: "network" , "networks" or "all" )";
316  return false;
317  }
318 
320 
321  if (yarp::robotinterface::hasParam(params, "device")) {
322  std::string targetDeviceName = yarp::robotinterface::findParam(params, "device");
323 
324  std::string targetNetwork = "...";
325  if (yarp::robotinterface::hasParam(params, "network")) {
326  targetNetwork = yarp::robotinterface::findParam(params, "network");
327  }
328 
329  if (!hasDeviceIncludingExternal(targetDeviceName)) {
330  yError() << "Target device" << targetDeviceName << "(network =" << targetNetwork << ") does not exist.";
331  return false;
332  }
333  yarp::dev::PolyDriverDescriptor targetDevice = findDeviceIncludingExternal(targetDeviceName);
334 
335  // yDebug() << "Attach device" << device.name() << "to" << targetDevice.name() << "as" << targetNetwork;
336  drivers.push(targetDevice.poly, targetNetwork.c_str());
337 
338  } else if (yarp::robotinterface::hasParam(params, "all")) {
339  for (auto& device : devices) {
340  drivers.push(device.driver(), "all");
341  }
342 
343  for (int i = 0; i < externalDevices.size(); i++) {
344  const yarp::dev::PolyDriverDescriptor* externalDevice = externalDevices[i];
345  drivers.push(externalDevice->poly, "all");
346  }
347  } else if (yarp::robotinterface::hasParam(params, "networks")) {
348  yarp::os::Value v;
349  v.fromString(yarp::robotinterface::findParam(params, "networks").c_str());
350  yarp::os::Bottle& targetNetworks = *(v.asList());
351 
352  for (size_t i = 0; i < targetNetworks.size(); ++i) {
353  std::string targetNetwork = targetNetworks.get(i).toString();
354 
355  if (!yarp::robotinterface::hasParam(params, targetNetwork)) {
356  yError() << "Action \"" << ActionTypeToString(ActionTypeAttach) << "\" requires one parameter per network. \"" << targetNetwork << "\" parameter is missing.";
357  return false;
358  }
359  std::string targetDeviceName = yarp::robotinterface::findParam(params, targetNetwork);
360  if (!hasDeviceIncludingExternal(targetDeviceName)) {
361  yError() << "Target device" << targetDeviceName << "(network =" << targetNetwork << ") does not exist.";
362  return false;
363  }
364  yarp::dev::PolyDriverDescriptor targetDevice = findDeviceIncludingExternal(targetDeviceName);
365 
366  // yDebug() << "Attach device" << device.name() << "to" << targetDevice.name() << "as" << targetNetwork;
367  drivers.push(targetDevice.poly, targetNetwork.c_str());
368  }
369  } else {
370  yError() << "Action \"" << ActionTypeToString(ActionTypeAttach) << R"(" requires either "network" or "networks" parameter)";
371  return false;
372  }
373 
374  if (!drivers.size()) {
375  yError() << "Action \"" << ActionTypeToString(ActionTypeAttach) << "\" couldn't find any device.";
376  return false;
377  }
378 
379  return device.attach(drivers);
380 }
381 
383 {
384  YARP_FIXME_NOTIMPLEMENTED("abort action")
385  return true;
386 }
387 
388 
390 {
391 
392  if (!params.empty()) {
393  yWarning() << "Action \"" << ActionTypeToString(ActionTypeDetach) << "\" cannot have any parameter. Ignoring them.";
394  }
395 
396  return device.detach();
397 }
398 
401 {
402  if (!yarp::robotinterface::hasParam(params, "target")) {
403  yError() << "Action \"" << ActionTypeToString(ActionTypePark) << R"(" requires "target" parameter)";
404  return false;
405  }
406  std::string targetDeviceName = yarp::robotinterface::findParam(params, "target");
407 
408  if (!hasDeviceIncludingExternal(targetDeviceName)) {
409  yError() << "Target device" << targetDeviceName << "does not exist.";
410  return false;
411  }
412  yarp::dev::PolyDriverDescriptor targetDevice = findDeviceIncludingExternal(targetDeviceName);
413 
414  return device.park(targetDevice);
415 }
416 
418 {
419  YARP_FIXME_NOTIMPLEMENTED("custom action")
420  return true;
421 }
422 
424  mPriv(new Private(this))
425 {
426 }
427 
429  mPriv(new Private(this))
430 {
431  mPriv->name = name;
432  mPriv->devices = devices;
433 }
434 
436  mPriv(new Private(this))
437 {
438  mPriv->name = other.mPriv->name;
439  mPriv->build = other.mPriv->build;
440  mPriv->portprefix = other.mPriv->portprefix;
441  mPriv->currentPhase = other.mPriv->currentPhase;
442  mPriv->currentLevel = other.mPriv->currentLevel;
443  mPriv->devices = other.mPriv->devices;
444  mPriv->params = other.mPriv->params;
445 }
446 
448 {
449  if (&other != this) {
450  mPriv->name = other.mPriv->name;
451  mPriv->build = other.mPriv->build;
452  mPriv->portprefix = other.mPriv->portprefix;
453  mPriv->currentPhase = other.mPriv->currentPhase;
454  mPriv->currentLevel = other.mPriv->currentLevel;
455 
456  mPriv->devices.clear();
457  mPriv->devices = other.mPriv->devices;
458 
459  mPriv->params.clear();
460  mPriv->params = other.mPriv->params;
461  }
462 
463  return *this;
464 }
465 
467 {
468  delete mPriv;
469 }
470 
472 {
473  return mPriv->name;
474 }
475 
477 {
478  return mPriv->build;
479 }
480 
482 {
483  return mPriv->portprefix;
484 }
485 
487 {
488  for (auto& device : devices()) {
489  ParamList& params = device.params();
490  // Do not override "verbose" param if explicitly set in the xml
491  if (verbose && !yarp::robotinterface::hasParam(params, "verbose")) {
492  device.params().push_back(Param("verbose", "1"));
493  }
494  }
495 }
496 
498 {
499  for (auto& device : devices()) {
500  ParamList& params = device.params();
501  // Do not override "allow-deprecated-devices" param if explicitly set in the xml
502  if (allowDeprecatedDevices && !yarp::robotinterface::hasParam(params, "allow-deprecated-devices")) {
503  device.params().push_back(Param("allow-deprecated-devices", "1"));
504  }
505  }
506 }
507 
509 {
510  return mPriv->params;
511 }
512 
514 {
515  return mPriv->devices;
516 }
517 
519 {
520  return *mPriv->findDevice(name);
521 }
522 
523 const std::string& yarp::robotinterface::Robot::name() const
524 {
525  return mPriv->name;
526 }
527 
528 const unsigned int& yarp::robotinterface::Robot::build() const
529 {
530  return mPriv->build;
531 }
532 
533 const std::string& yarp::robotinterface::Robot::portprefix() const
534 {
535  return mPriv->portprefix;
536 }
537 
539 {
540  return mPriv->params;
541 }
542 
544 {
545  return mPriv->devices;
546 }
547 
548 bool yarp::robotinterface::Robot::hasDevice(const std::string& name) const
549 {
550  return mPriv->hasDevice(name);
551 }
552 
554 {
555  return *mPriv->findDevice(name);
556 }
557 
559 {
560  yInfo() << "Interrupt received. Stopping all running threads.";
561 
562  // If we received an interrupt we send a stop signal to all threads
563  // from previous phases
564  for (auto& device : devices()) {
565  device.stopThreads();
566  }
567 }
568 
570 {
571  bool nameConflict = mPriv->checkForNamingConflictsInExternalDevices(list);
572  if (nameConflict) {
573  return false;
574  }
575 
576  mPriv->externalDevices = list;
577  return true;
578 }
579 
581 {
582  yInfo() << ActionPhaseToString(phase) << "phase starting...";
583 
584  mPriv->currentPhase = phase;
585  mPriv->currentLevel = 0;
586 
587  // Open all devices
588  if (phase == ActionPhaseStartup) {
589  if (!mPriv->openDevices()) {
590  yError() << "One or more devices failed opening... see previous log messages for more info";
591  if (!mPriv->closeDevices()) {
592  yError() << "One or more devices failed closing";
593  }
594  return false;
595  }
596  }
597 
598  // run phase does not accept actions
599  if (phase == ActionPhaseRun) {
600  if (mPriv->getLevels(phase).size() != 0) {
601  yWarning() << "Phase" << ActionPhaseToString(phase) << "does not accept actions. Skipping all actions for this phase";
602  }
603  return true;
604  }
605 
606  // Before starting any action we ensure that there are no other
607  // threads running from prevoius phases.
608  // In interrupt 2 and 3 and this is called by the interrupt callback,
609  // and therefore main thread will be blocked and join will never
610  // return. Therefore, since we want to start the abort actions we
611  // skip this check.
612  if (phase != ActionPhaseInterrupt2 && phase != ActionPhaseInterrupt3) {
613  for (auto& device : devices()) {
614  device.joinThreads();
615  }
616  }
617 
618  std::vector<unsigned int> levels = mPriv->getLevels(phase);
619 
620  bool ret = true;
621  for (std::vector<unsigned int>::const_iterator lit = levels.begin(); lit != levels.end(); ++lit) {
622  // for each level
623  const unsigned int level = *lit;
624 
625  yInfo() << "Entering action level" << level << "of phase" << ActionPhaseToString(phase);
626  mPriv->currentLevel = level;
627 
628  // If current phase was changed by some other thread, we should
629  // exit the loop and avoid starting further actions.
630  if (mPriv->currentPhase != phase) {
631  ret = false;
632  break;
633  }
634 
635  std::vector<std::pair<Device, Action>> actions = mPriv->getActions(phase, level);
636 
637  for (auto& ait : actions) {
638  // for each action in that level
639  Device& device = ait.first;
640  Action& action = ait.second;
641 
642  // If current phase was changed by some other thread, we should
643  // exit the loop and avoid starting further actions.
644  if (mPriv->currentPhase != phase) {
645  ret = false;
646  break;
647  }
648 
649  switch (action.type()) {
650  case ActionTypeConfigure:
651  if (!mPriv->configure(device, action.params())) {
652  yError() << "Cannot run configure action on device" << device.name();
653  ret = false;
654  }
655  break;
656  case ActionTypeCalibrate:
657  if (!mPriv->calibrate(device, action.params())) {
658  yError() << "Cannot run calibrate action on device" << device.name();
659  ret = false;
660  }
661  break;
662  case ActionTypeAttach:
663  if (!mPriv->attach(device, action.params())) {
664  yError() << "Cannot run attach action on device" << device.name();
665  ret = false;
666  }
667  break;
668  case ActionTypeAbort:
669  if (!mPriv->abort(device, action.params())) {
670  yError() << "Cannot run abort action on device" << device.name();
671  ret = false;
672  }
673  break;
674  case ActionTypeDetach:
675  if (!mPriv->detach(device, action.params())) {
676  yError() << "Cannot run detach action on device" << device.name();
677  ret = false;
678  }
679  break;
680  case ActionTypePark:
681  if (!mPriv->park(device, action.params())) {
682  yError() << "Cannot run park action on device" << device.name();
683  ret = false;
684  }
685  break;
686  case ActionTypeCustom:
687  if (!mPriv->custom(device, action.params())) {
688  yError() << "Cannot run custom action on device" << device.name();
689  ret = false;
690  }
691  break;
692  default:
693  yWarning() << "Unhandled action" << ActionTypeToString(action.type());
694  ret = false;
695  break;
696  }
697  }
698 
699  yInfo() << "All actions for action level" << level << "of" << ActionPhaseToString(phase) << "phase started. Waiting for unfinished actions.";
700 
701  // Join parallel threads
702  for (auto& device : devices()) {
703  device.joinThreads();
704  // yDebug() << "All actions for device" << device.name() << "at level()" << level << "finished";
705  }
706 
707  yInfo() << "All actions for action level" << level << "of" << ActionPhaseToString(phase) << "phase finished.";
708  }
709 
710  if (!ret) {
711  yWarning() << "There was some problem running actions for" << ActionPhaseToString(phase) << "phase . Please check the log and your configuration";
712  }
713 
714  if (phase == ActionPhaseShutdown) {
715  if (!mPriv->closeDevices()) {
716  yError() << "One or more devices failed closing";
717  return false;
718  }
719  }
720 
721  yInfo() << ActionPhaseToString(phase) << "phase finished.";
722 
723  return ret;
724 }
725 
727 {
728  return mPriv->currentPhase;
729 }
730 
732 {
733  return mPriv->currentLevel;
734 }
735 
736 bool yarp::robotinterface::Robot::hasParam(const std::string& name) const
737 {
738  return yarp::robotinterface::hasParam(mPriv->params, name);
739 }
740 
741 std::string yarp::robotinterface::Robot::findParam(const std::string& name) const
742 {
743  return yarp::robotinterface::findParam(mPriv->params, name);
744 }
float t
bool ret
#define yInfo(...)
Definition: Log.h:257
#define yError(...)
Definition: Log.h:279
#define YARP_FIXME_NOTIMPLEMENTED(what)
Definition: Log.h:307
#define yWarning(...)
Definition: Log.h:268
yarp::os::LogStream operator<<(yarp::os::LogStream dbg, const yarp::robotinterface::Robot &t)
Definition: Robot.cpp:23
void push(PolyDriver *p, const char *k)
A simple collection of objects that can be described and transmitted in a portable way.
Definition: Bottle.h:74
size_type size() const
Gets the number of elements in the bottle.
Definition: Bottle.cpp:251
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
Definition: Bottle.cpp:246
A single value (typically within a Bottle).
Definition: Value.h:45
virtual Bottle * asList() const
Get list value.
Definition: Value.cpp:240
std::string toString() const override
Return a standard text representation of the content of the object.
Definition: Value.cpp:356
void fromString(const char *str)
Set value to correspond to a textual representation.
Definition: Value.cpp:351
ActionList & actions()
Definition: Device.cpp:269
bool attach(const yarp::dev::PolyDriverList &drivers) const
Definition: Device.cpp:415
bool park(const yarp::dev::PolyDriverDescriptor &target) const
Definition: Device.cpp:488
yarp::dev::PolyDriver * driver() const
Definition: Device.cpp:335
std::string & name()
Definition: Device.cpp:254
bool calibrate(const yarp::dev::PolyDriverDescriptor &target) const
Definition: Device.cpp:355
bool detach(const Device &device, const ParamList &params)
Definition: Robot.cpp:389
std::vector< unsigned int > getLevels(ActionPhase phase) const
Definition: Robot.cpp:235
Device * findDevice(const std::string &name)
Definition: Robot.cpp:123
bool park(const Device &device, const ParamList &params)
Definition: Robot.cpp:399
bool custom(const Device &device, const ParamList &params)
Definition: Robot.cpp:417
bool hasDevice(const std::string &name) const
Definition: Robot.cpp:113
bool calibrate(const Device &device, const ParamList &params)
Definition: Robot.cpp:282
bool hasDeviceIncludingExternal(const std::string &name) const
Definition: Robot.cpp:133
bool attach(const Device &device, const ParamList &params)
Definition: Robot.cpp:300
bool checkForNamingConflictsInExternalDevices(const yarp::dev::PolyDriverList &newExternalDevicesList)
Definition: Robot.cpp:173
yarp::robotinterface::ActionPhase currentPhase
Definition: Robot.cpp:109
yarp::dev::PolyDriverDescriptor findDeviceIncludingExternal(const std::string &name)
Definition: Robot.cpp:149
bool configure(const Device &device, const ParamList &params)
Definition: Robot.cpp:276
std::vector< std::pair< Device, Action > > getActions(ActionPhase phase, unsigned int level) const
Definition: Robot.cpp:258
yarp::dev::PolyDriverList externalDevices
Definition: Robot.cpp:108
bool abort(const Device &device, const ParamList &params)
Definition: Robot.cpp:382
bool hasParam(const std::string &name) const
Definition: Robot.cpp:736
void setAllowDeprecatedDevices(bool allowDeprecatedDevices)
Definition: Robot.cpp:497
bool hasDevice(const std::string &name) const
Definition: Robot.cpp:548
yarp::robotinterface::ActionPhase currentPhase() const
Definition: Robot.cpp:726
std::string & portprefix()
Definition: Robot.cpp:481
DeviceList & devices()
Definition: Robot.cpp:513
ParamList & params()
Definition: Robot.cpp:508
void setVerbose(bool verbose)
Definition: Robot.cpp:486
bool enterPhase(yarp::robotinterface::ActionPhase phase)
Definition: Robot.cpp:580
bool setExternalDevices(const yarp::dev::PolyDriverList &list)
Definition: Robot.cpp:569
std::string & name()
Definition: Robot.cpp:471
Robot & operator=(const Robot &other)
Definition: Robot.cpp:447
unsigned int & build()
Definition: Robot.cpp:476
int currentLevel() const
Definition: Robot.cpp:731
std::string findParam(const std::string &name) const
Definition: Robot.cpp:741
Device & device(const std::string &name)
Definition: Robot.cpp:518
yarp::robotinterface::Param Param
Definition: Param.h:26
std::string ActionTypeToString(robotinterface::ActionType actiontype)
Definition: Types.cpp:147
bool hasParam(const robotinterface::ParamList &list, const std::string &name)
Definition: Types.cpp:16
std::vector< robotinterface::Param > ParamList
Definition: Types.h:28
std::string findParam(const robotinterface::ParamList &list, const std::string &name)
Definition: Types.cpp:26
std::vector< robotinterface::Device > DeviceList
Definition: Types.h:32
std::string ActionPhaseToString(robotinterface::ActionPhase actionphase)
Definition: Types.cpp:99