WaypointController.cpp
Go to the documentation of this file.
1 /*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * \package RobotTrajectoryDesigner::gui-plugins::Controller::WaypointController
17 * \author Max Beddies
18 * \date 2018
19 * \copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 #include "WaypointController.h"
23 
24 #include "VirtualRobot/IK/IKSolver.h"
25 
26 namespace armarx
27 {
28  void
30  {
31  ARMARX_INFO << "RobotTrajectoryDesigner: WaypointController on init";
32 
33  // Fill cartesian selection combo box with items
34  initCSComboBox();
35  // Add validator to line edits
36  initValidator(-10000.000, 10000.000, 3);
37 
38  // Set single selection and clear waypoint list
39  this->guiWaypointTab->getWaypointTab()->waypointList->setSelectionMode(
40  QAbstractItemView::SingleSelection);
41  this->guiWaypointTab->getWaypointTab()->waypointList->clear();
42  }
43 
44  void
46  {
47  ARMARX_INFO << "RobotTrajectoryDesigner: WaypointController on connect";
48 
49  // Waypoint: update selected waypoint
50  QObject::connect(guiWaypointTab->getWaypointTab()->waypointList,
51  SIGNAL(itemClicked(QListWidgetItem*)),
52  this,
53  SLOT(updateSelectedWaypoint(QListWidgetItem*)));
54 
55  // Waypoint: change x-coordinate
56  QObject::connect(guiWaypointTab->getWaypointTab()->xPositionLineEdit,
57  SIGNAL(editingFinished()),
58  this,
59  SLOT(setXCoordinate()));
60 
61  // Waypoint: change y-coordinate
62  QObject::connect(guiWaypointTab->getWaypointTab()->yPositionLineEdit,
63  SIGNAL(editingFinished()),
64  this,
65  SLOT(setYCoordinate()));
66 
67  // Waypoint: change x-coordinate
68  QObject::connect(guiWaypointTab->getWaypointTab()->zPositionLineEdit,
69  SIGNAL(editingFinished()),
70  this,
71  SLOT(setZCoordinate()));
72 
73  // Waypoint: change euler angle roll
74  QObject::connect(guiWaypointTab->getWaypointTab()->eulerRLineEdit,
75  SIGNAL(editingFinished()),
76  this,
77  SLOT(setEulerAngleR()));
78 
79  // Waypoint: change euler angle pitch
80  QObject::connect(guiWaypointTab->getWaypointTab()->eulerPLineEdit,
81  SIGNAL(editingFinished()),
82  this,
83  SLOT(setEulerAngleP()));
84 
85  // Waypoint: change euler angle yaw
86  QObject::connect(guiWaypointTab->getWaypointTab()->eulerYLineEdit,
87  SIGNAL(editingFinished()),
88  this,
89  SLOT(setEulerAngleY()));
90 
91  // Waypoint: change cartesian selection
92  QObject::connect(guiWaypointTab->getWaypointTab()->ikSelectionComboBox,
93  SIGNAL(activated(int)),
94  this,
95  SLOT(setCartesianSelection(int)));
96 
97  // Waypoint: is breakpoint
98  QObject::connect(guiWaypointTab->getWaypointTab()->isBreakpointCheckBox,
99  SIGNAL(clicked(bool)),
100  this,
101  SLOT(setBreakpoint(bool)));
102 
103  // Waypoint: add waypoint
104  QObject::connect(guiWaypointTab->getWaypointTab()->insertButton,
105  SIGNAL(clicked()),
106  this,
107  SLOT(addWaypoint()));
108 
109  // Waypoint: remove waypoint
110  QObject::connect(guiWaypointTab->getWaypointTab()->deleteButton,
111  SIGNAL(clicked()),
112  this,
113  SLOT(removeWaypoint()));
114  }
115 
116  void
118  {
119  ARMARX_INFO << "RobotTrajectoryDesigner: WaypointController on disconnect";
120  }
121 
122  void
124  {
125  ARMARX_INFO << "RobotTrajectoryDesigner: WaypointController on exit";
126  }
127 
129  guiWaypointTab(guiWaypointTab)
130  {
131  onInitComponent();
133  }
134 
137  {
138  return this->guiWaypointTab;
139  }
140 
141  void
143  {
144  if (guiWaypointTab != NULL)
145  {
146  this->guiWaypointTab = guiWaypointTab;
147  }
148  }
149 
150  void
151  WaypointController::addWaypoint(int index,
152  std::vector<double> values,
153  int cartesianSelection,
154  bool isBreakpoint)
155  {
156  if (values.size() == 6)
157  {
158  // Create struct representing waypoint
159  struct GuiWaypoint waypoint;
160  waypoint.values = values;
161  waypoint.cartesianSelection = cartesianSelection;
162  waypoint.isBreakpoint = isBreakpoint;
163 
164  // create qvariant from struct
165  QVariant data;
166  data.setValue(waypoint);
167 
168  // add data to item and insert
169  QListWidgetItem* item =
170  new QListWidgetItem(QString::fromStdString("Waypoint: " + std::to_string(index)));
171  item->setData(Qt::UserRole, data);
172  QListWidget* waypoints = guiWaypointTab->getWaypointTab()->waypointList;
173 
174  waypoints->insertItem(index, item);
176 
177  // Check if waypoint list contains exactly one waypoint
178  if (waypoints->count() == 1)
179  {
180  emit enableIKSolutionButton(false);
181  }
182  }
183  changeTextListWidgetItems();
184  }
185 
186  void
187  WaypointController::removeWaypoint(int index)
188  {
189  QListWidget* waypoints = guiWaypointTab->getWaypointTab()->waypointList;
190 
191  if (waypoints->count() > index)
192  {
193  delete waypoints->takeItem(index);
194 
195  // Check if waypoint list contains no item
196  if (waypoints->count() == 0)
197  {
198  // Enables the button for a new ik solution
199  emit enableIKSolutionButton(true);
200  }
201  }
202  changeTextListWidgetItems();
203  }
204 
205  void
206  WaypointController::updateSelectedWaypoint(QListWidgetItem* item)
207  {
208  GuiWaypoint waypoint = item->data(Qt::UserRole).value<GuiWaypoint>();
209 
210  // Update all gui elements
211  updateWaypointElements(waypoint);
212 
213  // Set current row to row of selected item
214  int row = guiWaypointTab->getWaypointTab()->waypointList->row(item);
215  guiWaypointTab->getWaypointTab()->waypointList->setCurrentRow(row);
216 
217  emit setCurrentIndex(row);
219  }
220 
221  void
223  {
224  QListWidgetItem* item = guiWaypointTab->getWaypointTab()->waypointList->item(index);
225  GuiWaypoint waypoint = item->data(Qt::UserRole).value<GuiWaypoint>();
226 
227  // Update all gui elements
228  updateWaypointElements(waypoint);
229 
230  // Set current row to row of selected item
231  guiWaypointTab->getWaypointTab()->waypointList->setCurrentRow(index);
232 
233  emit setCurrentIndex(index);
234  }
235 
236  void
237  WaypointController::setXCoordinate()
238  {
239  // Check whether input is valid
240  if (guiWaypointTab->getWaypointTab()->xPositionLineEdit->hasAcceptableInput())
241  {
242  QListWidget* waypoints = guiWaypointTab->getWaypointTab()->waypointList;
243  QListWidgetItem* item = waypoints->currentItem();
244 
245  // Check if list widget has any item
246  if (item != NULL)
247  {
248  GuiWaypoint waypoint = item->data(Qt::UserRole).value<GuiWaypoint>();
249  double x = guiWaypointTab->getWaypointTab()->xPositionLineEdit->text().toDouble();
250 
251  // Check if x-coordinate of waypoint has changed
252  if ((waypoint.values.size() == 6) && (x != waypoint.values[0]))
253  {
254  std::vector<double> values = waypoint.values;
255  values[0] = x;
256  emit changedWaypoint(waypoints->currentRow(), values);
257  }
258  }
259  }
260  else
261  {
262  (new QErrorMessage(0))->showMessage("Invalid input.");
263  }
264  }
265 
266  void
267  WaypointController::setYCoordinate()
268  {
269  // Check whether input is valid
270  if (guiWaypointTab->getWaypointTab()->yPositionLineEdit->hasAcceptableInput())
271  {
272  QListWidget* waypoints = guiWaypointTab->getWaypointTab()->waypointList;
273  QListWidgetItem* item = waypoints->currentItem();
274 
275  // Check if list widget has any item
276  if (item != NULL)
277  {
278  GuiWaypoint waypoint = item->data(Qt::UserRole).value<GuiWaypoint>();
279  double y = guiWaypointTab->getWaypointTab()->yPositionLineEdit->text().toDouble();
280 
281  // Check if x-coordinate of waypoint has changed
282  if ((waypoint.values.size() == 6) && (y != waypoint.values[1]))
283  {
284  std::vector<double> values = waypoint.values;
285  values[1] = y;
286  emit changedWaypoint(waypoints->currentRow(), values);
287  }
288  }
289  }
290  else
291  {
292  (new QErrorMessage(0))->showMessage("Invalid input.");
293  }
294  }
295 
296  void
297  WaypointController::setZCoordinate()
298  {
299  // Check whether input is valid
300  if (guiWaypointTab->getWaypointTab()->zPositionLineEdit->hasAcceptableInput())
301  {
302  QListWidget* waypoints = guiWaypointTab->getWaypointTab()->waypointList;
303  QListWidgetItem* item = waypoints->currentItem();
304 
305  // Check if list widget has any item
306  if (item != NULL)
307  {
308  GuiWaypoint waypoint = item->data(Qt::UserRole).value<GuiWaypoint>();
309  double z = guiWaypointTab->getWaypointTab()->xPositionLineEdit->text().toDouble();
310 
311  // Check if x-coordinate of waypoint has changed
312  if ((waypoint.values.size() == 6) && (z != waypoint.values[2]))
313  {
314  std::vector<double> values = waypoint.values;
315  values[2] = z;
316  emit changedWaypoint(waypoints->currentRow(), values);
317  }
318  }
319  }
320  else
321  {
322  (new QErrorMessage(0))->showMessage("Invalid Input.");
323  }
324  }
325 
326  void
327  WaypointController::setEulerAngleR()
328  {
329  // Check whether input is valid
330  if (guiWaypointTab->getWaypointTab()->eulerRLineEdit->hasAcceptableInput())
331  {
332  QListWidget* waypoints = guiWaypointTab->getWaypointTab()->waypointList;
333  QListWidgetItem* item = waypoints->currentItem();
334 
335  // Check if list widget has any item
336  if (item != NULL)
337  {
338  GuiWaypoint waypoint = item->data(Qt::UserRole).value<GuiWaypoint>();
339  double r = guiWaypointTab->getWaypointTab()->eulerRLineEdit->text().toDouble();
340 
341  // Check if x-coordinate of waypoint has changed
342  if ((waypoint.values.size() == 6) && (r != waypoint.values[3]))
343  {
344  std::vector<double> values = waypoint.values;
345  values[3] = r;
346  emit changedWaypoint(waypoints->currentRow(), values);
347  }
348  }
349  }
350  else
351  {
352  (new QErrorMessage(0))->showMessage("Invalid Input.");
353  }
354  }
355 
356  void
357  WaypointController::setEulerAngleP()
358  {
359  // Check whether input is valid
360  if (guiWaypointTab->getWaypointTab()->eulerPLineEdit->hasAcceptableInput())
361  {
362  QListWidget* waypoints = guiWaypointTab->getWaypointTab()->waypointList;
363  QListWidgetItem* item = waypoints->currentItem();
364 
365  // Check if list widget has any item
366  if (item != NULL)
367  {
368  GuiWaypoint waypoint = item->data(Qt::UserRole).value<GuiWaypoint>();
369  double p = guiWaypointTab->getWaypointTab()->eulerPLineEdit->text().toDouble();
370 
371  // Check if x-coordinate of waypoint has changed
372  if ((waypoint.values.size() == 6) && (p != waypoint.values[4]))
373  {
374  std::vector<double> values = waypoint.values;
375  values[4] = p;
376  emit changedWaypoint(waypoints->currentRow(), values);
377  }
378  }
379  }
380  else
381  {
382  (new QErrorMessage(0))->showMessage("Invalid Input.");
383  }
384  }
385 
386  void
387  WaypointController::setEulerAngleY()
388  {
389  // Check whether input is valid
390  if (guiWaypointTab->getWaypointTab()->eulerYLineEdit->hasAcceptableInput())
391  {
392  QListWidget* waypoints = guiWaypointTab->getWaypointTab()->waypointList;
393  QListWidgetItem* item = waypoints->currentItem();
394 
395  // Check if list widget has any item
396  if (item != NULL)
397  {
398  GuiWaypoint waypoint = item->data(Qt::UserRole).value<GuiWaypoint>();
399  double y = guiWaypointTab->getWaypointTab()->eulerYLineEdit->text().toDouble();
400 
401  // Check if x-coordinate of waypoint has changed
402  if ((waypoint.values.size() == 6) && (y != waypoint.values[5]))
403  {
404  std::vector<double> values = waypoint.values;
405  values[5] = y;
406  emit changedWaypoint(waypoints->currentRow(), values);
407  }
408  }
409  }
410  else
411  {
412  (new QErrorMessage(0))->showMessage("Invalid Input.");
413  }
414  }
415 
416  void
417  WaypointController::setCartesianSelection(int cs)
418  {
419  QListWidget* waypoints = guiWaypointTab->getWaypointTab()->waypointList;
420  QListWidgetItem* item = waypoints->currentItem();
421 
422  // Check if list widget has any item
423  if (item != NULL)
424  {
425  GuiWaypoint waypoint = item->data(Qt::UserRole).value<GuiWaypoint>();
426 
427  // Check if x-coordinate of waypoint has changed
428  int cartesianSelection = guiWaypointTab->getWaypointTab()
429  ->ikSelectionComboBox->itemData(cs, Qt::UserRole)
430  .toInt();
431  if (cartesianSelection != waypoint.cartesianSelection)
432  {
433  emit changedWaypoint(waypoints->currentRow(), cartesianSelection);
434  }
435  }
436  }
437 
438  void
439  WaypointController::setBreakpoint(bool isBreakpoint)
440  {
441  QListWidget* waypoints = guiWaypointTab->getWaypointTab()->waypointList;
442  QListWidgetItem* item = waypoints->currentItem();
443 
444  // Check if list widget has any item
445  if (item != NULL)
446  {
447  GuiWaypoint waypoint = item->data(Qt::UserRole).value<GuiWaypoint>();
448 
449  // Check if x-coordinate of waypoint has changed
450  if (isBreakpoint != waypoint.isBreakpoint)
451  {
452  emit changedWaypoint(waypoints->currentRow(), isBreakpoint);
453  }
454  }
455  }
456 
457  void
459  std::vector<double> values,
460  int cartesianSelection,
461  bool isBreakpoint)
462  {
463  // Create struct holding relevant data
464  struct GuiWaypoint waypoint;
465  waypoint.values = values;
466  waypoint.cartesianSelection = cartesianSelection;
467  waypoint.isBreakpoint = isBreakpoint;
468 
469  if (waypoint.values.size() == 6)
470  {
471  // Create QVariant from struct
472  QVariant data;
473  data.setValue(waypoint);
474 
475  QListWidget* waypoints = guiWaypointTab->getWaypointTab()->waypointList;
476  QListWidgetItem* item = waypoints->item(index);
477 
478  // Update data
479  item->setData(Qt::UserRole, data);
480  // Display updated data
481  if (waypoints->currentRow() == index)
482  {
483  updateWaypointElements(waypoint);
484  }
485  }
486  }
487 
488  void
489  WaypointController::addWaypoint()
490  {
491  if (guiWaypointTab->getWaypointTab()->waypointList->count() == 0)
492  {
493  emit addedWaypoint(guiWaypointTab->getWaypointTab()->waypointList->count(),
494  guiWaypointTab->getWaypointTab()->insertAfterButton->isChecked());
495  }
496  else if (guiWaypointTab->getWaypointTab()->waypointList->currentRow() == -1)
497  {
498  emit addedWaypoint(guiWaypointTab->getWaypointTab()->waypointList->count() - 1,
499  guiWaypointTab->getWaypointTab()->insertAfterButton->isChecked());
500  }
501  else
502  {
503  emit addedWaypoint(guiWaypointTab->getWaypointTab()->waypointList->currentRow(),
504  guiWaypointTab->getWaypointTab()->insertAfterButton->isChecked());
505  }
506  }
507 
508  void
509  WaypointController::removeWaypoint()
510  {
511  QListWidget* waypoints = this->guiWaypointTab->getWaypointTab()->waypointList;
512  if (waypoints->count() > 0)
513  {
514  int index = waypoints->currentRow();
515  emit deletedWaypoint(index);
516  }
517  }
518 
519  void
521  {
522  ARMARX_INFO << "not yet implemented";
523  }
524 
525  void
527  {
528  // Clear waypoint list
529  this->guiWaypointTab->getWaypointTab()->waypointList->clear();
530  // Clear line edits
531  this->guiWaypointTab->getWaypointTab()->xPositionLineEdit->clear();
532  this->guiWaypointTab->getWaypointTab()->yPositionLineEdit->clear();
533  this->guiWaypointTab->getWaypointTab()->zPositionLineEdit->clear();
534  this->guiWaypointTab->getWaypointTab()->eulerRLineEdit->clear();
535  this->guiWaypointTab->getWaypointTab()->eulerPLineEdit->clear();
536  this->guiWaypointTab->getWaypointTab()->eulerYLineEdit->clear();
537  // Reset cartesian selection to "all"
538  this->guiWaypointTab->getWaypointTab()->ikSelectionComboBox->setCurrentIndex(5);
539  // Uncheck breakpoint check box
540  this->guiWaypointTab->getWaypointTab()->isBreakpointCheckBox->setChecked(false);
541  // Set insert after button as checked
542  this->guiWaypointTab->getWaypointTab()->insertAfterButton->setChecked(true);
543  this->guiWaypointTab->getWaypointTab()->insertBeforeButton->setChecked(false);
544  // Reset current waypoint index
545  emit setCurrentIndex(0);
546  }
547 
548  void
550  {
551  guiWaypointTab->getWaypointTab()->deleteButton->setEnabled(enable);
552  guiWaypointTab->getWaypointTab()->ikSelectionComboBox->setEnabled(enable);
553  guiWaypointTab->getWaypointTab()->isBreakpointCheckBox->setEnabled(enable);
554  }
555 
556  void
558  {
559  guiWaypointTab->getWaypointTab()->insertButton->setEnabled(enable);
560  guiWaypointTab->getWaypointTab()->insertAfterButton->setEnabled(enable);
561  guiWaypointTab->getWaypointTab()->insertBeforeButton->setEnabled(enable);
562  }
563 
564  void
566  {
567  guiWaypointTab->getWaypointTab()->eulerPLineEdit->setEnabled(enable);
568  guiWaypointTab->getWaypointTab()->eulerRLineEdit->setEnabled(enable);
569  guiWaypointTab->getWaypointTab()->eulerYLineEdit->setEnabled(enable);
570  guiWaypointTab->getWaypointTab()->waypointList->setEnabled(enable);
571  guiWaypointTab->getWaypointTab()->xPositionLineEdit->setEnabled(enable);
572  guiWaypointTab->getWaypointTab()->yPositionLineEdit->setEnabled(enable);
573  guiWaypointTab->getWaypointTab()->zPositionLineEdit->setEnabled(enable);
574  }
575 
576  /************************************************************************************/
577  /* Private Functions */
578  /************************************************************************************/
579  void
580  WaypointController::initCSComboBox()
581  {
582  QComboBox* cs = guiWaypointTab->getWaypointTab()->ikSelectionComboBox;
583 
584  // Set strong focus, add wheel event filter
585  cs->setFocusPolicy(Qt::StrongFocus);
586  cs->installEventFilter(new WheelEventFilter(this));
587 
588  // Clear combo box and insert items
589  cs->clear();
590  QVariant xpos(1), ypos(2), zpos(4), position(7), orientation(8), all(15);
591  cs->addItem(QString::fromStdString("X Position"), xpos);
592  cs->addItem(QString::fromStdString("Y Position"), ypos);
593  cs->addItem(QString::fromStdString("Z Position"), zpos);
594  cs->addItem(QString::fromStdString("Position"), position);
595  cs->addItem(QString::fromStdString("Orientation"), orientation);
596  cs->addItem(QString::fromStdString("Position and Orientation"), all);
597  cs->setEnabled(true);
598  cs->setCurrentIndex(5);
599  }
600 
601  void
602  WaypointController::initValidator(double bottom, double top, int decimals)
603  {
604  QDoubleValidator* validator =
605  new QDoubleValidator(bottom, top, decimals, guiWaypointTab.get());
606  validator->setNotation(QDoubleValidator::StandardNotation);
607 
608  this->guiWaypointTab->getWaypointTab()->xPositionLineEdit->setValidator(validator);
609  this->guiWaypointTab->getWaypointTab()->yPositionLineEdit->setValidator(validator);
610  this->guiWaypointTab->getWaypointTab()->zPositionLineEdit->setValidator(validator);
611  this->guiWaypointTab->getWaypointTab()->eulerRLineEdit->setValidator(validator);
612  this->guiWaypointTab->getWaypointTab()->eulerPLineEdit->setValidator(validator);
613  this->guiWaypointTab->getWaypointTab()->eulerYLineEdit->setValidator(validator);
614  }
615 
616  void
617  WaypointController::updateWaypointElements(GuiWaypoint waypoint)
618  {
619  if (waypoint.values.size() == 6)
620  {
621  // x-coordinate line edit
622  guiWaypointTab->getWaypointTab()->xPositionLineEdit->setText(
623  QString::number(waypoint.values[0]));
624  // y-coordinate line edit
625  guiWaypointTab->getWaypointTab()->yPositionLineEdit->setText(
626  QString::number(waypoint.values[1]));
627  // z-coordinate line edit
628  guiWaypointTab->getWaypointTab()->zPositionLineEdit->setText(
629  QString::number(waypoint.values[2]));
630  // roll euler angle line edit
631  guiWaypointTab->getWaypointTab()->eulerRLineEdit->setText(
632  QString::number(waypoint.values[3]));
633  // pitch euler angle line edit
634  guiWaypointTab->getWaypointTab()->eulerPLineEdit->setText(
635  QString::number(waypoint.values[4]));
636  // yaw euler angle line edit
637  guiWaypointTab->getWaypointTab()->eulerYLineEdit->setText(
638  QString::number(waypoint.values[5]));
639  // cartesian selection combo box
640  guiWaypointTab->getWaypointTab()->ikSelectionComboBox->setCurrentIndex(
641  guiWaypointTab->getWaypointTab()->ikSelectionComboBox->findData(
642  QVariant(waypoint.cartesianSelection)));
643  // is breakpoint check box
644  guiWaypointTab->getWaypointTab()->isBreakpointCheckBox->setChecked(
645  waypoint.isBreakpoint);
646  }
647  }
648 
649  void
650  WaypointController::changeTextListWidgetItems()
651  {
652  QListWidget* waypoints = this->guiWaypointTab->getWaypointTab()->waypointList;
653  for (int i = 0; i < waypoints->count(); i++)
654  {
655  waypoints->item(i)->setText(QString::fromStdString(("Waypoint: " + std::to_string(i))));
656  }
657  }
658 } // namespace armarx
armarx::WaypointController::enableDeleteButton
void enableDeleteButton(bool enable)
Enables or disables the delete button.
Definition: WaypointController.cpp:549
armarx::GuiWaypoint::cartesianSelection
int cartesianSelection
Definition: WaypointController.h:46
armarx::WaypointController::setCurrentIndexRobotVisualization
void setCurrentIndexRobotVisualization(int index)
Notifies RobotVisualizationController about changes of the current waypoint.
index
uint8_t index
Definition: EtherCATFrame.h:59
armarx::WaypointController::retranslateGui
void retranslateGui()
Retranslates the guiWaypointTab.
Definition: WaypointController.cpp:520
WaypointController.h
ProsthesisInterface.values
values
Definition: ProsthesisInterface.py:190
armarx::WaypointController::addedWaypoint
void addedWaypoint(int waypoint, bool insertAfter)
Notifies other controllers about the addition of a new waypoint with given constraints.
armarx::WheelEventFilter
Definition: WheelEventFilter.h:31
armarx::GuiWaypoint::isBreakpoint
bool isBreakpoint
Definition: WaypointController.h:47
armarx::WaypointController::onInitComponent
void onInitComponent() override
Definition: WaypointController.cpp:29
armarx::WaypointController::enableWaypointListLineEdit
void enableWaypointListLineEdit(bool enable)
Enables or disables the waypoint list and line edit.
Definition: WaypointController.cpp:565
armarx::WaypointController::changedWaypoint
void changedWaypoint(int waypoint, std::vector< double > values)
Notifies other controllers about changes of the given waypoint.
armarx::WaypointController::enableIKSolutionButton
void enableIKSolutionButton(bool enable)
Notifies other controllers whether to enable or disable the button for a new IK solution.
armarx::WaypointController::WaypointController
WaypointController(WaypointTabPtr guiWaypointTab)
Creates a new WaypointController and assigns a WaypointTab to handle.
Definition: WaypointController.cpp:128
WaypointTabPtr
std::shared_ptr< WaypointTab > WaypointTabPtr
Definition: WaypointTab.h:52
armarx::WaypointController::addWaypoint
void addWaypoint(int index, std::vector< double > values, int cartesianSelection, bool isBreakpoint)
Adds a new waypoint to the list widget.
Definition: WaypointController.cpp:151
armarx::armem::client::query_fns::all
auto all()
Definition: query_fns.h:9
armarx::GuiWaypoint::values
std::vector< double > values
Definition: WaypointController.h:45
data
uint8_t data[1]
Definition: EtherCATFrame.h:68
armarx::WaypointController::setWaypointData
void setWaypointData(int index, std::vector< double > values, int cartesianSelection, bool isBreakpoint)
Connected with signals from other controllers, sets all values of the waypoint at a given index.
Definition: WaypointController.cpp:458
armarx::WaypointController::setGuiWaypointTab
void setGuiWaypointTab(WaypointTabPtr guiWaypointTab)
Setter for the WaypointTab pointer to guiWaypointTab.
Definition: WaypointController.cpp:142
armarx::WaypointController::deletedWaypoint
void deletedWaypoint(int waypoint)
Notifies other controllers about the deletion of a given waypoint.
armarx::WaypointController::enableAddButton
void enableAddButton(bool enable)
Enables or disables the add button.
Definition: WaypointController.cpp:557
armarx::to_string
const std::string & to_string(const std::string &s)
Definition: StringHelpers.h:41
armarx::WaypointController::onExitComponent
void onExitComponent() override
Definition: WaypointController.cpp:123
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:181
armarx::WaypointController::clearWaypointList
void clearWaypointList()
Removes all items of the waypoint list.
Definition: WaypointController.cpp:526
armarx::WaypointController::setCurrentIndex
void setCurrentIndex(int index)
Notifies other controllers about changes of the current waypoint.
armarx::WaypointController::onDisconnectComponent
void onDisconnectComponent() override
Definition: WaypointController.cpp:117
armarx::GuiWaypoint
struct armarx::GuiWaypoint GuiWaypoint
Struct which allows storing relevant data to display within a list widget item as QVariant.
armarx::WaypointController::removeWaypoint
void removeWaypoint(int index)
Removes the waypoint at a given index.
Definition: WaypointController.cpp:187
armarx::GuiWaypoint
Struct which allows storing relevant data to display within a list widget item as QVariant.
Definition: WaypointController.h:43
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
armarx::WaypointController::updateSelectedWaypoint
void updateSelectedWaypoint(int index)
Updates the currently selected waypoint.
Definition: WaypointController.cpp:222
armarx::WaypointController::getGuiWaypointTab
WaypointTabPtr getGuiWaypointTab()
Getter for the WaypointTab pointer to guiWaypointTab.
Definition: WaypointController.cpp:136
armarx::WaypointController::onConnectComponent
void onConnectComponent() override
Definition: WaypointController.cpp:45