RMLInputParameters.h
Go to the documentation of this file.
1 // ---------------------- Doxygen info ----------------------
43 // ----------------------------------------------------------
44 // For a convenient reading of this file's source code,
45 // please use a tab width of four characters.
46 // ----------------------------------------------------------
47 
48 
49 #ifndef __RMLInputParameters__
50 #define __RMLInputParameters__
51 
52 
53 #include "RMLVector.h"
54 #include <string.h>
55 #include <stdio.h>
56 
57 
58 // ---------------------- Doxygen info ----------------------
77 // ----------------------------------------------------------
79 {
80 
81 protected:
82 
83 // ---------------------- Doxygen info ----------------------
103 // ----------------------------------------------------------
104  RMLInputParameters(const unsigned int DegreesOfFreedom)
105  {
106  this->NumberOfDOFs = DegreesOfFreedom ;
107  this->MinimumSynchronizationTime = 0.0 ;
108  this->SelectionVector = new RMLBoolVector (DegreesOfFreedom) ;
109  this->CurrentPositionVector = new RMLDoubleVector (DegreesOfFreedom) ;
110  this->CurrentVelocityVector = new RMLDoubleVector (DegreesOfFreedom) ;
111  this->CurrentAccelerationVector = new RMLDoubleVector (DegreesOfFreedom) ;
112  this->MaxAccelerationVector = new RMLDoubleVector (DegreesOfFreedom) ;
113  this->MaxJerkVector = new RMLDoubleVector (DegreesOfFreedom) ;
114  this->TargetVelocityVector = new RMLDoubleVector (DegreesOfFreedom) ;
115 
116  memset(this->SelectionVector->VecData , 0x0 , DegreesOfFreedom * sizeof(bool)) ;
117  memset(this->CurrentPositionVector->VecData , 0x0 , DegreesOfFreedom * sizeof(double)) ;
118  memset(this->CurrentVelocityVector->VecData , 0x0 , DegreesOfFreedom * sizeof(double)) ;
119  memset(this->CurrentAccelerationVector->VecData , 0x0 , DegreesOfFreedom * sizeof(double)) ;
120  memset(this->MaxAccelerationVector->VecData , 0x0 , DegreesOfFreedom * sizeof(double)) ;
121  memset(this->MaxJerkVector->VecData , 0x0 , DegreesOfFreedom * sizeof(double)) ;
122  memset(this->TargetVelocityVector->VecData , 0x0 , DegreesOfFreedom * sizeof(double)) ;
123  }
124 
125 public:
126 
127 // ---------------------- Doxygen info ----------------------
139 // ----------------------------------------------------------
141  {
142  this->NumberOfDOFs = IP.GetNumberOfDOFs() ;
143  this->SelectionVector = new RMLBoolVector ((IP.CurrentPositionVector)->GetVecDim()) ;
144  this->CurrentPositionVector = new RMLDoubleVector ((IP.CurrentPositionVector)->GetVecDim()) ;
145  this->CurrentVelocityVector = new RMLDoubleVector ((IP.CurrentPositionVector)->GetVecDim()) ;
146  this->CurrentAccelerationVector = new RMLDoubleVector ((IP.CurrentPositionVector)->GetVecDim()) ;
147  this->MaxAccelerationVector = new RMLDoubleVector ((IP.CurrentPositionVector)->GetVecDim()) ;
148  this->MaxJerkVector = new RMLDoubleVector ((IP.CurrentPositionVector)->GetVecDim()) ;
149  this->TargetVelocityVector = new RMLDoubleVector ((IP.CurrentPositionVector)->GetVecDim()) ;
150 
151  *this = IP ;
152  }
153 
154 
155 // ---------------------- Doxygen info ----------------------
160 // ----------------------------------------------------------
162  {
163  delete this->SelectionVector ;
164  delete this->CurrentPositionVector ;
165  delete this->CurrentVelocityVector ;
166  delete this->CurrentAccelerationVector ;
167  delete this->MaxAccelerationVector ;
168  delete this->MaxJerkVector ;
169  delete this->TargetVelocityVector ;
170 
171  this->SelectionVector = NULL ;
172  this->CurrentPositionVector = NULL ;
173  this->CurrentVelocityVector = NULL ;
174  this->CurrentAccelerationVector = NULL ;
175  this->MaxAccelerationVector = NULL ;
176  this->MaxJerkVector = NULL ;
177  this->TargetVelocityVector = NULL ;
178  this->NumberOfDOFs = 0 ;
179  }
180 
181 
182 // ---------------------- Doxygen info ----------------------
190 // ----------------------------------------------------------
192  {
193  this->NumberOfDOFs = IP.NumberOfDOFs ;
195  *(this->SelectionVector ) = *(IP.SelectionVector );
196  *(this->CurrentPositionVector ) = *(IP.CurrentPositionVector );
197  *(this->CurrentVelocityVector ) = *(IP.CurrentVelocityVector );
199  *(this->MaxAccelerationVector ) = *(IP.MaxAccelerationVector );
200  *(this->MaxJerkVector ) = *(IP.MaxJerkVector );
201  *(this->TargetVelocityVector ) = *(IP.TargetVelocityVector );
202 
203  return(*this);
204  }
205 
206 
207 // #############################################################################
208 
209 
210 // ---------------------- Doxygen info ----------------------
224 // ----------------------------------------------------------
225  inline void SetSelectionVector(const RMLBoolVector &InputVector)
226  {
227  *(this->SelectionVector) = InputVector;
228  }
229 
230 
231 // ---------------------- Doxygen info ----------------------
245 // ----------------------------------------------------------
246  inline void SetSelectionVector(const bool *InputVector)
247  {
248  memcpy( (void*)this->SelectionVector->VecData
249  , (void*)InputVector
250  , (this->SelectionVector->GetVecDim() * sizeof(bool)) );
251  }
252 
253 
254 // ---------------------- Doxygen info ----------------------
270 // ----------------------------------------------------------
271  inline void SetSelectionVectorElement( const bool &InputValue
272  , const unsigned int &Index)
273  {
274  (*this->SelectionVector)[Index] = InputValue;
275  }
276 
277 
278 // ---------------------- Doxygen info ----------------------
293 // ----------------------------------------------------------
294  inline void GetSelectionVector(RMLBoolVector *InputVector) const
295  {
296  *InputVector = *(this->SelectionVector);
297  }
298 
299 
300 // ---------------------- Doxygen info ----------------------
323 // ----------------------------------------------------------
324  inline void GetSelectionVector( bool *InputVector
325  , const unsigned int &SizeInBytes) const
326  {
327  memcpy( (void*)InputVector
328  , (void*)this->SelectionVector->VecData
329  , SizeInBytes );
330  }
331 
332 
333 // ---------------------- Doxygen info ----------------------
354 // ----------------------------------------------------------
355  inline void GetSelectionVectorElement( bool *InputValue
356  , const unsigned int &Index) const
357  {
358  if ( ( Index + 1 ) > ((unsigned int) this->SelectionVector->GetVecDim() ) )
359  {
360  *InputValue = 0.0;
361  }
362  else
363  {
364  *InputValue = (*this->SelectionVector)[Index];
365  }
366  }
367 
368 
369 // ---------------------- Doxygen info ----------------------
384 // ----------------------------------------------------------
385  inline bool GetSelectionVectorElement(const unsigned int &Index) const
386  {
387  if ( ( Index + 1 ) > ((unsigned int) this->SelectionVector->GetVecDim() ) )
388  {
389  return(0.0);
390  }
391  else
392  {
393  return( (*this->SelectionVector)[Index] );
394  }
395  }
396 
397 
398 // #############################################################################
399 
400 
401 // ---------------------- Doxygen info ----------------------
415 // ----------------------------------------------------------
416  inline void SetCurrentPositionVector(const RMLDoubleVector &InputVector)
417  {
418  *(this->CurrentPositionVector) = InputVector;
419  }
420 
421 
422 // ---------------------- Doxygen info ----------------------
436 // ----------------------------------------------------------
437  inline void SetCurrentPositionVector(const double *InputVector)
438  {
439  memcpy( (void*)this->CurrentPositionVector->VecData
440  , (void*)InputVector
441  , (this->CurrentPositionVector->GetVecDim() * sizeof(double)) );
442  }
443 
444 
445 // ---------------------- Doxygen info ----------------------
461 // ----------------------------------------------------------
462  inline void SetCurrentPositionVectorElement( const double &InputValue
463  , const unsigned int &Index)
464  {
465  (*this->CurrentPositionVector)[Index] = InputValue;
466  }
467 
468 
469 // ---------------------- Doxygen info ----------------------
484 // ----------------------------------------------------------
485  inline void GetCurrentPositionVector(RMLDoubleVector *InputVector) const
486  {
487  *InputVector = *(this->CurrentPositionVector);
488  }
489 
490 
491 // ---------------------- Doxygen info ----------------------
514 // ----------------------------------------------------------
515  inline void GetCurrentPositionVector( double *InputVector
516  , const unsigned int &SizeInBytes) const
517  {
518  memcpy( (void*)InputVector
519  , (void*)this->CurrentPositionVector->VecData
520  , SizeInBytes );
521  }
522 
523 
524 // ---------------------- Doxygen info ----------------------
545 // ----------------------------------------------------------
546  inline void GetCurrentPositionVectorElement( double *InputValue
547  , const unsigned int &Index) const
548  {
549  if ( ( Index + 1 ) > ((unsigned int) this->CurrentPositionVector->GetVecDim() ) )
550  {
551  *InputValue = 0.0;
552  }
553  else
554  {
555  *InputValue = (*this->CurrentPositionVector)[Index];
556  }
557  }
558 
559 
560 // ---------------------- Doxygen info ----------------------
575 // ----------------------------------------------------------
576  inline double GetCurrentPositionVectorElement(const unsigned int &Index) const
577  {
578  if ( ( Index + 1 ) > ((unsigned int) this->CurrentPositionVector->GetVecDim() ) )
579  {
580  return(0.0);
581  }
582  else
583  {
584  return( (*this->CurrentPositionVector)[Index] );
585  }
586  }
587 
588 
589 // #############################################################################
590 
591 
592 // ---------------------- Doxygen info ----------------------
606 // ----------------------------------------------------------
607  inline void SetCurrentVelocityVector(const RMLDoubleVector &InputVector)
608  {
609  *(this->CurrentVelocityVector) = InputVector;
610  }
611 
612 
613 // ---------------------- Doxygen info ----------------------
627 // ----------------------------------------------------------
628  inline void SetCurrentVelocityVector(const double *InputVector)
629  {
630  memcpy( (void*)this->CurrentVelocityVector->VecData
631  , (void*)InputVector
632  , (this->CurrentVelocityVector->GetVecDim() * sizeof(double)) );
633  }
634 
635 
636 // ---------------------- Doxygen info ----------------------
652 // ----------------------------------------------------------
653  inline void SetCurrentVelocityVectorElement( const double &InputValue
654  , const unsigned int &Index)
655  {
656  (*this->CurrentVelocityVector)[Index] = InputValue;
657  }
658 
659 
660 // ---------------------- Doxygen info ----------------------
675 // ----------------------------------------------------------
676  inline void GetCurrentVelocityVector(RMLDoubleVector *InputVector) const
677  {
678  *InputVector = *(this->CurrentVelocityVector);
679  }
680 
681 
682 // ---------------------- Doxygen info ----------------------
705 // ----------------------------------------------------------
706  inline void GetCurrentVelocityVector( double *InputVector
707  , const unsigned int &SizeInBytes) const
708  {
709  memcpy( (void*)InputVector
710  , (void*)this->CurrentVelocityVector->VecData
711  , SizeInBytes );
712  }
713 
714 
715 // ---------------------- Doxygen info ----------------------
736 // ----------------------------------------------------------
737  inline void GetCurrentVelocityVectorElement( double *InputValue
738  , const unsigned int &Index) const
739  {
740  if ( ( Index + 1 ) > ((unsigned int) this->CurrentVelocityVector->GetVecDim() ) )
741  {
742  *InputValue = 0.0;
743  }
744  else
745  {
746  *InputValue = (*this->CurrentVelocityVector)[Index];
747  }
748  }
749 
750 
751 // ---------------------- Doxygen info ----------------------
766 // ----------------------------------------------------------
767  inline double GetCurrentVelocityVectorElement(const unsigned int &Index) const
768  {
769  if ( ( Index + 1 ) > ((unsigned int) this->CurrentVelocityVector->GetVecDim() ) )
770  {
771  return(0.0);
772  }
773  else
774  {
775  return( (*this->CurrentVelocityVector)[Index] );
776  }
777  }
778 
779 
780 // #############################################################################
781 
782 
783 // ---------------------- Doxygen info ----------------------
797 // ----------------------------------------------------------
798  inline void SetCurrentAccelerationVector(const RMLDoubleVector &InputVector)
799  {
800  *(this->CurrentAccelerationVector) = InputVector;
801  }
802 
803 
804 // ---------------------- Doxygen info ----------------------
818 // ----------------------------------------------------------
819  inline void SetCurrentAccelerationVector(const double *InputVector)
820  {
821  memcpy( (void*)this->CurrentAccelerationVector->VecData
822  , (void*)InputVector
823  , (this->CurrentAccelerationVector->GetVecDim() * sizeof(double)) );
824  }
825 
826 
827 // ---------------------- Doxygen info ----------------------
843 // ----------------------------------------------------------
844  inline void SetCurrentAccelerationVectorElement( const double &InputValue
845  , const unsigned int &Index)
846  {
847  (*this->CurrentAccelerationVector)[Index] = InputValue;
848  }
849 
850 
851 // ---------------------- Doxygen info ----------------------
866 // ----------------------------------------------------------
867  inline void GetCurrentAccelerationVector(RMLDoubleVector *InputVector) const
868  {
869  *InputVector = *(this->CurrentAccelerationVector);
870  }
871 
872 
873 
874 // ---------------------- Doxygen info ----------------------
897 // ----------------------------------------------------------
898  inline void GetCurrentAccelerationVector( double *InputVector
899  , const unsigned int &SizeInBytes) const
900  {
901  memcpy( (void*)InputVector
902  , (void*)this->CurrentAccelerationVector->VecData
903  , SizeInBytes );
904  }
905 
906 
907 // ---------------------- Doxygen info ----------------------
928 // ----------------------------------------------------------
929  inline void GetCurrentAccelerationVectorElement( double *InputValue
930  , const unsigned int &Index) const
931  {
932  if ( ( Index + 1 ) > ((unsigned int) this->CurrentAccelerationVector->GetVecDim() ) )
933  {
934  *InputValue = 0.0;
935  }
936  else
937  {
938  *InputValue = (*this->CurrentAccelerationVector)[Index];
939  }
940  }
941 
942 
943 // ---------------------- Doxygen info ----------------------
958 // ----------------------------------------------------------
959  inline double GetCurrentAccelerationVectorElement(const unsigned int &Index) const
960  {
961  if ( ( Index + 1 ) > ((unsigned int) this->CurrentAccelerationVector->GetVecDim() ) )
962  {
963  return(0.0);
964  }
965  else
966  {
967  return( (*this->CurrentAccelerationVector)[Index] );
968  }
969  }
970 
971 
972 // #############################################################################
973 
974 
975 // ---------------------- Doxygen info ----------------------
989 // ----------------------------------------------------------
990  inline void SetMaxAccelerationVector(const RMLDoubleVector &InputVector)
991  {
992  *(this->MaxAccelerationVector) = InputVector;
993  }
994 
995 
996 // ---------------------- Doxygen info ----------------------
1010 // ----------------------------------------------------------
1011  inline void SetMaxAccelerationVector(const double *InputVector)
1012  {
1013  memcpy( (void*)this->MaxAccelerationVector->VecData
1014  , (void*)InputVector
1015  , (this->MaxAccelerationVector->GetVecDim() * sizeof(double)) );
1016  }
1017 
1018 
1019 // ---------------------- Doxygen info ----------------------
1035 // ----------------------------------------------------------
1036  inline void SetMaxAccelerationVectorElement( const double &InputValue
1037  , const unsigned int &Index)
1038  {
1039  (*this->MaxAccelerationVector)[Index] = InputValue;
1040  }
1041 
1042 
1043 // ---------------------- Doxygen info ----------------------
1058 // ----------------------------------------------------------
1059  inline void GetMaxAccelerationVector(RMLDoubleVector *InputVector) const
1060  {
1061  *InputVector = *(this->MaxAccelerationVector);
1062  }
1063 
1064 
1065 // ---------------------- Doxygen info ----------------------
1088 // ----------------------------------------------------------
1089  inline void GetMaxAccelerationVector( double *InputVector
1090  , const unsigned int &SizeInBytes) const
1091  {
1092  memcpy( (void*)InputVector
1093  , (void*)this->MaxAccelerationVector->VecData
1094  , SizeInBytes );
1095  }
1096 
1097 
1098 // ---------------------- Doxygen info ----------------------
1119 // ----------------------------------------------------------
1120  inline void GetMaxAccelerationVectorElement( double *InputValue
1121  , const unsigned int &Index) const
1122  {
1123  if ( ( Index + 1 ) > ((unsigned int) this->MaxAccelerationVector->GetVecDim() ) )
1124  {
1125  *InputValue = 0.0;
1126  }
1127  else
1128  {
1129  *InputValue = (*this->MaxAccelerationVector)[Index];
1130  }
1131  }
1132 
1133 
1134 // ---------------------- Doxygen info ----------------------
1149 // ----------------------------------------------------------
1150  inline double GetMaxAccelerationVectorElement(const unsigned int &Index) const
1151  {
1152  if ( ( Index + 1 ) > ((unsigned int) this->MaxAccelerationVector->GetVecDim() ) )
1153  {
1154  return(0.0);
1155  }
1156  else
1157  {
1158  return( (*this->MaxAccelerationVector)[Index] );
1159  }
1160  }
1161 
1162 
1163 // #############################################################################
1164 
1165 
1166 // ---------------------- Doxygen info ----------------------
1180 // ----------------------------------------------------------
1181  inline void SetMaxJerkVector(const RMLDoubleVector &InputVector)
1182  {
1183  *(this->MaxJerkVector) = InputVector;
1184  }
1185 
1186 
1187 // ---------------------- Doxygen info ----------------------
1201 // ----------------------------------------------------------
1202  inline void SetMaxJerkVector(const double *InputVector)
1203  {
1204  memcpy( (void*)this->MaxJerkVector->VecData
1205  , (void*)InputVector
1206  , (this->MaxJerkVector->GetVecDim() * sizeof(double)) );
1207  }
1208 
1209 
1210 // ---------------------- Doxygen info ----------------------
1226 // ----------------------------------------------------------
1227  inline void SetMaxJerkVectorElement( const double &InputValue
1228  , const unsigned int &Index)
1229  {
1230  (*this->MaxJerkVector)[Index] = InputValue;
1231  }
1232 
1233 
1234 // ---------------------- Doxygen info ----------------------
1249 // ----------------------------------------------------------
1250  inline void GetMaxJerkVector(RMLDoubleVector *InputVector) const
1251  {
1252  *InputVector = *(this->MaxJerkVector);
1253  }
1254 
1255 
1256 // ---------------------- Doxygen info ----------------------
1279 // ----------------------------------------------------------
1280  inline void GetMaxJerkVector( double *InputVector
1281  , const unsigned int &SizeInBytes) const
1282  {
1283  memcpy( (void*)InputVector
1284  , (void*)this->MaxJerkVector->VecData
1285  , SizeInBytes );
1286  }
1287 
1288 
1289 // ---------------------- Doxygen info ----------------------
1310 // ----------------------------------------------------------
1311  inline void GetMaxJerkVectorElement( double *InputValue
1312  , const unsigned int &Index) const
1313  {
1314  if ( ( Index + 1 ) > ((unsigned int) this->MaxJerkVector->GetVecDim() ) )
1315  {
1316  *InputValue = 0.0;
1317  }
1318  else
1319  {
1320  *InputValue = (*this->MaxJerkVector)[Index];
1321  }
1322  }
1323 
1324 
1325 // ---------------------- Doxygen info ----------------------
1340 // ----------------------------------------------------------
1341  inline double GetMaxJerkVectorElement(const unsigned int &Index) const
1342  {
1343  if ( ( Index + 1 ) > ((unsigned int) this->MaxJerkVector->GetVecDim() ) )
1344  {
1345  return(0.0);
1346  }
1347  else
1348  {
1349  return( (*this->MaxJerkVector)[Index] );
1350  }
1351  }
1352 
1353 
1354 // #############################################################################
1355 
1356 
1357 // ---------------------- Doxygen info ----------------------
1371 // ----------------------------------------------------------
1372  inline void SetTargetVelocityVector(const RMLDoubleVector &InputVector)
1373  {
1374  *(this->TargetVelocityVector) = InputVector;
1375  }
1376 
1377 
1378 // ---------------------- Doxygen info ----------------------
1392 // ----------------------------------------------------------
1393  inline void SetTargetVelocityVector(const double *InputVector)
1394  {
1395  memcpy( (void*)this->TargetVelocityVector->VecData
1396  , (void*)InputVector
1397  , (this->TargetVelocityVector->GetVecDim() * sizeof(double)) );
1398  }
1399 
1400 
1401 // ---------------------- Doxygen info ----------------------
1417 // ----------------------------------------------------------
1418  inline void SetTargetVelocityVectorElement( const double &InputValue
1419  , const unsigned int &Index)
1420  {
1421  (*this->TargetVelocityVector)[Index] = InputValue;
1422  }
1423 
1424 
1425 // ---------------------- Doxygen info ----------------------
1440 // ----------------------------------------------------------
1441  inline void GetTargetVelocityVector(RMLDoubleVector *InputVector) const
1442  {
1443  *InputVector = *(this->TargetVelocityVector);
1444  }
1445 
1446 
1447 // ---------------------- Doxygen info ----------------------
1470 // ----------------------------------------------------------
1471  inline void GetTargetVelocityVector( double *InputVector
1472  , const unsigned int &SizeInBytes) const
1473  {
1474  memcpy( (void*)InputVector
1475  , (void*)this->TargetVelocityVector->VecData
1476  , SizeInBytes );
1477  }
1478 
1479 
1480 // ---------------------- Doxygen info ----------------------
1501 // ----------------------------------------------------------
1502  inline void GetTargetVelocityVectorElement( double *InputValue
1503  , const unsigned int &Index) const
1504  {
1505  if ( ( Index + 1 ) > ((unsigned int) this->TargetVelocityVector->GetVecDim() ) )
1506  {
1507  *InputValue = 0.0;
1508  }
1509  else
1510  {
1511  *InputValue = (*this->TargetVelocityVector)[Index];
1512  }
1513  }
1514 
1515 
1516 // ---------------------- Doxygen info ----------------------
1531 // ----------------------------------------------------------
1532  inline double GetTargetVelocityVectorElement(const unsigned int &Index) const
1533  {
1534  if ( ( Index + 1 ) > ((unsigned int) this->TargetVelocityVector->GetVecDim() ) )
1535  {
1536  return(0.0);
1537  }
1538  else
1539  {
1540  return( (*this->TargetVelocityVector)[Index] );
1541  }
1542  }
1543 
1544 
1545 // ---------------------- Doxygen info ----------------------
1553 // ----------------------------------------------------------
1554  inline unsigned int GetNumberOfDOFs(void) const
1555  {
1556  return(this->NumberOfDOFs);
1557  }
1558 
1559 
1560 // ---------------------- Doxygen info ----------------------
1570 // ----------------------------------------------------------
1571  inline double GetMinimumSynchronizationTime(void) const
1572  {
1573  return(this->MinimumSynchronizationTime);
1574  }
1575 
1576 
1577 // ---------------------- Doxygen info ----------------------
1584 // ----------------------------------------------------------
1585  inline void SetMinimumSynchronizationTime(double Time)
1586  {
1587  this->MinimumSynchronizationTime = Time;
1588  return;
1589  }
1590 
1591 
1592 protected:
1593 
1594 
1595 // ---------------------- Doxygen info ----------------------
1606 // ----------------------------------------------------------
1607  void Echo(FILE* FileHandler = stdout) const
1608  {
1609  unsigned int i = 0;
1610 
1611  if (FileHandler == NULL)
1612  {
1613  return;
1614  }
1615 
1616  fprintf(FileHandler, "Selection vector : ");
1617  for (i = 0; i < this->NumberOfDOFs; i++)
1618  {
1619  fprintf(FileHandler, " %s ", (this->SelectionVector->VecData[i])?("true"):("false"));
1620  }
1621  fprintf(FileHandler, "\nCurrent position vector : ");
1622  for (i = 0; i < this->NumberOfDOFs; i++)
1623  {
1624  fprintf(FileHandler, " %.20le ", this->CurrentPositionVector->VecData[i]);
1625  }
1626  fprintf(FileHandler, "\nCurrent velocity vector : ");
1627  for (i = 0; i < this->NumberOfDOFs; i++)
1628  {
1629  fprintf(FileHandler, " %.20le ", this->CurrentVelocityVector->VecData[i]);
1630  }
1631  fprintf(FileHandler, "\nCurrent acceleration vector: ");
1632  for (i = 0; i < this->NumberOfDOFs; i++)
1633  {
1634  fprintf(FileHandler, " %.20le ", this->CurrentAccelerationVector->VecData[i]);
1635  }
1636  fprintf(FileHandler, "\nTarget velocity vector : ");
1637  for (i = 0; i < this->NumberOfDOFs; i++)
1638  {
1639  fprintf(FileHandler, " %.20le ", this->TargetVelocityVector->VecData[i]);
1640  }
1641  fprintf(FileHandler, "\nMax. acceleration vector : ");
1642  for (i = 0; i < this->NumberOfDOFs; i++)
1643  {
1644  fprintf(FileHandler, " %.20le ", this->MaxAccelerationVector->VecData[i]);
1645  }
1646  fprintf(FileHandler, "\nMax. jerk vector : ");
1647  for (i = 0; i < this->NumberOfDOFs; i++)
1648  {
1649  fprintf(FileHandler, " %.20le ", this->MaxJerkVector->VecData[i]);
1650  }
1651  fprintf(FileHandler, "\n");
1652  return;
1653  }
1654 
1655 public:
1656 
1657 // ---------------------- Doxygen info ----------------------
1664 // ----------------------------------------------------------
1665  unsigned int NumberOfDOFs;
1666 
1667 
1668 // ---------------------- Doxygen info ----------------------
1713 // ----------------------------------------------------------
1715 
1716 
1717 // ---------------------- Doxygen info ----------------------
1732 // ----------------------------------------------------------
1734 
1735 
1736 // ---------------------- Doxygen info ----------------------
1751 // ----------------------------------------------------------
1753 
1754 
1755 // ---------------------- Doxygen info ----------------------
1770 // ----------------------------------------------------------
1772 
1773 
1774 // ---------------------- Doxygen info ----------------------
1789 // ----------------------------------------------------------
1791 
1792 
1793 // ---------------------- Doxygen info ----------------------
1808 // ----------------------------------------------------------
1810 
1811 
1812 // ---------------------- Doxygen info ----------------------
1827 // ----------------------------------------------------------
1829 
1830 
1831 // ---------------------- Doxygen info ----------------------
1846 // ----------------------------------------------------------
1848 
1849 
1850 };// class RMLInputParameters
1851 
1852 
1853 
1854 #endif
Header file for the dynamic vector class used for the Reflexxes Motion Libraries. ...
RMLVector< double > RMLDoubleVector
Type definition for vectors of double elements.
Definition: RMLVector.h:548
void SetCurrentPositionVector(const double *InputVector)
Sets the current selection vector by using a native C double array.
void SetMinimumSynchronizationTime(double Time)
Sets the optional parameter for the desired execution time.
void SetSelectionVectorElement(const bool &InputValue, const unsigned int &Index)
Sets one element of the current selection vector .
void SetSelectionVector(const bool *InputVector)
Sets the current selection vector by using a native C++ bool array.
RMLDoubleVector * CurrentVelocityVector
A pointer to the current velocity vector .
unsigned int NumberOfDOFs
The number of degrees of freedom .
void GetTargetVelocityVectorElement(double *InputValue, const unsigned int &Index) const
Copies one element of the target velocity vector to the memory pointed to by InputValue.
void GetSelectionVector(RMLBoolVector *InputVector) const
Copies the contents of the RMLBoolVector object containing the current position vector to the RMLBoo...
void SetMaxJerkVectorElement(const double &InputValue, const unsigned int &Index)
Sets one element of the maximum jerk vector .
RMLDoubleVector * MaxAccelerationVector
A pointer to the maximum acceleration vector .
void GetCurrentVelocityVectorElement(double *InputValue, const unsigned int &Index) const
Copies one element of the current velocity vector to the memory pointed to by InputValue.
void SetMaxJerkVector(const double *InputVector)
Sets the maximum jerk vector by using a native C double array.
T * VecData
Pointer to the actual vector data, that is, an array of type T objects.
Definition: RMLVector.h:524
RMLInputParameters(const RMLInputParameters &IP)
Copy constructor of class RMLInputParameters.
void SetCurrentVelocityVector(const double *InputVector)
Sets the current velocity vector by using a native C double array.
void SetMaxAccelerationVector(const RMLDoubleVector &InputVector)
Sets the maximum acceleration vector by using the an RMLDoubleVector object.
RMLInputParameters(const unsigned int DegreesOfFreedom)
Constructor of class RMLInputParameters.
void SetMaxAccelerationVectorElement(const double &InputValue, const unsigned int &Index)
Sets one element of the maximum acceleration vector .
double MinimumSynchronizationTime
Minimum trajectory execution time in seconds specified by the user (optional input parameter) ...
void Echo(FILE *FileHandler=stdout) const
Prints the complete set of input parameters to *FileHandler.
void SetCurrentAccelerationVector(const RMLDoubleVector &InputVector)
Sets the current acceleration vector by using the an RMLDoubleVector object.
void GetCurrentPositionVectorElement(double *InputValue, const unsigned int &Index) const
Copies one element of the current selection vector to the memory pointed to by InputValue.
double GetCurrentAccelerationVectorElement(const unsigned int &Index) const
Returns one single element of the current acceleration vector .
void SetCurrentVelocityVectorElement(const double &InputValue, const unsigned int &Index)
Sets one element of the current velocity vector .
void GetTargetVelocityVector(double *InputVector, const unsigned int &SizeInBytes) const
Copies the array of double values representing the target velocity vector to the memory pointed to b...
unsigned int GetNumberOfDOFs(void) const
Returns the number of degrees of freedom.
double GetMaxJerkVectorElement(const unsigned int &Index) const
Returns one single element of the maximum jerk vector .
void GetCurrentPositionVector(RMLDoubleVector *InputVector) const
Copies the contents of the RMLDoubleVector object containing the current position vector to the RMLD...
double GetMinimumSynchronizationTime(void) const
Returns the optional parameter for the desired execution time.
void SetMaxAccelerationVector(const double *InputVector)
Sets the maximum acceleration vector by using a native C double array.
RMLBoolVector * SelectionVector
A pointer to the selection vector .
void SetSelectionVector(const RMLBoolVector &InputVector)
Sets the current selection vector by using the an RMLBoolVector object.
void GetMaxJerkVector(double *InputVector, const unsigned int &SizeInBytes) const
Copies the array of double values representing the maximum jerk vector to the memory pointed to by I...
void GetCurrentPositionVector(double *InputVector, const unsigned int &SizeInBytes) const
Copies the array of double values representing the current position vector to the memory pointed to ...
void GetMaxAccelerationVector(RMLDoubleVector *InputVector) const
Copies the contents of the RMLDoubleVector object containing the maximum acceleration vector to the ...
void GetCurrentVelocityVector(RMLDoubleVector *InputVector) const
Copies the contents of the RMLDoubleVector object containing the current velocity vector to the RMLD...
void SetCurrentPositionVectorElement(const double &InputValue, const unsigned int &Index)
Sets one element of the current selection vector .
void SetTargetVelocityVectorElement(const double &InputValue, const unsigned int &Index)
Sets one element of the target velocity vector .
void SetCurrentPositionVector(const RMLDoubleVector &InputVector)
Sets the current selection vector by using the an RMLDoubleVector object.
void SetCurrentAccelerationVector(const double *InputVector)
Sets the current acceleration vector by using a native C double array.
bool GetSelectionVectorElement(const unsigned int &Index) const
Returns one single element of the current selection vector .
void GetCurrentAccelerationVectorElement(double *InputValue, const unsigned int &Index) const
Copies one element of the current acceleration vector to the memory pointed to by InputValue...
double GetCurrentPositionVectorElement(const unsigned int &Index) const
Returns one single element of the current selection vector .
double GetTargetVelocityVectorElement(const unsigned int &Index) const
Returns one single element of the target velocity vector .
RMLDoubleVector * TargetVelocityVector
A pointer to the target velocity vector .
RMLDoubleVector * MaxJerkVector
A pointer to the maximum jerk vector .
~RMLInputParameters(void)
Destructor of class RMLInputParameters.
double GetMaxAccelerationVectorElement(const unsigned int &Index) const
Returns one single element of the maximum acceleration vector .
void GetCurrentAccelerationVector(RMLDoubleVector *InputVector) const
Copies the contents of the RMLDoubleVector object containing the current acceleration vector to the ...
void GetMaxJerkVectorElement(double *InputValue, const unsigned int &Index) const
Copies one element of the maximum jerk vector to the memory pointed to by InputValue.
void SetTargetVelocityVector(const double *InputVector)
Sets the target velocity vector by using a native C double array.
void SetTargetVelocityVector(const RMLDoubleVector &InputVector)
Sets the target velocity vector by using the an RMLDoubleVector object.
void SetMaxJerkVector(const RMLDoubleVector &InputVector)
Sets the maximum jerk vector by using the an RMLDoubleVector object.
void GetSelectionVector(bool *InputVector, const unsigned int &SizeInBytes) const
Copies the array of bool values representing the current position vector to the memory pointed to by...
void GetSelectionVectorElement(bool *InputValue, const unsigned int &Index) const
Copies one element of the current selection vector to the memory pointed to by InputValue.
RMLDoubleVector * CurrentAccelerationVector
A pointer to the current acceleration vector .
RMLInputParameters & operator=(const RMLInputParameters &IP)
Copy operator.
void SetCurrentVelocityVector(const RMLDoubleVector &InputVector)
Sets the current velocity vector by using the an RMLDoubleVector object.
void GetCurrentVelocityVector(double *InputVector, const unsigned int &SizeInBytes) const
Copies the array of double values representing the current velocity vector to the memory pointed to ...
Class for the input parameters of the On-Line Trajectory Generation algorithm.
RMLDoubleVector * CurrentPositionVector
A pointer to the current position vector .
RMLVector< bool > RMLBoolVector
Type definition for vectors of bool elements.
Definition: RMLVector.h:570
unsigned int GetVecDim(void) const
Returns the dimension of the vector.
Definition: RMLVector.h:497
void GetTargetVelocityVector(RMLDoubleVector *InputVector) const
Copies the contents of the RMLDoubleVector object containing the target velocity vector to the RMLDo...
This is a minimalistic dynamic vector class implementation used for the Reflexxes Motion Libraries...
Definition: RMLVector.h:77
double GetCurrentVelocityVectorElement(const unsigned int &Index) const
Returns one single element of the current velocity vector .
void GetCurrentAccelerationVector(double *InputVector, const unsigned int &SizeInBytes) const
Copies the array of double values representing the current acceleration vector to the memory pointed...
void GetMaxAccelerationVectorElement(double *InputValue, const unsigned int &Index) const
Copies one element of the maximum acceleration vector to the memory pointed to by InputValue...
void GetMaxAccelerationVector(double *InputVector, const unsigned int &SizeInBytes) const
Copies the array of double values representing the maximum acceleration vector to the memory pointed...
void GetMaxJerkVector(RMLDoubleVector *InputVector) const
Copies the contents of the RMLDoubleVector object containing the maximum jerk vector to the RMLDoubl...
void SetCurrentAccelerationVectorElement(const double &InputValue, const unsigned int &Index)
Sets one element of the current acceleration vector .


libreflexxestype2
Author(s):
autogenerated on Sat Nov 21 2020 03:17:34