Laelaps  2.3.5
RoadNarrows Robotics Small Outdoor Mobile Robot Project
laeTraj.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // Package: Laelaps
4 //
5 // Library: liblaelaps
6 //
7 // File: laeTraj.h
8 //
9 /*! \file
10  *
11  * $LastChangedDate: 2016-02-18 13:42:54 -0700 (Thu, 18 Feb 2016) $
12  * $Rev: 4323 $
13  *
14  * \brief Trajectory classes interfaces.
15  *
16  * \author Robin Knight (robin.knight@roadnarrows.com)
17  *
18  * \par Copyright
19  * \h_copy 2015-2017. RoadNarrows LLC.\n
20  * http://www.roadnarrows.com\n
21  * All Rights Reserved
22  */
23 /*
24  * @EulaBegin@
25  *
26  * Unless otherwise stated explicitly, all materials contained are copyrighted
27  * and may not be used without RoadNarrows LLC's written consent,
28  * except as provided in these terms and conditions or in the copyright
29  * notice (documents and software) or other proprietary notice provided with
30  * the relevant materials.
31  *
32  * IN NO EVENT SHALL THE AUTHOR, ROADNARROWS LLC, OR ANY
33  * MEMBERS/EMPLOYEES/CONTRACTORS OF ROADNARROWS OR DISTRIBUTORS OF THIS SOFTWARE
34  * BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
35  * CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
36  * DOCUMENTATION, EVEN IF THE AUTHORS OR ANY OF THE ABOVE PARTIES HAVE BEEN
37  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38  *
39  * THE AUTHORS AND ROADNARROWS LLC SPECIFICALLY DISCLAIM ANY WARRANTIES,
40  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
41  * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
42  * "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO
43  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
44  *
45  * @EulaEnd@
46  */
47 ////////////////////////////////////////////////////////////////////////////////
48 
49 #ifndef _LAE_TRAJ_H
50 #define _LAE_TRAJ_H
51 
52 #include <sys/types.h>
53 #include <time.h>
54 
55 #include <string>
56 #include <vector>
57 #include <map>
58 
59 #include "rnr/rnrconfig.h"
60 
61 #include "Laelaps/laelaps.h"
62 #include "Laelaps/laeUtils.h"
63 
64 namespace laelaps
65 {
66  // ---------------------------------------------------------------------------
67  // Constants, Types, and Defines
68  // ---------------------------------------------------------------------------
69 
70  /*!
71  * \brief Start navigation immediately.
72  */
73  static const timespec_t StartImmediately = {0, 0};
74 
75  /*!
76  * \brief Trajectory feedback identifiers (and indices).
77  */
78  static const int TrajDesired = 0; ///< desired trajectory
79  static const int TrajActual = 1; ///< actual trajectory
80  static const int TrajError = 2; ///< errors in trajectory
81  static const int TrajNumOf = 3; ///< number of trajectories ids
82 
83 
84  // ---------------------------------------------------------------------------
85  // Class LaePoint
86  // ---------------------------------------------------------------------------
87 
88  /*!
89  * \brief Laelaps 2D point class.
90  *
91  * Point = (x, y)
92  */
93  class LaePoint
94  {
95  public:
96  double m_x; ///< x (meters)
97  double m_y; ///< y (meters)
98 
99  /*!
100  * \brief Default constructor.
101  */
103  {
104  clear();
105  }
106 
107  /*!
108  * \brief Initialization constructor.
109  *
110  * \param x x (meters).
111  * \param y y (meters).
112  */
113  LaePoint(double x, double y, double theta=0.0)
114  {
115  m_x = x;
116  m_y = y;
117  }
118 
119  /*!
120  * \brief Copy constructor.
121  *
122  * \param src Source object.
123  */
124  LaePoint(const LaePoint &src)
125  {
126  m_x = src.m_x;
127  m_y = src.m_y;
128  }
129 
130  /*!
131  * \brief Destructor.
132  */
133  virtual ~LaePoint()
134  {
135  }
136 
137  /*!
138  * \brief Assignment operator.
139  *
140  * \param rhs Right hand side object.
141  *
142  * \return Returns copy of this.
143  */
145  {
146  m_x = rhs.m_x;
147  m_y = rhs.m_y;
148 
149  return *this;
150  }
151 
152  void clear()
153  {
154  m_x = 0.0;
155  m_y = 0.0;
156  }
157 
158  }; // class LaePoint
159 
160 
161  // ---------------------------------------------------------------------------
162  // Class LaePose
163  // ---------------------------------------------------------------------------
164 
165  /*!
166  * \brief Laelaps 2D pose class.
167  *
168  * Pose = (x, y, theta)
169  */
170  class LaePose
171  {
172  public:
173  double m_x; ///< robot absolute x position (meters)
174  double m_y; ///< robot absolute y position (meters)
175  double m_theta; ///< robot orientation (radians)
176 
177  /*!
178  * \brief Default constructor.
179  */
181  {
182  clear();
183  }
184 
185  /*!
186  * \brief Initialization constructor.
187  *
188  * \param x Robot absolute x position (meters).
189  * \param y Robot absolute y position (meters).
190  * \param theta Robot orientation (radians).
191  */
192  LaePose(double x, double y, double theta=0.0)
193  {
194  m_x = x;
195  m_y = y;
196  m_theta = theta;
197  }
198 
199  /*!
200  * \brief Copy constructor.
201  *
202  * \param src Source object.
203  */
204  LaePose(const LaePose &src)
205  {
206  m_x = src.m_x;
207  m_y = src.m_y;
208  m_theta = src.m_theta;
209  }
210 
211  /*!
212  * \brief Destructor.
213  */
214  virtual ~LaePose()
215  {
216  }
217 
218  /*!
219  * \brief Assignment operator.
220  *
221  * \param rhs Right hand side object.
222  *
223  * \return Returns copy of this.
224  */
226  {
227  m_x = rhs.m_x;
228  m_y = rhs.m_y;
229  m_theta = rhs.m_theta;
230 
231  return *this;
232  }
233 
234  void clear()
235  {
236  m_x = 0.0;
237  m_y = 0.0;
238  m_theta = 0.0;
239  }
240 
241  }; // class LaePose
242 
243 
244  // ---------------------------------------------------------------------------
245  // Velocity trajectory types.
246  // ---------------------------------------------------------------------------
247 
248  /*!
249  * \brief Velocity trajectory type.
250  *
251  * The robot is controlled by seting the goal velocities of a [sub]set of
252  * powertrain motors.
253  *
254  * \li key Name of powertrain. One of: left_front, right_front,
255  * left_rear, right_rear.
256  * \li value Wheel angular velocity (radians/second).
257  */
258  typedef std::map<std::string, double> LaeMapVelocity;
259 
260  /*!
261  * \brief Duty cycle trajectory type.
262  *
263  * The robot is controlled by seting the goal motor duty cycles.
264  *
265  * \li key Name of powertrain. One of: left_front, right_front,
266  * left_rear, right_rear.
267  * \li value Normalized duty cycle [-1.0, 1.0].
268  */
269  typedef std::map<std::string, double> LaeMapDutyCycle;
270 
271 
272  // ---------------------------------------------------------------------------
273  // Class LaeSimpleWaypoint
274  // ---------------------------------------------------------------------------
275 
276  /*!
277  * \brief Robot simple path waypoint.
278  *
279  * A simple waypoint specifies the goal x,y distance from the robot's current
280  * position, along with a target velocity with acceleration at the
281  * destination. The waypoint is used in path navigation.
282  */
284  {
285  public:
286  /*!
287  * \brief Default constructor.
288  */
290  {
291  m_fVelocity = 0.0;
292  m_fAcceleration = 0.0;
293  }
294 
295  /*!
296  * \brief Initialization constructor.
297  *
298  * \param ptDist Robot goal distance (meters, meters).
299  * \param fVelocity Robot target velocity at waypoint (meters/second).
300  * \param fAcceleration Robot target acceleration (meters/second^2).
301  */
303  const double fVelocity,
304  const double fAcceleration)
305  {
306  m_ptDist = ptDist;
307  m_fVelocity = fVelocity;
308  m_fAcceleration = fAcceleration;
309  }
310 
311  /*!
312  * \brief Copy constructor.
313  *
314  * \param src Source object.
315  */
317  {
318  m_ptDist = src.m_ptDist;
319  m_fVelocity = src.m_fVelocity;
320  m_fAcceleration = src.m_fAcceleration;
321  }
322 
323  /*!
324  * \brief Destructor.
325  */
327  {
328  }
329 
330  /*!
331  * \brief Assignment operator.
332  *
333  * \param rhs Right hand side object.
334  *
335  * \return Returns copy of this.
336  */
338  {
339  m_ptDist = rhs.m_ptDist;
340  m_fVelocity = rhs.m_fVelocity;
341  m_fAcceleration = rhs.m_fAcceleration;
342 
343  return *this;
344  }
345 
346  /*!
347  * \brief Get the waypoint data.
348  *
349  * \param [out] ptDist Robot goal distance (meters, meters).
350  * \param [out] fVelocity Robot target velocity (meters/second).
351  * \param [out] fAcceleration Robot target acceleration (meters/second^2).
352  */
353  void get(LaePoint &ptDist,
354  double &fVelocity,
355  double &fAcceleration)
356  {
357  ptDist = m_ptDist;
358  fVelocity = m_fVelocity;
359  fAcceleration = m_fAcceleration;
360  }
361 
362  protected:
363  LaePoint m_ptDist; ///< robot goal x,y distance (meters, meters)
364  double m_fVelocity; ///< robot target velocity (meters/second)
365  double m_fAcceleration; ///< robot target acceleration (meters/s^2)
366  }; // class LaeSimpleWaypoint
367 
368 
369  // ---------------------------------------------------------------------------
370  // Class LaeSimplePath
371  // ---------------------------------------------------------------------------
372 
373  /*!
374  * \brief Robot simple path class.
375  *
376  * A simple path defines a set of waypoints from the robot's current position
377  * to the endpoint. Each waypoint defines a x,y distance, plus target velocity
378  * and acceleration.
379  *
380  * A sequence of waypoints points Wp_i, i=0,n define a path.
381  */
383  {
384  public:
385  /*!
386  * \brief Default constructor.
387  */
389  {
390  m_timeStart = StartImmediately;
391  }
392 
393  /*!
394  * \brief Copy constructor.
395  */
397  {
398  m_timeStart = src.m_timeStart;
399  m_path = src.m_path;
400  }
401 
402  /*!
403  * \brief Destructor.
404  */
406  {
407  }
408 
409  /*!
410  * \brief Assignment operator.
411  *
412  * \param rhs Right hand side object.
413  *
414  * \return Returns copy of this.
415  */
417  {
418  m_timeStart = rhs.m_timeStart;
419  m_path = rhs.m_path;
420 
421  return *this;
422  }
423 
424  /*!
425  * \brief Get navigation start time.
426  *
427  * \return Start time. Time is in seconds,nanoseconds from last Epoch.
428  */
430  {
431  return m_timeStart;
432  }
433 
434  /*!
435  * \brief Set navigation start time.
436  *
437  * \param timeStart Time to start path navigation.
438  * Time is in seconds,nanoseconds from last Epoch.
439  */
440  void setStartTime(timespec_t &timeStart)
441  {
442  m_timeStart = timeStart;
443  }
444 
445  /*!
446  * \brief Get the number of wheel points in trajectory.
447  *
448  * \return Number of points.
449  */
450  size_t getNumPoints()
451  {
452  return m_path.size();
453  }
454 
455  /*!
456  * \brief Append wheel point to end of trajectory.
457  *
458  * \param ptDist Robot goal distance (meters, meters).
459  * \param fVelocity Robot goal velocity (meters/second).
460  * \param fAcceleration Robot goal acceleration (meters/second^2).
461  */
462  void append(LaePoint &ptDist,
463  double fVelocity,
464  double fAcceleration)
465  {
466  LaeSimpleWaypoint pt(ptDist, fVelocity, fAcceleration);
467  m_path.push_back(pt);
468  }
469 
470  /*!
471  * \brief Subscript operator to get reference to wheel point at the
472  * given index.
473  *
474  * Big boy warranty. No out of bound checks are made.
475  *
476  * \param i Index.
477  *
478  * \return Wheel point.
479  */
480  LaeSimpleWaypoint &operator[](const size_t i)
481  {
482  return m_path[i];
483  }
484 
485  /*!
486  * \brief Clear data.
487  */
488  void clear()
489  {
490  m_path.clear();
491  m_timeStart = StartImmediately;
492  }
493 
494  protected:
495  timespec_t m_timeStart; ///< start time
496  std::vector<LaeSimpleWaypoint> m_path; ///< path
497  }; // class LaeSimplePath
498 
499 
500  // ---------------------------------------------------------------------------
501  // Class LaeSimplePathFeedback
502  // ---------------------------------------------------------------------------
503 
504  /*!
505  * \brief Simple path feedback class.
506  *
507  * The feedback provides informaation about the last issued desired path
508  * and the current trajectory.
509  */
511  {
512  public:
513 
514  /*!
515  * \brief Default constructor.
516  */
518  {
519  }
520 
521  /*!
522  * \brief Copy constructor.
523  */
525 
526  /*!
527  * \brief Destructor.
528  */
530  {
531  }
532 
533  /*!
534  * \brief Assignment operator.
535  *
536  * \param rhs Right hand side object.
537  *
538  * \return Returns copy of this.
539  */
541 
542  /*!
543  * \brief Get the number of wheel points in trajectory.
544  *
545  * \return Number of points.
546  */
547  size_t getNumPoints()
548  {
549  return m_path[TrajDesired].getNumPoints();
550  }
551 
552  /*!
553  * \brief Subscript operator to get reference to given trajectory.
554  *
555  * \param i Trajectory point Index.
556  *
557  * \return Trajectory.
558  */
559  LaeSimplePath &operator[](const size_t i);
560 
561  /*!
562  * \brief Clear data.
563  */
564  void clear();
565 
566  protected:
567  LaeSimplePath m_path[TrajNumOf];
568  };
569 
570 
571  // ---------------------------------------------------------------------------
572  // Class LaeWaypoint
573  // ---------------------------------------------------------------------------
574 
575  /*!
576  * \brief Robot fully-defined waypoint.
577  *
578  * A waypoint specifies the goal pose (absolute x,y,theta position), plus
579  * the target velocity with the given acceleration at the destination.
580  * The waypoint is used in path navigation.
581  *
582  * Each waypoint has an associtated name identifier and start time.
583  */
585  {
586  public:
587  /*!
588  * \brief Default constructor.
589  */
590  LaeWaypoint();
591 
592  /*!
593  * \brief Initialization constructor.
594  *
595  * \param Pose Robot 2D pose (x,y,theta).
596  * \param fVelocity Robot target velocity at waypoint (meters/second).
597  * \param fAcceleration Robot target acceleration (meters/second^2).
598  * \param strName Name of waypoint.
599  * \param timeStart Start time to navigate to this waypoint.
600  */
601  LaeWaypoint(const LaePose &pose,
602  const double fVelocity,
603  const double fAcceleration,
604  const std::string &strName="",
605  const timespec_t &timeStart=StartImmediately);
606 
607  /*!
608  * \brief Copy constructor.
609  *
610  * \param src Source object.
611  */
612  LaeWaypoint(const LaeWaypoint &src);
613 
614  /*!
615  * \brief Destructor.
616  */
618  {
619  }
620 
621  /*!
622  * \brief Assignment operator.
623  *
624  * \param rhs Right hand side object.
625  *
626  * \return Returns copy of this.
627  */
628  LaeWaypoint operator=(const LaeWaypoint &rhs);
629 
630  /*!
631  * \brief Get waypoint data.
632  *
633  * \param [out] strName Waypoint name.
634  * \param [out] timeStart Waypoint navigation start time.
635  * \param [out] pose Robot 2D pose (x,y,theta).
636  * \param [out] fVelocity Target waypoint velocity (meters/second).
637  * \param [out] fAcceleration Target acceleration (meters/second^2).
638  */
639  void get(std::string &strName,
640  timespec_t &timeStart,
641  LaePose &pose,
642  double &fVelocity,
643  double &fAcceleration);
644 
645  /*!
646  * \brief Get waypoint navigation start time.
647  *
648  * \return Start time. Time is in seconds,nanoseconds from last Epoch.
649  */
651  {
652  return m_timeStart;
653  }
654 
655  /*!
656  * \brief Set waypoint navigation start time.
657  *
658  * \param timeStart Time to start execution.
659  * Time is in seconds,nanoseconds from last Epoch.
660  */
661  void setStartTime(timespec_t timeStart)
662  {
663  m_timeStart = timeStart;
664  }
665 
666  /*!
667  * \brief Clear (reset) waypoint data.
668  */
669  void clear();
670 
671  protected:
672  std::string m_strName; ///< waypoint name
673  timespec_t m_timeStart; ///< time to start navigation
674  LaePose m_pose; ///< robot pose at waypoint
675  double m_fVelocity; ///< target velocity at waypoint (meters/s)
676  double m_fAcceleration; ///< target acceleration (meters/s^2)
677  };
678 
679 
680  // ---------------------------------------------------------------------------
681  // Class LaePath
682  // ---------------------------------------------------------------------------
683 
684  /*!
685  * \brief Robot path class.
686  *
687  * A waypoint specifies the goal pose (absolute x,y,theta position), plus
688  * the target velocity with the given acceleration at the destination.
689  * The waypoint is used in path navigation.
690  *
691  * A sequence of waypoints points Wp_i, i=0,n define a path.
692  */
693  class LaePath
694  {
695  public:
696  /*!
697  * \brief Default constructor.
698  */
700  {
701  m_timeStart = StartImmediately;
702  }
703 
704  /*!
705  * \brief Copy constructor.
706  */
707  LaePath(const LaePath &src)
708  {
709  m_timeStart = src.m_timeStart;
710  m_path = src.m_path;
711  }
712 
713  /*!
714  * \brief Destructor.
715  */
717  {
718  }
719 
720  /*!
721  * \brief Assignment operator.
722  *
723  * \param rhs Right hand side object.
724  *
725  * \return Returns copy of this.
726  */
728  {
729  m_timeStart = rhs.m_timeStart;
730  m_path = rhs.m_path;
731 
732  return *this;
733  }
734 
735  /*!
736  * \brief Get navigation start time.
737  *
738  * \return Start time. Time is in seconds,nanoseconds from last Epoch.
739  */
741  {
742  return m_timeStart;
743  }
744 
745  /*!
746  * \brief Set navigation start time.
747  *
748  * \param timeStart Start time.
749  * Time is in seconds,nanoseconds from last Epoch.
750  */
751  void setStartTime(timespec_t timeStart)
752  {
753  m_timeStart = timeStart;
754  }
755 
756  /*!
757  * \brief Get the number of wheel points in trajectory.
758  *
759  * \return Number of points.
760  */
761  size_t getNumPoints()
762  {
763  return m_path.size();
764  }
765 
766  /*!
767  * \brief Append waypoint to end of path.
768  *
769  * \param Pose Robot 2D pose (x,y,theta).
770  * \param fVelocity Robot target velocity at waypoint (meters/second).
771  * \param fAcceleration Robot target acceleration (meters/second^2).
772  * \param strName Name of waypoint
773  * \param timeStart Start time to navigate to this waypoint.
774  */
775  void append(const LaePose &pose,
776  const double fVelocity,
777  const double fAcceleration,
778  const std::string &strName="",
779  const timespec_t &timeStart=StartImmediately);
780 
781  /*!
782  * \brief Subscript operator to get reference to wheel point at the
783  * given index.
784  *
785  * Big boy warranty. No out of bound checks are made.
786  *
787  * \param i Index.
788  *
789  * \return Wheel point.
790  */
791  LaeWaypoint &operator[](const size_t i)
792  {
793  return m_path[i];
794  }
795 
796  /*!
797  * \brief Clear data.
798  */
799  void clear()
800  {
801  m_path.clear();
802  m_timeStart = StartImmediately;
803  }
804 
805  protected:
806  timespec_t m_timeStart; ///< start time
807  std::vector<LaeWaypoint> m_path; ///< path
808  }; // class LaePath
809 
810 
811  // ---------------------------------------------------------------------------
812  // Class LaePathFeedback
813  // ---------------------------------------------------------------------------
814 
815  /*!
816  * \brief Simple path feedback class.
817  *
818  * The feedback provides informaation about the last issued desired path
819  * and the current trajectory.
820  */
822  {
823  public:
824 
825  /*!
826  * \brief Default constructor.
827  */
829  {
830  }
831 
832  /*!
833  * \brief Copy constructor.
834  */
835  LaePathFeedback(const LaePathFeedback &src);
836 
837  /*!
838  * \brief Destructor.
839  */
841  {
842  }
843 
844  /*!
845  * \brief Assignment operator.
846  *
847  * \param rhs Right hand side object.
848  *
849  * \return Returns copy of this.
850  */
852 
853  /*!
854  * \brief Get the number of wheel points in trajectory.
855  *
856  * \return Number of points.
857  */
858  size_t getNumPoints()
859  {
860  return m_path[TrajDesired].getNumPoints();
861  }
862 
863  /*!
864  * \brief Subscript operator to get reference to given trajectory.
865  *
866  * \param i Trajectory point Index.
867  *
868  * \return Trajectory.
869  */
870  LaePath &operator[](const size_t i);
871 
872  /*!
873  * \brief Clear data.
874  */
875  void clear();
876 
877  protected:
878  LaePath m_path[TrajNumOf];
879  }; // class LaePathFeedback
880 
881 } // namespace laelaps
882 
883 
884 #endif // _LAE_TRAJ_H
std::map< std::string, double > LaeMapDutyCycle
Duty cycle trajectory type.
Definition: laeTraj.h:269
void setStartTime(timespec_t &timeStart)
Set navigation start time.
Definition: laeTraj.h:440
timespec_t getStartTime()
Get navigation start time.
Definition: laeTraj.h:429
Laelaps 2D point class.
Definition: laeTraj.h:93
~LaeSimplePathFeedback()
Destructor.
Definition: laeTraj.h:529
timespec_t getStartTime()
Get waypoint navigation start time.
Definition: laeTraj.h:650
size_t getNumPoints()
Get the number of wheel points in trajectory.
Definition: laeTraj.h:450
LaePose(const LaePose &src)
Copy constructor.
Definition: laeTraj.h:204
Robot fully-defined waypoint.
Definition: laeTraj.h:584
virtual ~LaePoint()
Destructor.
Definition: laeTraj.h:133
LaeSimplePath operator=(const LaeSimplePath &rhs)
Assignment operator.
Definition: laeTraj.h:416
LaePose m_pose
robot pose at waypoint
Definition: laeTraj.h:674
LaeSimplePathFeedback()
Default constructor.
Definition: laeTraj.h:517
size_t getNumPoints()
Get the number of wheel points in trajectory.
Definition: laeTraj.h:761
static const int TrajDesired
Trajectory feedback identifiers (and indices).
Definition: laeTraj.h:78
double m_fAcceleration
robot target acceleration (meters/s^2)
Definition: laeTraj.h:365
LaeSimpleWaypoint()
Default constructor.
Definition: laeTraj.h:289
virtual ~LaePose()
Destructor.
Definition: laeTraj.h:214
~LaeWaypoint()
Destructor.
Definition: laeTraj.h:617
double m_y
robot absolute y position (meters)
Definition: laeTraj.h:174
double m_theta
robot orientation (radians)
Definition: laeTraj.h:175
void setStartTime(timespec_t timeStart)
Set waypoint navigation start time.
Definition: laeTraj.h:661
LaeSimplePath()
Default constructor.
Definition: laeTraj.h:388
std::string m_strName
waypoint name
Definition: laeTraj.h:672
double m_y
y (meters)
Definition: laeTraj.h:97
LaeSimpleWaypoint operator=(const LaeSimpleWaypoint &rhs)
Assignment operator.
Definition: laeTraj.h:337
LaeSimpleWaypoint & operator[](const size_t i)
Subscript operator to get reference to wheel point at the given index.
Definition: laeTraj.h:480
static const timespec_t StartImmediately
Start navigation immediately.
Definition: laeTraj.h:73
std::vector< LaeWaypoint > m_path
path
Definition: laeTraj.h:807
timespec_t m_timeStart
time to start navigation
Definition: laeTraj.h:673
static const int TrajNumOf
number of trajectories ids
Definition: laeTraj.h:81
Simple path feedback class.
Definition: laeTraj.h:510
LaeSimpleWaypoint(const LaeSimpleWaypoint &src)
Copy constructor.
Definition: laeTraj.h:316
LaePose operator=(const LaePose &rhs)
Assignment operator.
Definition: laeTraj.h:225
LaePoint(double x, double y, double theta=0.0)
Initialization constructor.
Definition: laeTraj.h:113
timespec_t m_timeStart
start time
Definition: laeTraj.h:806
size_t getNumPoints()
Get the number of wheel points in trajectory.
Definition: laeTraj.h:547
double m_x
robot absolute x position (meters)
Definition: laeTraj.h:173
double m_fVelocity
robot target velocity (meters/second)
Definition: laeTraj.h:364
struct timespec timespec_t
typedef&#39;ed timespec structure
Definition: laeUtils.h:221
The <b><i>Laelaps</i></b> namespace encapsulates all <b><i>Laelaps</i></b> related constructs...
Definition: laeAlarms.h:64
LaePose(double x, double y, double theta=0.0)
Initialization constructor.
Definition: laeTraj.h:192
~LaePathFeedback()
Destructor.
Definition: laeTraj.h:840
void append(LaePoint &ptDist, double fVelocity, double fAcceleration)
Append wheel point to end of trajectory.
Definition: laeTraj.h:462
LaePoint()
Default constructor.
Definition: laeTraj.h:102
void clear()
Clear data.
Definition: laeTraj.h:488
Laelaps common utilities.
Simple path feedback class.
Definition: laeTraj.h:821
LaePath operator=(const LaePath &rhs)
Assignment operator.
Definition: laeTraj.h:727
double m_fAcceleration
target acceleration (meters/s^2)
Definition: laeTraj.h:676
Robot simple path waypoint.
Definition: laeTraj.h:283
~LaePath()
Destructor.
Definition: laeTraj.h:716
LaePath(const LaePath &src)
Copy constructor.
Definition: laeTraj.h:707
timespec_t getStartTime()
Get navigation start time.
Definition: laeTraj.h:740
timespec_t m_timeStart
start time
Definition: laeTraj.h:495
void setStartTime(timespec_t timeStart)
Set navigation start time.
Definition: laeTraj.h:751
double m_fVelocity
target velocity at waypoint (meters/s)
Definition: laeTraj.h:675
double m_x
x (meters)
Definition: laeTraj.h:96
~LaeSimplePath()
Destructor.
Definition: laeTraj.h:405
static const int TrajError
errors in trajectory
Definition: laeTraj.h:80
LaePath()
Default constructor.
Definition: laeTraj.h:699
static const int TrajActual
actual trajectory
Definition: laeTraj.h:79
~LaeSimpleWaypoint()
Destructor.
Definition: laeTraj.h:326
LaePose()
Default constructor.
Definition: laeTraj.h:180
LaePathFeedback()
Default constructor.
Definition: laeTraj.h:828
void clear()
Clear data.
Definition: laeTraj.h:799
Laelaps 2D pose class.
Definition: laeTraj.h:170
LaeWaypoint & operator[](const size_t i)
Subscript operator to get reference to wheel point at the given index.
Definition: laeTraj.h:791
size_t getNumPoints()
Get the number of wheel points in trajectory.
Definition: laeTraj.h:858
LaeSimpleWaypoint(const LaePoint &ptDist, const double fVelocity, const double fAcceleration)
Initialization constructor.
Definition: laeTraj.h:302
Robot path class.
Definition: laeTraj.h:693
LaePoint m_ptDist
robot goal x,y distance (meters, meters)
Definition: laeTraj.h:363
std::map< std::string, double > LaeMapVelocity
Velocity trajectory type.
Definition: laeTraj.h:258
std::vector< LaeSimpleWaypoint > m_path
path
Definition: laeTraj.h:496
Robot simple path class.
Definition: laeTraj.h:382
LaePoint operator=(const LaePoint &rhs)
Assignment operator.
Definition: laeTraj.h:144
LaeSimplePath(const LaeSimplePath &src)
Copy constructor.
Definition: laeTraj.h:396
Top-level package include file.
LaePoint(const LaePoint &src)
Copy constructor.
Definition: laeTraj.h:124