DesignerTrajectoryManager.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2015-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package ArmarXGuiPlugins::RobotTrajectoryDesigner::Manager
19  * @author Luca Quaer
20  * @date 2018
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 
26 
27 using namespace armarx;
28 
29 ////////////////////////////////////////////////////////////////////////////////////////////
30 /// Struct-functions
31 ////////////////////////////////////////////////////////////////////////////////////////////
32 
33 void DesignerTrajectoryManager::ManipulationInterval::addFirstUserWaypoint(UserWaypointPtr uw)
34 {
35  userWaypointsList.push_back(uw);
36 }
37 
38 void DesignerTrajectoryManager::ManipulationInterval::pushFront(UserWaypointPtr uw, TransitionPtr t)
39 {
40  userWaypointsList.push_front(uw);
41  transitionsList.push_front(t);
42  lowerIntervalLimit--;
43 }
44 
45 void DesignerTrajectoryManager::ManipulationInterval::pushBack(UserWaypointPtr uw, TransitionPtr t)
46 {
47  userWaypointsList.push_back(uw);
48  transitionsList.push_back(t);
49  upperIntervalLimit++;
50 }
51 
52 void DesignerTrajectoryManager::ManipulationInterval::addBreakpointIndex(int index)
53 {
54  breakpointIndicesSet.insert(index);
55 }
56 
57 void DesignerTrajectoryManager::ManipulationInterval::finishSearch()
58 {
59  // copy userWaypointsList to userWaypoints vector
60  userWaypoints.reserve(userWaypointsList.size());
61  std::copy(
62  userWaypointsList.begin(),
63  userWaypointsList.end(),
64  std::back_inserter(userWaypoints));
65 
66  // copy transitionsList to transitions vector
67  transitions.reserve(transitionsList.size());
68  std::copy(
69  transitionsList.begin(),
70  transitionsList.end(),
71  std::back_inserter(transitions));
72 
73  // copy breakpointInicesSet to breakpointIndices vector
74  breakpointIndices.reserve(breakpointIndicesSet.size());
75  std::copy(
76  breakpointIndicesSet.begin(),
77  breakpointIndicesSet.end(),
78  std::back_inserter(breakpointIndices)
79  );
80 }
81 
82 UserWaypointPtr DesignerTrajectoryManager::ManipulationInterval::getUserWaypointByRealIndex(
83  unsigned int i) const
84 {
85  if (i - lowerIntervalLimit < userWaypoints.size())
86  {
87  return userWaypoints[i - lowerIntervalLimit];
88  }
89  else
90  {
91  // modify Exception?
92  throw OutOfRangeException();
93  }
94 
95 }
96 
97 UserWaypointPtr DesignerTrajectoryManager::ManipulationInterval::getUserWaypointByZeroBasedIndex(
98  unsigned int i) const
99 {
100  if (i < userWaypoints.size())
101  {
102  return userWaypoints[i];
103  }
104  else
105  {
106  // modify Exception?
107  throw OutOfRangeException();
108  }
109 }
110 
111 TransitionPtr DesignerTrajectoryManager::ManipulationInterval::getTransitionByRealIndex(
112  unsigned int i) const
113 {
114  if (i - lowerIntervalLimit < transitions.size())
115  {
116  return transitions[i - lowerIntervalLimit];
117  }
118  else
119  {
120  // modify Exception?
121  throw OutOfRangeException();
122  }
123 }
124 
125 TransitionPtr DesignerTrajectoryManager::ManipulationInterval::getTransitionByZeroBasedIndex(
126  unsigned int i) const
127 {
128  if (i < transitions.size())
129  {
130  return transitions[i];
131  }
132  else
133  {
134  // modify Exception?
135  throw OutOfRangeException();
136  }
137 }
138 
139 std::vector<std::vector<double>> DesignerTrajectoryManager::ManipulationInterval::
140  getUserWaypointsIKSolutions(
141  std::vector<std::vector<double>>& ikSolutions,
142  unsigned int intervalStart,
143  unsigned int intervalEnd)
144 {
145  std::vector<std::vector<double>> result;
146  for (unsigned int& newIndex : newIndexOfUserWaypoint)
147  {
148  if (newIndex < intervalStart)
149  {
150  continue;
151  }
152  if (newIndex > intervalEnd)
153  {
154  break;
155  }
156 
157  result.push_back(ikSolutions[newIndex]);
158  }
159  return result;
160 }
161 
162 void DesignerTrajectoryManager::ManipulationInterval::applyJointAnglesOfUserWaypoints(
163  std::vector<std::vector<double>> ikSolution)
164 {
165  std::vector<std::vector<double>> jointAngles = getUserWaypointsIKSolutions(
166  ikSolution,
167  newIndexOfUserWaypoint[0],
168  newIndexOfUserWaypoint[userWaypoints.size() - 1]);
169 
170  int count = 0;
171  for (UserWaypointPtr w : userWaypoints)
172  {
173  w->setJointAngles(jointAngles[count++]);
174  }
175 }
176 
177 ////////////////////////////////////////////////////////////////////////////////////////////////////
178 /// Auxiliary functions
179 ////////////////////////////////////////////////////////////////////////////////////////////////////
180 
181 void DesignerTrajectoryManager::saveState()
182 {
183  //cut off the last mementos behind the current memento
184  if (mementos.currentMemento < mementos.mementoList.size() - 1)
185  {
186  mementos.mementoList.resize(mementos.currentMemento + 1);
187  }
188 
189  if (designerTrajectory)
190  {
191  mementos.mementoList.push_back(std::shared_ptr<DesignerTrajectory>(
192  new DesignerTrajectory(*designerTrajectory)));
193  }
194  else
195  {
196  mementos.mementoList.push_back(nullptr);
197  }
198 
199  //if the size of the list is bigger than the MEMENTO_MAX, it just delete the first
200  //(oldest) memento
201  if (mementos.mementoList.size() > MEMENTO_MAX)
202  {
203  mementos.mementoList.pop_front();
204  }
205  else
206  {
207  mementos.currentMemento++;
208  }
209 }
210 
211 DesignerTrajectoryManager::ManipulationInterval
212 DesignerTrajectoryManager::calculateManipulationInterval(unsigned int manipulationIndex)
213 {
214  DesignerTrajectoryPtr& dt = designerTrajectory;
215  ManipulationInterval mi;
216 
217  // set start upper- and lowerIntervalLimit to manipulationIndex
218  mi.lowerIntervalLimit = manipulationIndex;
219  mi.upperIntervalLimit = manipulationIndex;
220 
221  // add UserWaypoint with index = manipulationIndex to ManipulationInterval
222  mi.addFirstUserWaypoint(dt->getUserWaypoint(manipulationIndex));
223 
224  // add index of first user waypoint if it is a breakepoint
225  if (dt->getUserWaypoint(manipulationIndex)->getIsTimeOptimalBreakpoint())
226  {
227  mi.addBreakpointIndex(manipulationIndex);
228  }
229 
230  // search upwards
231  for (unsigned int i = manipulationIndex + 1; i < dt->getNrOfUserWaypoints(); i++)
232  {
233  UserWaypointPtr tmpUwp = dt->getUserWaypoint(i);
234  TransitionPtr tmpTrans = dt->getTransition(i - 1);
235  mi.pushBack(tmpUwp, tmpTrans);
236 
237  if (tmpUwp->getIsTimeOptimalBreakpoint())
238  {
239  mi.addBreakpointIndex(i);
240 
241  /*
242  if (dt->getTransition(i - 1)->getInterpolationType()
243  != dt->getTransition(i)->getInterpolationType())
244  {
245  break;
246  }
247  */
248  }
249  }
250 
251  // search downwards
252  for (unsigned int i = manipulationIndex - 1; i != static_cast<unsigned>(-1); i--)
253  {
254  UserWaypointPtr tmpUwp = dt->getUserWaypoint(i);
255  TransitionPtr tmpTrans = dt->getTransition(i);
256  mi.pushFront(tmpUwp, tmpTrans);
257 
258  if (tmpUwp->getIsTimeOptimalBreakpoint())
259  {
260  mi.addBreakpointIndex(i);
261 
262  /*
263  if (dt->getTransition(i - 1)->getInterpolationType()
264  != dt->getTransition(i)->getInterpolationType())
265  {
266  break;
267  }
268  */
269  }
270  }
271 
272  // add first and last point to breakpointIndicesSet if they are not included already
273  mi.addBreakpointIndex(mi.lowerIntervalLimit);
274  mi.addBreakpointIndex(mi.upperIntervalLimit);
275  mi.finishSearch();
276 
277  return mi;
278 }
279 
280 std::vector<AbstractInterpolationPtr> DesignerTrajectoryManager::getInterpolationObjects(
281  ManipulationInterval& mi)
282 {
283  std::vector<PoseBasePtr> poses;
284  for (UserWaypointPtr& uwp : mi.userWaypoints)
285  {
286  poses.push_back(uwp->getPose());
287  }
288 
289  std::vector<InterpolationType> interpolationTypes;
290  for (TransitionPtr& tp : mi.transitions)
291  {
292  interpolationTypes.push_back(tp->getInterpolationType());
293  }
294 
295  return InterpolationSegmentFactory::produceInterpolationSegments(poses, interpolationTypes);
296 }
297 
298 void DesignerTrajectoryManager::calculateInterpolatedPoints(
299  std::vector<AbstractInterpolationPtr> interpolationObjects,
300  unsigned int fps,
301  ManipulationInterval& mi)
302 {
303  // requirement: time in seconds !!!!
304 
305  // treat first point (with time 0.0) seperately
306  ////mi.interpolatedPoses.push_back(interpolationObjects[0]->getPoseAt(0.0));
307  ////mi.newIndexOfUserWaypoint.push_back(0);
308 
309  // calculate all timestamps and add the poses accordingly
310  for (unsigned int i = 0; i < mi.transitions.size(); i++)
311  {
312  std::vector<double> timestamps;
313 
314  // check if transition is linear interpolated (no need to calculate further points between)
315  // get the transition
316  TransitionPtr tmpTransition = mi.getTransitionByZeroBasedIndex(i);
317 
318  // calculate total frame count (how many frames to insert between 2 userwaypoints)
319  //unsigned int totalFrameCount = tmpTransition->getUserDuration() * fps;
320  unsigned int totalFrameCount = tmpTransition->getTimeOptimalDuration() * fps;
321 
322  if (totalFrameCount == 0)
323  {
324  totalFrameCount = DEFAULT_FRAME_COUNT;
325  }
326 
327  if (totalFrameCount > 1)
328  {
329  // calculate the increment value to get evenly distributed timestamps
330  double increment = 1.0 / (totalFrameCount - 1);
331 
332  // starting at k = 1 jumps the 0.0 timestamp in every transition
333  ////for (unsigned int k = 1; k < totalFrameCount; k++)
334  for (unsigned int k = 0; k < totalFrameCount; k++)
335  {
336  timestamps.push_back(k * increment);
337  }
338  }
339  else
340  {
341  timestamps.push_back(0.0);
342  timestamps.push_back(1.0);
343  }
344 
345 
346  std::vector<PoseBasePtr> tmpInterpolatedPositions;
347  for (double timestamp : timestamps)
348  {
349  ////mi.interpolatedPoses.push_back(interpolationObjects[i]->getPoseAt(timestamp));
350  tmpInterpolatedPositions.push_back(interpolationObjects[i]->getPoseAt(timestamp));
351  }
352 
353  mi.interpolatedTransitions.push_back(tmpInterpolatedPositions);
354  tmpInterpolatedPositions.clear();
355 
356  // add the index of the last pose, which originated from an userwaypoint, to the
357  // newIndexOfUserWaypoint vector
358  ////mi.newIndexOfUserWaypoint.push_back(mi.interpolatedPoses.size() - 1);
359  }
360 }
361 
362 bool DesignerTrajectoryManager::checkTransitionReachability(
363  ManipulationInterval& mi, unsigned int transitionIndex)
364 {
365  for (PoseBasePtr pose : mi.interpolatedTransitions[transitionIndex])
366  {
367  continue;
368  //if (!kin->isReachable(rns, pose))
369 
370  //provisorisch
371  if (!kinSolver->isReachable(rns, pose, VirtualRobot::IKSolver::Position))
372  {
373  return false;
374  }
375  }
376 
377  return true;
378 }
379 
380 std::vector<std::vector<double>> DesignerTrajectoryManager::calculateIKSolutions(
381  ManipulationInterval& mi)
382 {
383  // IKSolutions
384  std::vector<std::vector<double>> ikSolutions;
385  ikSolutions.push_back(mi.userWaypoints[0]->getJointAngles());
386 
387  // the new index of userwaypoint 0 is 0
388  mi.newIndexOfUserWaypoint.push_back(0);
389 
390  // motion planning insertion indices
391  std::vector<InsertTransition> mpInserts;
392 
393  for (unsigned int transitionIndex = 0;
394  transitionIndex < mi.interpolatedTransitions.size();
395  transitionIndex++)
396  {
397  if (!checkTransitionReachability(mi, transitionIndex))
398  {
399  // this transition is not reachable
400  InsertTransition mpInsert;
401  mpInsert.transitionIndex = transitionIndex;
402  mpInsert.insertionIndex = ikSolutions.size() - 1; //destinations.size() - 1;
403  mpInserts.push_back(mpInsert);
404 
405  //calculate IKSolution (jump to end point of this transition)
406  std::vector<double> start
407  = {ikSolutions.back()};
408 
409  std::vector<PoseBasePtr> destinations
410  = {mi.interpolatedTransitions[transitionIndex].back()};
411 
412  std::vector<VirtualRobot::IKSolver::CartesianSelection> selections
413  = {mi.userWaypoints[transitionIndex + 1]->getIKSelection()};
414 
415  std::vector<std::vector<double>> tmpIkSolutions = kinSolver->solveRecursiveIKRelative(
416  rns,
417  start,
418  destinations,
419  selections);
420 
421  // insert tmpIkSolutions into ikSolutions
422  ikSolutions.insert(ikSolutions.end(), tmpIkSolutions.begin(), tmpIkSolutions.end());
423 
424  // the new index of the userwaypoint transitionIndex+1 is set later
425  // when inserting motion planning results into ikSolutions
426  // reserve place in vector
427  mi.newIndexOfUserWaypoint.push_back(-1);
428 
429  continue;
430  }
431 
432  // this transition is reachable
433  // calculate IKSolution of this transition
434  // get start
435  std::vector<double> start
436  = {ikSolutions.back()};
437 
438  // get destinations: all poses from interpolatedTransition except for the first
439  std::vector<PoseBasePtr> destinations(
440  mi.interpolatedTransitions[transitionIndex].begin() + 1,
441  mi.interpolatedTransitions[transitionIndex].end());
442 
443  // get selection
444  std::vector<VirtualRobot::IKSolver::CartesianSelection> selections;
445 
446  // |destinations| - 1 times do:
447  for (unsigned int i = 1; i < destinations.size(); i++)
448  {
449  selections.push_back(mi.userWaypoints[transitionIndex + 1]->getIKSelection());
450  }
451 
452  // for last destination: get real IKSelection of UserWaypoint
453  selections.push_back(mi.userWaypoints[transitionIndex + 1]->getIKSelection());
454 
455  // call ikSolver
456  std::vector<std::vector<double>> tmpIkSolutions = kinSolver->solveRecursiveIKRelative(
457  rns,
458  start,
459  destinations,
460  selections);
461  // END: calculate IKSolution of this transition
462 
463  // check for tmpIkSolutions for collision
464 
465  // this transition is reachable and has no collisions
466  // insert tmpIkSolutions into ikSolutions
467  ikSolutions.insert(ikSolutions.end(), tmpIkSolutions.begin(), tmpIkSolutions.end());
468  // save the new index of the userwaypoint with index transitionIndex + 1
469  mi.newIndexOfUserWaypoint.push_back(ikSolutions.size() - 1);
470  }
471  return ikSolutions;
472 }
473 
474 std::vector<TimedTrajectory> DesignerTrajectoryManager::calculateTimeOptimalTrajectories(
475  std::vector<std::vector<double>> ikSolutions,
476  ManipulationInterval& mi)
477 {
478  std::vector<TimedTrajectory> result;
479 
480  for (unsigned int i = 0; i < mi.breakpointIndices.size() - 1; i++)
481  {
482  /*
483  * mi.breakpointIndices are the indices before the interpolated points were inserted.
484  */
485  int intervalStart = mi.breakpointIndices[i];
486  int intervalEnd = mi.breakpointIndices[i + 1];
487  std::vector<std::vector<double>> ikSolutionsInterval(
488  ikSolutions.begin() + mi.newIndexOfUserWaypoint[intervalStart],
489  ikSolutions.begin() + 1 + mi.newIndexOfUserWaypoint[intervalEnd]);
490 
491  /*
492  * Because intervalStart/intervalEnd are the breakpoint indices BEFORE interpolated
493  * points were inserted,
494  * their new index (retrieved with mi.newIndexOfUserWaypoint[...]) is needed as parameter
495  * for the function mi.getUserWaypointsIKSolutions(..., ..., ...)
496  */
497  std::vector<std::vector<double>> userWaypointsIKSolution
498  = mi.getUserWaypointsIKSolutions(
499  ikSolutions,
500  mi.newIndexOfUserWaypoint[intervalStart],
501  mi.newIndexOfUserWaypoint[intervalEnd]);
502 
503  result.push_back(
504  DesignerTrajectoryCalculator(environment).calculateTimeOptimalTrajectory(
505  ikSolutionsInterval,
506  userWaypointsIKSolution,
507  rns,
508  MAX_DEVIATION));
509  }
510 
511  return result;
512 }
513 
515 {
516  if (mementos.currentMemento != 0)
517  {
518  if (*(std::next(mementos.mementoList.begin(), mementos.currentMemento - 1)))
519  {
520  designerTrajectory = DesignerTrajectoryPtr(new DesignerTrajectory(*(*(std::next(mementos.mementoList.begin(),
521  mementos.currentMemento - 1)))));
522  isInitialized = true;
523  }
524  else
525  {
526  isInitialized = false;
527  }
528  mementos.currentMemento--;
529  return true;
530  }
531  else
532  {
533  return false;
534  }
535 }
536 
538 {
539  if (mementos.currentMemento < mementos.mementoList.size() - 1)
540  {
541  if (*std::next(mementos.mementoList.begin(), mementos.currentMemento + 1))
542  {
543  designerTrajectory = DesignerTrajectoryPtr(new DesignerTrajectory(*(*(std::next(mementos.mementoList.begin(),
544  mementos.currentMemento + 1)))));
545  }
546  else
547  {
548  isInitialized = false;
549  }
550 
551  mementos.currentMemento++;
552  return true;
553  }
554  else
555  {
556  return false;
557  }
558 }
559 
561 {
562  return isInitialized;
563 }
564 
565 void DesignerTrajectoryManager::theUniversalMethod(unsigned int index)
566 {
567  if (designerTrajectory->getNrOfUserWaypoints() > 1)
568  {
569  //calculate ikSolution of mainpulation intervall//////////////////////////////////////
570  ManipulationInterval mi = calculateManipulationInterval(index);
571 
572  // poses
573  std::vector<PoseBasePtr> poses;
574  std::vector<PoseBasePtr> posesBackup;
575 
576  // selections
577  std::vector<VirtualRobot::IKSolver::CartesianSelection> selections;
578  std::vector<VirtualRobot::IKSolver::CartesianSelection> selectionsBackup;
579 
580  for (UserWaypointPtr uwp : mi.userWaypoints)
581  {
582  poses.push_back(uwp->getPose());
583  posesBackup.push_back(PoseBasePtr(new Pose(Pose(uwp->getPose()->position, uwp->getPose()->orientation).toEigen())));
584  selections.push_back(uwp->getIKSelection());
585  selectionsBackup.push_back(uwp->getIKSelection());
586  }
587 
589  {
591  }
592 
593  std::vector<InterpolationType> interpolations;
594  for (TransitionPtr trans : mi.transitions)
595  {
596  interpolations.push_back(trans->getInterpolationType());
597  }
598  int count = 0;
599  for (UserWaypointPtr uwp : mi.userWaypoints)
600  {
601  uwp->setPose(poses[count]);
602  uwp->setIKSelection(selections[count]);
603  count++;
604  }
605 
606  calculateInterpolatedPoints(
608  poses,
609  interpolations),
610  DEFAULT_FRAME_COUNT,
611  mi);
612  //calculateInterpolatedPoints(getInterpolationObjects(mi), DEFAULT_FRAME_COUNT, mi);
613 
614  //bool motionPlanningCalled = false;
615 
616  std::vector<std::vector<double>> ikSolutions = calculateIKSolutions(mi);
617 
618  count = 0;
619  for (UserWaypointPtr uwp : mi.userWaypoints)
620  {
621  uwp->setIKSelection(selectionsBackup[count]);
622  uwp->setPose(posesBackup[count]);
623  count++;
624  }
625 
626  //Set the JointAngles of the UserWaypoints////////////////////////////////////////////
627  mi.applyJointAnglesOfUserWaypoints(ikSolutions);
628 
629  //set interBreakpointsTrajectories////////////////////////////////////////////////////
630  std::vector<TimedTrajectory> timedTrajectories = calculateTimeOptimalTrajectories(
631  ikSolutions, mi);
632  //search how many interBreakPointTrajectories are behind and before the new
633  //interBreakpointTrajectories
634  int countBefore = 0;
635  int countAfter = 0;
636  if (mi.lowerIntervalLimit != 0)
637  {
638  countBefore++;
639  for (unsigned int i = mi.lowerIntervalLimit - 1; i > 0; i--)
640  {
641  if (designerTrajectory->getUserWaypoint(i)->getIsTimeOptimalBreakpoint())
642  {
643  countBefore++;
644  }
645  }
646  }
647 
648  if (mi.upperIntervalLimit != designerTrajectory->getNrOfUserWaypoints() - 1)
649  {
650  countAfter++;
651  for (unsigned int i = mi.upperIntervalLimit + 1; i < designerTrajectory->
652  getNrOfUserWaypoints() - 1; i++)
653  {
654  countAfter++;
655  }
656  }
657 
658  std::vector<TrajectoryPtr> InterBreakPointTrajectories =
659  designerTrajectory->getInterBreakpointTrajectories();
660  std::vector<TrajectoryPtr> newInterBreakPointTrajectories;
661  newInterBreakPointTrajectories.insert(newInterBreakPointTrajectories.end(),
662  InterBreakPointTrajectories.begin(),
663  InterBreakPointTrajectories.begin() +
664  countBefore);
665 
666  // set new inter breakpoint trajectories
667  for (TimedTrajectory& t : timedTrajectories)
668  {
669  TrajectoryPtr traj = t.getTrajectory();
670  newInterBreakPointTrajectories.push_back(traj);
671  }
672 
673  newInterBreakPointTrajectories.insert(newInterBreakPointTrajectories.end(),
674  InterBreakPointTrajectories.end() - countAfter,
675  InterBreakPointTrajectories.end());
676  designerTrajectory->setInterBreakpointTrajectories(newInterBreakPointTrajectories);
677 
678  //set newTimeOptimalDuration of each Transition///////////////////////////////////////
679  //and timeOptimalTimestamp of each UserWaypoint///////////////////////////////////////
680  //and Trajectories of all changed Transitions ////////////////////////////////////////
681  TrajectoryPtr traj = designerTrajectory ->getTimeOptimalTrajectory();
682  std::vector<double> timestamps = traj->getTimestamps();
683  unsigned int trajCount = 0;
684 
685  //search for the timestamp of first changed point of traj
686  while (trajCount < timestamps.size() &&
687  designerTrajectory->getUserWaypoint(mi.breakpointIndices[0])->getTimeOptimalTimestamp()
688  > timestamps[trajCount])
689  {
690  trajCount++;
691  }
692 
693  for (unsigned int t = 0; t < timedTrajectories.size(); t++)
694  {
695  //all timestamps of the userWaypoint of the timedTrajectory
696  std::vector<double> timedUserWaypoints = timedTrajectories[t].getUserPoints();
697 
698  if (timedUserWaypoints.size() == 0)
699  {
700  throw InvalidArgumentException();
701  }
702 
703  unsigned int count = 0;
704 
705  //set timeOptimalDuration of all changed transitions
706  //set timeOptimalTimestamp of all changed userWaypoints
707  for (unsigned int i = mi.breakpointIndices[t]; i < mi.breakpointIndices[t + 1]; i++)
708  {
709  TransitionPtr trans = designerTrajectory->getTransition(i);
710  trans->
711  setTimeOptimalDuration(timedUserWaypoints[count + 1] -
712  timedUserWaypoints[count]);
713  count++;
714  }
715 
716 
717  //set all Trajectories of changed Transitions
718  for (unsigned int i = mi.breakpointIndices[t]; i < mi.breakpointIndices[t + 1]; i++)
719  {
720  TransitionPtr trans = designerTrajectory->getTransition(i);
721  UserWaypointPtr end = trans->getEnd();
722  unsigned int trajCountEnd = trajCount + 1;
723  std::vector<double> newTimestamps = {0.0};
724  std::vector<std::vector<double>> newTrajData;
725  //add first jointAngles of first timestamp
726  for (unsigned int dim = 0; dim < traj->dim(); dim++)
727  {
728  newTrajData.push_back({traj->getState(timestamps[trajCount], dim)});
729  }
730 
731  //add all jointAngles for all timestamps at transition
732  while (trajCountEnd < timestamps.size() && timestamps[trajCountEnd] < end->getTimeOptimalTimestamp())
733  {
734  newTimestamps.push_back(timestamps[trajCountEnd] - timestamps[trajCount]);
735  for (unsigned int dim = 0; dim < traj->dim(); dim++)
736  {
737  //jointAngles of the dimension
738  newTrajData[dim].push_back(traj->getState(timestamps[trajCountEnd], dim));
739  }
740  trajCountEnd++;
741  }
742  trajCount = trajCountEnd;
743  TrajectoryPtr newTraj = TrajectoryPtr(new Trajectory(newTrajData, newTimestamps, traj->getDimensionNames()));
744  trans->setTrajectory(newTraj);
745  }
746  }
747 
748  //shift all timeOptimaltimestamps of the userWaypoints behind last BreakpointIndices
749  //it goes through transitions (getNrOfUserWaypoints - 2 = NrOfTransitions - 1)
750  for (unsigned int i = mi.breakpointIndices.back();
751  i <= designerTrajectory->getNrOfUserWaypoints() - 2; i++)
752  {
753  //the setter of transitions updates the timeOptimalTimestamps of end- and start-
754  //Userwaypoint
755  double time = designerTrajectory->getTransition(i)->getTimeOptimalDuration();
756  designerTrajectory->getTransition(i)->setTimeOptimalDuration(time);
757  }
758 
759 
760 
761  //update UserTimestamps of all UserWaypoints
762  for (unsigned int i = 0; i < designerTrajectory->getNrOfUserWaypoints() - 2; i++)
763  {
764  double time = designerTrajectory->getTransition(i)->getStart()->getUserTimestamp()
765  + designerTrajectory->getTransition(i)->getUserDuration();
766  designerTrajectory->getTransition(i)->getEnd()->setUserTimestamp(time);
767  }
768  }
769  saveState();
770 }
771 
772 std::vector<double> DesignerTrajectoryManager::getNewIkSolutionOfFirstPoint(PoseBasePtr oldStart, PoseBasePtr newStart, std::vector<double> jointAnglesOldStart)
773 {
774  //Resolve recursive IK from oldStart to NewStart
775  std::vector<AbstractInterpolationPtr> ip = InterpolationSegmentFactory::produceLinearInterpolationSegments({oldStart, newStart});
776  std::vector<PoseBasePtr> poses;
777  std::vector<VirtualRobot::IKSolver::CartesianSelection> selections;
778 
779  for (AbstractInterpolationPtr current : ip)
780  {
781  for (double i = 1; i < DEFAULT_FRAME_COUNT - 1; i = i + 1.0)
782  {
783  poses.push_back(current->getPoseAt(i / DEFAULT_FRAME_COUNT));
785  }
786  }
787  poses.push_back(newStart);
788  selections.push_back(VirtualRobot::IKSolver::CartesianSelection::All);
789  std::vector<std::vector<double>> ikSolutions = kinSolver->solveRecursiveIKRelative(rns, jointAnglesOldStart, poses, selections);
790 
791  return ikSolutions.back();
792 }
793 
794 ////////////////////////////////////////////////////////////////////////////////////////////////////
795 /// Constructor(s)
796 ////////////////////////////////////////////////////////////////////////////////////////////////////
797 
799  std::string rnsName, EnvironmentPtr environment)
800  : kinSolver(KinematicSolver::getInstance(
801  environment->getScene(),
802  environment->getRobot())),
803  environment(environment)
804 {
805  rns = environment->getRobot()->getRobotNodeSet(rnsName);
806 }
807 
808 ////////////////////////////////////////////////////////////////////////////////////////////////////
809 /// Public Functions
810 ////////////////////////////////////////////////////////////////////////////////////////////////////
811 
813  std::vector<double>& jointAngles)
814 {
815  PoseBasePtr pb = kinSolver->doForwardKinematic(rns, jointAngles);
816  Pose pose = Pose(pb->position, pb->orientation);
817  pb = PoseBasePtr(new Pose(rns->getKinematicRoot()->toLocalCoordinateSystem(pose.toEigen())));
818 
819  // create UserWaypoint with the given jointAngles
820  UserWaypointPtr tmpUwp(new UserWaypoint(pb));
821  tmpUwp->setJointAngles(jointAngles);
822 
823  designerTrajectory = DesignerTrajectoryPtr(new DesignerTrajectory(tmpUwp, rns));
824 
825  //mementos.currentMemento = 0;
826 
827  if (mementos.mementoList.size() != 0)
828  {
829  saveState();
830  }
831  else
832  {
833  mementos.mementoList.push_back(DesignerTrajectoryPtr(
834  new DesignerTrajectory(*designerTrajectory)));
835  }
836 
837  isInitialized = true;
838 }
839 
840 void DesignerTrajectoryManager::addWaypoint(const PoseBasePtr pb)
841 {
842  if (isInitialized)
843  {
844  //get a clean copy of the designerTrajectory
845  designerTrajectory = getDesignerTrajectory();
846 
847  UserWaypointPtr newPoint = UserWaypointPtr(new UserWaypoint(pb));
848  designerTrajectory->addLastUserWaypoint(newPoint);
849  theUniversalMethod(designerTrajectory->getNrOfUserWaypoints() - 1);
850  }
851  else
852  {
853  throw NotInitializedException("Manager is not intialized", "Manager");
854  }
855 }
856 
857 void DesignerTrajectoryManager::insertWaypoint(unsigned int index, const PoseBasePtr pb)
858 {
859  if (isInitialized)
860  {
861  //get a clean copy of the designerTrajectory
862  designerTrajectory = getDesignerTrajectory();
863 
864  if (index != 0)
865  {
866  UserWaypointPtr newPoint = UserWaypointPtr(new UserWaypoint(pb));
867  designerTrajectory->insertUserWaypoint(newPoint, index);
868  theUniversalMethod(index);
869  }
870  else
871  {
872  PoseBasePtr oldStart = designerTrajectory->getUserWaypoint(0)->getPose();
873  std::vector<double> jointAngles = getNewIkSolutionOfFirstPoint(oldStart, pb, designerTrajectory->getUserWaypoint(0)->getJointAngles());
874  if (jointAngles.size() == 0)
875  {
876  return;
877  }
878  UserWaypointPtr newPoint = UserWaypointPtr(new UserWaypoint(pb));
879  designerTrajectory->insertUserWaypoint(newPoint, index);
880  designerTrajectory->getUserWaypoint(0)->setJointAngles(jointAngles);
881 
882  theUniversalMethod(index);
883  }
884  }
885  else
886  {
887  throw NotInitializedException("Manager is not intialized", "Manager");
888  }
889 }
890 
891 void DesignerTrajectoryManager::editWaypointPoseBase(unsigned int index, const PoseBasePtr pb)
892 {
893  if (isInitialized)
894  {
895  //get a clean copy of the designerTrajectory
896  designerTrajectory = getDesignerTrajectory();
897  if (index != 0)
898  {
899  designerTrajectory->getUserWaypoint(index)->setPose(pb);
900  }
901  else
902  {
903  std::vector<double> newJointAngles;
904  if (designerTrajectory->getNrOfUserWaypoints() > 1)
905  {
906  newJointAngles = getNewIkSolutionOfFirstPoint(
907  designerTrajectory->getUserWaypoint(1)->getPose(), pb,
908  designerTrajectory->getUserWaypoint(1)->getJointAngles());
909  if (newJointAngles.size() == 0)
910  {
911  return;
912  }
913  designerTrajectory->getUserWaypoint(0)->setPose(pb);
914  designerTrajectory->getUserWaypoint(0)->setJointAngles(newJointAngles);
915  }
916  else
917  {
918  //newJointAngles = kinSolver->solveIK(rns, pb, designerTrajectory->getUserWaypoint(0)->getIKSelection(), 50);
919  newJointAngles = getNewIkSolutionOfFirstPoint(
920  designerTrajectory->getUserWaypoint(0)->getPose(),
921  pb,
922  designerTrajectory->getUserWaypoint(0)->getJointAngles());
923  if (newJointAngles.size() == 0)
924  {
925  return;
926  }
927  UserWaypointPtr uwpTmp(new UserWaypoint(pb));
928  uwpTmp->setJointAngles(newJointAngles);
929  uwpTmp->setIKSelection(designerTrajectory->getUserWaypoint(0)->getIKSelection());
930  uwpTmp->setIsTimeOptimalBreakpoint(
931  designerTrajectory->getUserWaypoint(0)->getIsTimeOptimalBreakpoint());
932  DesignerTrajectoryPtr dtTmp(new DesignerTrajectory(uwpTmp, rns));
933  designerTrajectory = dtTmp;
934  }
935  }
936  theUniversalMethod(index);
937  }
938  else
939  {
940  throw NotInitializedException("Manager is not intialized", "Manager");
941  }
942 }
943 
945 {
946  if (isInitialized)
947  {
948  //get a clean copy of the designerTrajectory
949  designerTrajectory = getDesignerTrajectory();
950 
951  designerTrajectory->getUserWaypoint(index)->setIKSelection(ikSelection);
952  theUniversalMethod(index);
953  }
954  else
955  {
956  throw NotInitializedException("Manager is not intialized", "Manager");
957  }
958 }
959 
961 {
962  if (isInitialized)
963  {
964  //get a clean copy of the designerTrajectory
965  designerTrajectory = getDesignerTrajectory();
966 
967  if (designerTrajectory->getNrOfUserWaypoints() == 1)
968  {
969  isInitialized = false;
970  designerTrajectory = nullptr;
971  saveState();
972  }
973  else
974  {
975  designerTrajectory->deleteUserWaypoint(index);
976 
977  //check if first userwaypoint was delted
978  if (index == 0)
979  {
980  designerTrajectory->getUserWaypoint(0)->setTimeOptimalTimestamp(0);
981  designerTrajectory->getUserWaypoint(0)->setUserTimestamp(0);
982  }
983 
984  // check if just one waypoint is left
985  if (designerTrajectory->getNrOfUserWaypoints() == 1)
986  {
987  saveState();
988  return;
989  }
990 
991  // check if last userwaypoint was deleted
992  if (index == designerTrajectory->getNrOfUserWaypoints())
993  {
994  theUniversalMethod(index - 1);
995  }
996  else
997  {
998  theUniversalMethod(index);
999  }
1000  }
1001  }
1002  else
1003  {
1004  throw NotInitializedException("Manager is not intialized", "Manager");
1005  }
1006 }
1007 
1009 {
1010  if (isInitialized)
1011  {
1012  //get a clean copy of the designerTrajectory
1013  designerTrajectory = getDesignerTrajectory();
1014 
1015  designerTrajectory->getTransition(index)->setInterpolationType(it);
1016  theUniversalMethod(index);
1017  }
1018  else
1019  {
1020  throw NotInitializedException("Manager is not intialized", "Manager");
1021  }
1022 }
1023 
1025 {
1026  if (isInitialized)
1027  {
1028  //get a clean copy of the designerTrajectory
1029  designerTrajectory = getDesignerTrajectory();
1030 
1031  designerTrajectory->getUserWaypoint(index)->setIsTimeOptimalBreakpoint(b);
1032  theUniversalMethod(index);
1033  }
1034  else
1035  {
1036  throw NotInitializedException("Manager is not intialized", "Manager");
1037  }
1038 }
1039 
1041 {
1042  if (isInitialized)
1043  {
1044  //get a clean copy of the designerTrajectory
1045  designerTrajectory = getDesignerTrajectory();
1046 
1047  designerTrajectory->getTransition(index)->setUserDuration(duration);
1048  //shift all userTimestamps of the userwaypoints behind
1049  for (unsigned int i = index + 1; i < designerTrajectory->getNrOfUserWaypoints() - 1; i++)
1050  {
1051  TransitionPtr trans = designerTrajectory->getTransition(i);
1052  trans->setUserDuration(trans->getUserDuration());
1053  }
1054  //theUniversalMethod(index);
1055  saveState();
1056  }
1057  else
1058  {
1059  throw NotInitializedException("Manager is not intialized", "Manager");
1060  }
1061 }
1062 
1064 {
1065  if (isInitialized)
1066  {
1067  //return DesignerTrajectoryPtr(new DesignerTrajectory(*designerTrajectory));
1068  return DesignerTrajectoryPtr(new DesignerTrajectory(*(*std::next(mementos.mementoList.begin(),
1069  mementos.currentMemento))));
1070 
1071  }
1072  else
1073  {
1074  return nullptr;
1075  }
1076 }
1077 
1079 {
1080  if (newDesignerTrajectory->getNrOfUserWaypoints() > 1 && newDesignerTrajectory->getRns()->getName() == rns->getName())
1081  {
1082  TrajectoryPtr trajectory = newDesignerTrajectory->getTimeOptimalTrajectory();
1083 
1084  //set Trajectories of transitions
1085  for (unsigned int i = 0; i < newDesignerTrajectory->getNrOfUserWaypoints() - 1; i++)
1086  {
1087  TransitionPtr trans = newDesignerTrajectory->getTransition(i);
1088  double transBeginTime = trans->getStart()->getTimeOptimalTimestamp();
1089  double transEndTime = trans->getEnd()->getTimeOptimalTimestamp();
1090  TrajectoryPtr traj = trajectory->getPart(transBeginTime, transEndTime, 2);
1091 
1092 
1093  //shift timestamps
1094  std::vector<std::vector<double>> nodeData;
1095  for (unsigned int dim = 0; dim < traj->dim(); dim++)
1096  {
1097  nodeData.push_back(traj->getDimensionData(dim));
1098  }
1099  std::vector<double> newTimestamps = {0.0};
1100  std::vector<double> oldTimestamps = traj->getTimestamps();
1101  for (unsigned int j = 1; j < oldTimestamps.size(); j++)
1102  {
1103  if (oldTimestamps[j] - transBeginTime >= 0)
1104  {
1105  newTimestamps.push_back(oldTimestamps[j] - transBeginTime);
1106  }
1107  else
1108  {
1109  newTimestamps.push_back(0);
1110  }
1111  }
1112 
1113  TrajectoryPtr shiftedTraj(new Trajectory(nodeData, newTimestamps, traj->getDimensionNames()));
1114  trans->setTrajectory(shiftedTraj);
1115  }
1116  designerTrajectory = newDesignerTrajectory;
1117 
1118  if (mementos.mementoList.size() != 0)
1119  {
1120  saveState();
1121  }
1122  else
1123  {
1124  mementos.mementoList.push_back(DesignerTrajectoryPtr(
1125  new DesignerTrajectory(*designerTrajectory)));
1126  }
1127  isInitialized = true;
1128  return true;
1129  }
1130  return false;
1131 }
1132 
1134 {
1135  return mementos.currentMemento > 0;
1136 }
1137 
1139 {
1140  if (mementos.mementoList.size() != 0 && mementos.currentMemento < mementos.mementoList.size() - 1)
1141  {
1142  return true;
1143  }
1144  else
1145  {
1146  return false;
1147  }
1148 }
1149 
armarx::UserWaypointPtr
std::shared_ptr< UserWaypoint > UserWaypointPtr
Definition: UserWaypoint.h:137
armarx::TrajectoryPtr
IceInternal::Handle< Trajectory > TrajectoryPtr
Definition: Trajectory.h:52
armarx::navigation::core::Pose
Eigen::Isometry3f Pose
Definition: basic_types.h:31
index
uint8_t index
Definition: EtherCATFrame.h:59
armarx::DesignerTrajectoryManager::editWaypointIKSelection
void editWaypointIKSelection(unsigned int index, VirtualRobot::IKSolver::CartesianSelection ikSelection)
Edits the IKSelection of a UserWaypoint.
Definition: DesignerTrajectoryManager.cpp:944
armarx::KinematicSolver
Realizes the Singleton-Pattern, Provides Methods to solve Kinematic Problems (forward and inverse)
Definition: KinematicSolver.h:51
armarx::UserWaypoint
The UserWaypoint class represents a waypoint of the trajectory.
Definition: UserWaypoint.h:42
armarx::DesignerTrajectory
Definition: DesignerTrajectory.h:37
armarx::DesignerTrajectoryCalculator
Offers functionality to create TimedTrajectories from supplied Trajectories and points set by the use...
Definition: DesignerTrajectoryCalculator.h:16
armarx::InterpolationSegmentFactory::needsOptimizing
static bool needsOptimizing(std::vector< VirtualRobot::IKSolver::CartesianSelection > &selections)
needsOptimizing returns true if there is a CartesianSelection at i that dominates a CartesianSelectio...
Definition: InterpolationSegmentFactory.cpp:278
armarx::DesignerTrajectoryManager::undo
bool undo()
undo
Definition: DesignerTrajectoryManager.cpp:514
armarx::DesignerTrajectoryManager::undoPossible
bool undoPossible()
setCollisionModels Sets the collision models on the collision detection attribute
Definition: DesignerTrajectoryManager.cpp:1133
IceInternal::Handle< Trajectory >
armarx::EnvironmentPtr
std::shared_ptr< Environment > EnvironmentPtr
Definition: Environment.h:29
armarx::AbstractInterpolationPtr
std::shared_ptr< AbstractInterpolation > AbstractInterpolationPtr
Definition: AbstractInterpolation.h:77
copy
Use of this software is granted under one of the following two to be chosen freely by the user Boost Software License Version Marcin Kalicinski Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following must be included in all copies of the in whole or in and all derivative works of the unless such copies or derivative works are solely in the form of machine executable object code generated by a source language processor THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF FITNESS FOR A PARTICULAR TITLE AND NON INFRINGEMENT IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN TORT OR ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE The MIT Marcin Kalicinski Permission is hereby free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to copy
Definition: license.txt:39
armarx::DesignerTrajectoryManager::redo
bool redo()
redo
Definition: DesignerTrajectoryManager.cpp:537
armarx::DesignerTrajectoryManager::setWaypointAsBreakpoint
void setWaypointAsBreakpoint(unsigned int index, bool b)
Sets a UserWaypoint as (not-) breakpoint.
Definition: DesignerTrajectoryManager.cpp:1024
armarx::InterpolationType
InterpolationType
The InterpolationType enum lists all available interpolation types eLinearInterpolation: represents l...
Definition: InterpolationType.h:32
armarx::NJointTaskSpaceDMPControllerMode::CartesianSelection
CartesianSelection
Definition: ControllerInterface.ice:34
armarx::Pose::toEigen
virtual Eigen::Matrix4f toEigen() const
Definition: Pose.cpp:334
armarx::DesignerTrajectoryManager::editWaypointPoseBase
void editWaypointPoseBase(unsigned int index, const PoseBasePtr pose)
Edits the pose of a UserWaypoint.
Definition: DesignerTrajectoryManager.cpp:891
armarx::DesignerTrajectoryManager::redoPossible
bool redoPossible()
Definition: DesignerTrajectoryManager.cpp:1138
armarx::DesignerTrajectoryManager::getIsInitialized
bool getIsInitialized()
True if the DesignerTrajectory is initialized.
Definition: DesignerTrajectoryManager.cpp:560
armarx::InterpolationSegmentFactory::produceLinearInterpolationSegments
static std::vector< AbstractInterpolationPtr > produceLinearInterpolationSegments(std::vector< PoseBasePtr > controlPoints)
produceInterpolationSegments constructs a vector of LinearInterpolations
Definition: InterpolationSegmentFactory.cpp:151
armarx::TransitionPtr
std::shared_ptr< Transition > TransitionPtr
Definition: Transition.h:141
armarx::VariantType::Trajectory
const VariantTypeId Trajectory
Definition: Trajectory.h:44
armarx::channels::KinematicUnitObserver::jointAngles
const KinematicUnitDatafieldCreator jointAngles("jointAngles")
armarx::Pose
The Pose class.
Definition: Pose.h:242
armarx::DesignerTrajectoryManager::getDesignerTrajectory
DesignerTrajectoryPtr getDesignerTrajectory() const
Returns a deep copy of this manager's DesignerTrajectory.
Definition: DesignerTrajectoryManager.cpp:1063
armarx::DesignerTrajectoryPtr
std::shared_ptr< DesignerTrajectory > DesignerTrajectoryPtr
Definition: DesignerTrajectory.h:165
armarx::TimedTrajectory
A container for a Trajectory and a set of timestamps, representing the arrival of the Trajectory at u...
Definition: TimedTrajectory.h:13
armarx::InterpolationSegmentFactory::optimizeControlPoints
static void optimizeControlPoints(std::vector< PoseBasePtr > &controlPoints, std::vector< VirtualRobot::IKSolver::CartesianSelection > &selections)
optimizeControlPoints changes the cartian selections and control points so that the IKSolving produce...
Definition: InterpolationSegmentFactory.cpp:191
armarx::InterpolationSegmentFactory::produceInterpolationSegments
static std::vector< AbstractInterpolationPtr > produceInterpolationSegments(std::vector< PoseBasePtr > controlPoints, std::vector< InterpolationType > interpolations)
produceInterpolationSegments constructs a vector of AbstractInterpolation the concrete Interpolationt...
Definition: InterpolationSegmentFactory.cpp:36
armarx::navigation::core::Position
Eigen::Vector3f Position
Definition: basic_types.h:36
armarx::DesignerTrajectoryManager::initializeDesignerTrajectory
void initializeDesignerTrajectory(std::vector< double > &jointAngles)
Public functions.
Definition: DesignerTrajectoryManager.cpp:812
armarx::DesignerTrajectoryManager::import
bool import(DesignerTrajectoryPtr newDesignerTrajectory)
Overrides the current DesignerTrajectory with the given DesignerTrajectory.
Definition: DesignerTrajectoryManager.cpp:1078
armarx::DesignerTrajectoryManager::setTransitionUserDuration
void setTransitionUserDuration(unsigned int index, double duration)
Sets the desired duration of a Transition.
Definition: DesignerTrajectoryManager.cpp:1040
armarx::DesignerTrajectoryManager::addWaypoint
void addWaypoint(const PoseBasePtr pose)
Adds a UserWaypoint to the end of this manager's DesignerTrajectory.
Definition: DesignerTrajectoryManager.cpp:840
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::DesignerTrajectoryManager::deleteWaypoint
void deleteWaypoint(unsigned int index)
Deletes a UserWaypoint from this manager's DesignerTrajectory.
Definition: DesignerTrajectoryManager.cpp:960
armarx::DesignerTrajectoryManager::insertWaypoint
void insertWaypoint(unsigned int index, const PoseBasePtr pose)
Inserts a UserWaypoint at the given position to this manager's DesignerTrajectory.
Definition: DesignerTrajectoryManager.cpp:857
dt
constexpr T dt
Definition: UnscentedKalmanFilterTest.cpp:42
DesignerTrajectoryManager.h
armarx::DesignerTrajectoryManager::DesignerTrajectoryManager
DesignerTrajectoryManager(std::string rnsName, EnvironmentPtr environment_)
Constructor(s)
Definition: DesignerTrajectoryManager.cpp:798
armarx::DesignerTrajectoryManager::setTransitionInterpolation
void setTransitionInterpolation(unsigned int index, InterpolationType it)
Sets the InterpolationType of a Transition from this manager's DesignerTrajectory.
Definition: DesignerTrajectoryManager.cpp:1008