Laelaps  2.3.5
RoadNarrows Robotics Small Outdoor Mobile Robot Project
laeTune.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // Package: Laelaps
4 //
5 // Library: liblaelaps
6 //
7 // File: laeTune.h
8 //
9 /*! \file
10  *
11  * $LastChangedDate: 2016-01-21 16:50:25 -0700 (Thu, 21 Jan 2016) $
12  * $Rev: 4268 $
13  *
14  * \brief Laelaps tuning.
15  *
16  * All tuning defaults defined below can be overridden in the
17  * /etc/laelaps_tune.conf XML file.
18  *
19  * \author Robin Knight (robin.knight@roadnarrows.com)
20  *
21  * \par Copyright
22  * \h_copy 2015-2017. RoadNarrows LLC.\n
23  * http://www.roadnarrows.com\n
24  * All Rights Reserved
25  */
26 /*
27  * @EulaBegin@
28  *
29  * Unless otherwise stated explicitly, all materials contained are copyrighted
30  * and may not be used without RoadNarrows LLC's written consent,
31  * except as provided in these terms and conditions or in the copyright
32  * notice (documents and software) or other proprietary notice provided with
33  * the relevant materials.
34  *
35  * IN NO EVENT SHALL THE AUTHOR, ROADNARROWS LLC, OR ANY
36  * MEMBERS/EMPLOYEES/CONTRACTORS OF ROADNARROWS OR DISTRIBUTORS OF THIS SOFTWARE
37  * BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
38  * CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
39  * DOCUMENTATION, EVEN IF THE AUTHORS OR ANY OF THE ABOVE PARTIES HAVE BEEN
40  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41  *
42  * THE AUTHORS AND ROADNARROWS LLC SPECIFICALLY DISCLAIM ANY WARRANTIES,
43  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
44  * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
45  * "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO
46  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
47  *
48  * @EulaEnd@
49  */
50 ////////////////////////////////////////////////////////////////////////////////
51 
52 #ifndef _LAE_TUNE_H
53 #define _LAE_TUNE_H
54 
55 #include <iostream>
56 #include <string>
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  // Laelaps Tuning Defaults, Limits, and Fixed Values
68  //----------------------------------------------------------------------------
69 
70  /*!
71  * defgroup lae_tunes
72  * \{
73  */
74 
75  // . .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .
76  // Thread Tuning
77 
78  /*!
79  * \brief Default IMU thread cycle rate (Hertz).
80  *
81  * All IMU tasks exectute per each cycle.
82  *
83  * Range: \h_ge \ref LaeTuneThreadHzMin
84  * Scope: global
85  */
86  extern const double LaeTuneThreadImuHzDft;
87 
88  /*!
89  * \brief Default kinematics thread cycle rate (Hertz).
90  *
91  * All dynamics and kinematics tasks exectute per each cycle.
92  *
93  * Range: \h_ge \ref LaeTuneThreadHzMin
94  * Scope: global
95  */
96  extern const double LaeTuneThreadKinHzDft;
97 
98  /*!
99  * \brief Default range sensing thread cycle rate (Hertz).
100  *
101  * All sensing tasks exectute per each cycle.
102  *
103  * Range: \h_ge \ref LaeTuneThreadHzMin
104  * Scope: global
105  */
106  extern const double LaeTuneThreadRangeHzDft;
107 
108  /*!
109  * \brief Minimum thread cycle rate (Hertz).
110  *
111  * Gotta give me something boys!
112  */
113  extern const double LaeTuneThreadHzMin;
114 
115 
116  // . .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .
117  // Watchdog Tuning
118 
119  /*!
120  * \brief Default Laelaps watchdog timeout
121  *
122  * The watchdog sub-processor must be petted at a faster rate than its
123  * timeout. Any received valid I2C or serial command by the watchdog
124  * results in a reset of the watchdog timer. If the watchdog timer times out,
125  * the no-service state is entered. Power to the motor controllers and motors
126  * is disabled and the deck status LED flashes green.
127  *
128  * Units: seconds
129  * Range: [\ref LaeTuneWdTimeoutMin, \ref LaeTuneWdTimeoutMax]
130  * Scope: global
131  */
132  extern const double LaeTuneWdTimeoutDft;
133 
134  /*!
135  * \brief Minimum watchdog timeout (msec).
136  */
137  extern const double LaeTuneWdTimeoutMin;
138 
139  /*!
140  * \brief Maximum watchdog timeout (msec).
141  */
142  extern const double LaeTuneWdTimeoutMax;
143 
144 
145  // . .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .
146  // Derated Velocity Tuning
147 
148  /*!
149  * \brief Default Laelaps robot velocity derate (% of goal velocities).
150  *
151  * When a new move command is received, all of the goal velocities are
152  * multiplied by this derated value.
153  *
154  * The working value is converted to a normalized value internally.
155  *
156  * \verbatim
157  * velocity_derate = tune_velocity_derate / 100.0
158  * goal_vel = goal_vel * velocity_derate
159  * \endverbatim
160  *
161  * Range: [\ref LaeTuneVelDerateMin, \ref LaeTuneVelDerateMax]
162  * Scope: global
163  */
164  extern const double LaeTuneVelDerateDft;
165 
166  /*!
167  * \brief Minimum robot velocity derate (% of goal velocities).
168  */
169  extern const double LaeTuneVelDerateMin;
170 
171  /*!
172  * \brief Maximum robot velocity derate (% of goal velocities).
173  */
174  extern const double LaeTuneVelDerateMax;
175 
176 
177  // . .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .
178  // Navigation Trajectory Tuning
179 
180  /*!
181  * \brief Default trajectory norm.
182  *
183  * Range: \ref LaeNormL1, \ref LaeNormL2, \ref LaeNormLinf
184  * Scope: global
185  */
187 
188  /*!
189  * \brief Default trajectory distance epsilon (meters).
190  *
191  * Trajectory waypoints distances within epsilon are considered reached.
192  *
193  * \verbatim
194  * ||WP-P|| < epsilon <==> waypoint reached
195  * Where WP is the x,y goal vector of positions and P is the vector
196  * of current x,y position.
197  * \endverbatim
198  *
199  * Range: \h_ge \ref LaeTuneTrajEpsilonMin
200  */
201  extern const double LaeTuneTrajEpsilonDft;
202 
203  /*!
204  * \brief Minimum epsilon value (meters).
205  */
206  extern const double LaeTuneTrajEpsilonMin;
207 
208 
209  // . .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .
210  // Battery Tuning (mostly fixed for v2.0)
211 
212  /*!
213  * \brief Fixed battery type.
214  *
215  * Fixed: lithium-ion polymer
216  * Scope: battery
217  */
218  extern const char* const LaeTuneBattType;
219 
220  /*!
221  * \brief Fixed battery chemistry.
222  *
223  * The chemistry islithium nickel manganese cobalt oxide (NMC).
224  *
225  * Fixed: NMC
226  * Scope: battery
227  */
228  extern const char* const LaeTuneBattChem;
229 
230  /*!
231  * \brief Fixed battery capacity (Amp-hours).
232  *
233  * Fixed: 10
234  * Scope: battery
235  */
236  extern const double LaeTuneBattCapAh;
237 
238  /*!
239  * \brief Fixed battery cell count.
240  *
241  * Fixed: 3
242  * Scope: battery
243  */
244  extern const int LaeTuneBattCells;
245 
246  /*!
247  * \brief Maximum maximum battery voltage.
248  */
249  extern const double LaeTuneBattMaxVMax;
250 
251  /*!
252  * brief Default maximum operating voltage.
253  *
254  * Range: [\ref LaeTuneBattNominalV, \ref LaeTuneBattMaxVMax]
255  * Scope: battery
256  */
257  extern const double LaeTuneBattMaxVDft;
258 
259  /*!
260  * \brief Fixed nominal operating voltage.
261  */
262  extern const double LaeTuneBattNominalV;
263 
264  /*!
265  * brief Default minimum operating voltage.
266  *
267  * Range: [\ref LaeTuneBattMinVMin, \ref LaeTuneBattNominalV]
268  * Scope: battery
269  */
270  extern const double LaeTuneBattMinVDft;
271 
272  /*!
273  * \brief Minimum minimum battery voltage.
274  */
275  extern const double LaeTuneBattMinVMin;
276 
277 
278  // . .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .
279  // Velocity PID Tuning
280 
281  /*!
282  * \brief Default motor velocity PID proportional constant.
283  *
284  * Range: \h_ge \ref LaeTuneVelPidKMin
285  * Scope: powertrains
286  */
287  extern const double LaeTuneVelPidKpDft;
288 
289  /*!
290  * \brief Default motor velocity PID integral constant.
291  *
292  * Range: \h_ge \ref LaeTunePidKMin
293  * Scope: powertrains
294  */
295  extern const double LaeTuneVelPidKiDft;
296 
297  /*!
298  * \brief Default motor velocity PID derivative constant.
299  *
300  * Range: \h_ge \ref LaeTunePidKMin
301  * Scope: powertrains
302  */
303  extern const double LaeTuneVelPidKdDft;
304 
305  /*!
306  * \brief Minimum PID K constant value.
307  */
308  extern const double LaeTuneVelPidKMin;
309 
310  // . .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .
311  // Tires Tuning
312 
313  /*!
314  * \brief Default tire radius (meters).
315  *
316  * Range: \h_ge \ref LaeTuneTireMin
317  * Scope: powertrains
318  */
319  extern const double LaeTuneTireRadiusDft;
320 
321  /*!
322  * \brief Default tire width (meters).
323  *
324  * Range: \h_ge \ref LaeTuneTireMin
325  * Scope: powertrains
326  */
327  extern const double LaeTuneTireWidthDft;
328 
329  /*!
330  * \brief Minimum tire dimension.
331  */
332  extern const double LaeTuneTireDimMin;
333 
334  // . .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .
335  // VL6180 Range Sensor Tuning
336 
337  /*!
338  * \brief Default Time-of-Flight part-to-part offset.
339  *
340  * Range: [\ref LaeTuneVL6180TofOffsetMin, \ref LaeTuneVL6180TofOffsetMax]
341  * Scope: range_sensor
342  */
343  extern const int LaeTuneVL6180TofOffsetDft;
344 
345  /*!
346  * \brief Minimum Time-of-Flight part-to-part offset value.
347  */
348  extern const int LaeTuneVL6180TofOffsetMin;
349 
350  /*!
351  * \brief Maximum Time-of-Flight part-to-part offset value.
352  */
353  extern const int LaeTuneVL6180TofOffsetMax;
354 
355  /*!
356  * \brief Default Time-of-Flight cross-talk compensation.
357  *
358  * Range: [\ref LaeTuneVL6180TofXTalkMin, \ref LaeTuneVL6180TofXTalkMax]
359  * Scope: range_sensor
360  */
361  extern const int LaeTuneVL6180TofXTalkDft;
362 
363  /*!
364  * \brief Minimum Time-of-Flight cross-talk compensation value.
365  */
366  extern const int LaeTuneVL6180TofXTalkMin;
367 
368  /*!
369  * \brief Maximum Time-of-Flight cross-talk compensation value.
370  */
371  extern const int LaeTuneVL6180TofXTalkMax;
372 
373  /*!
374  * \brief Default Ambient Light Sensor analog gain.
375  *
376  * Range: [\ref LaeTuneVL6180AlsGainMin, \ref LaeTuneVL6180AlsGainMax]
377  * Scope: range_sensor
378  */
379  extern const double LaeTuneVL6180AlsGainDft;
380 
381  /*!
382  * \brief Minimum Ambient Light Sensor analog gain.
383  */
384  extern const double LaeTuneVL6180AlsGainMin;
385 
386  /*!
387  * \brief Maximum Ambient Light Sensor analog gain.
388  */
389  extern const double LaeTuneVL6180AlsGainMax;
390 
391  /*!
392  * \brief Default Ambient Light Sensor integration period (msec).
393  *
394  * Range: [\ref LaeTuneVL6180AlsIntPeriodMin,
395  * \ref LaeTuneVL6180AlsIntPeriodMax]
396  * Scope: range_sensor
397  */
399 
400  /*!
401  * \brief Minimum Ambient Light Sensor integration period (msec).
402  */
404 
405  /*!
406  * \brief Maximum Ambient Light Sensor integration period (msec).
407  */
409 
410  /*!
411  * \}
412  */
413 
414 
415  //----------------------------------------------------------------------------
416  // LaeTunesBattery Class
417  //----------------------------------------------------------------------------
418 
419  /*!
420  * \brief Laelaps battery tuning data class.
421  */
423  {
424  public:
425  std::string m_strType; ///< battery type
426  std::string m_strChem; ///< battery chemistry
427  double m_fCapAh; ///< battery capacity in Amp-hours
428  int m_nCells; ///< number of battery cells
429  double m_fMaxV; ///< maximum operating voltage
430  double m_fNominalV; ///< nominal operation voltage
431  double m_fMinV; ///< minimum operation voltage
432 
433  /*!
434  * \brief Default constructor.
435  */
436  LaeTunesBattery();
437 
438  /*!
439  * \brief Destructor.
440  */
442  {
443  }
444 
445  /*!
446  * \brief Assignment operator
447  *
448  * \param rhs Right hand side object.
449  *
450  * \return *this
451  */
453 
454  /*!
455  * \brief Print out tuning parameters to stdout.
456  *
457  * \param indent Left indentation.
458  */
459  void print(int indent=0);
460 
461  }; // class LaeTunesBattery
462 
463 
464  //----------------------------------------------------------------------------
465  // LaeTunesPowertrain Class
466  //----------------------------------------------------------------------------
467 
468  /*!
469  * \brief Laelaps powertrain tuning data class.
470  */
472  {
473  public:
474  double m_fVelPidKp; ///< motor velocity PID proportional const
475  double m_fVelPidKi; ///< motor velocity PID integral constant
476  double m_fVelPidKd; ///< motor velocity PID derivative constant
477  double m_fTireRadius; ///< tire radius (meters)
478  double m_fTireWidth; ///< tire width (meters)
479 
480  /*!
481  * \brief Default constructor.
482  */
484 
485  /*!
486  * \brief Destructor.
487  */
489  {
490  }
491 
492  /*!
493  * \brief Assignment operator
494  *
495  * \param rhs Right hand side object.
496  *
497  * \return *this
498  */
500 
501  /*!
502  * \brief Print out tuning parameters to stdout.
503  *
504  * \param strKey Powertrain key.
505  * \param indent Left indentation.
506  */
507  void print(const std::string &strKey, int indent=0);
508 
509  }; // class LaeTunesPowertrain
510 
511 
512  //----------------------------------------------------------------------------
513  // LaeTunesPowertrain Class
514  //----------------------------------------------------------------------------
515 
516  /*!
517  * \brief Laelaps powertrain tuning data class.
518  */
520  {
521  public:
522  int m_nTofOffset; ///< ToF part-to-part offset
523  int m_nTofCrossTalk; ///< ToF cross-talk compensation
524  double m_fAlsGain; ///< ALS analog gain
525  int m_nAlsIntPeriod; ///< ALS integration period
526 
527  /*!
528  * \brief Default constructor.
529  */
530  LaeTunesVL6180();
531 
532  /*!
533  * \brief Destructor.
534  */
536  {
537  }
538 
539  /*!
540  * \brief Assignment operator
541  *
542  * \param rhs Right hand side object.
543  *
544  * \return *this
545  */
547 
548  /*!
549  * \brief Print out tuning parameters to stdout.
550  *
551  * \param strKey Sensor key.
552  * \param indent Left indentation.
553  */
554  void print(const std::string &strKey, int indent=0);
555 
556  }; // class LaeTunesVL6180
557 
558 
559  //----------------------------------------------------------------------------
560  // LaeTunes Class
561  //----------------------------------------------------------------------------
562 
563  /*!
564  * \brief Laelaps tuning data class.
565  */
566  class LaeTunes
567  {
568  public:
569  /*! Map of powertrain pair tuning parameters. */
570  typedef std::map<std::string, LaeTunesPowertrain> LaeTunesMapPtp;
571 
572  /*! Map of VL6180 range sensor tuning parameters. */
573  typedef std::map<std::string, LaeTunesVL6180> LaeTunesMapVL6180;
574 
575  // global tuning
576  double m_fImuHz; ///< kinematic thread rate (hertz)
577  double m_fKinematicsHz; ///< kinematic thread rate (hertz)
578  double m_fRangeHz; ///< kinematic thread rate (hertz)
579  double m_fWatchDogTimeout; ///< watchdog timeout (seconds)
580  double m_fVelDerate; ///< velocity derate (fraction)
581  LaeNorm m_eTrajNorm; ///< trajectory distanct norm
582  double m_fTrajEpsilon; ///< trajectory epsilon distance (radians)
583 
584  // subsystem tuning
585  LaeTunesBattery m_battery; ///< battery tuning
586  LaeTunesMapPtp m_mapPtp; ///< powertrain pair tuning
587  LaeTunesMapVL6180 m_mapVL6180; ///< range sensors tuning
588  /*!
589  * \brief Default constructor.
590  */
591  LaeTunes();
592 
593  /*!
594  * \brief Destructor.
595  */
597  {
598  }
599 
600  /*!
601  * \brief Get IMU tasks thread cycle rate tune parameter (hertz).
602  *
603  * \return Hertz.
604  */
605  double getImuHz() const;
606 
607  /*!
608  * \brief Get kinematics thread cycle rate tune parameter (hertz).
609  *
610  * \return Hertz.
611  */
612  double getKinematicsHz() const;
613 
614  /*!
615  * \brief Get range sensing thread cycle rate tune parameter (hertz).
616  *
617  * \return Hertz.
618  */
619  double getRangeHz() const;
620 
621  /*!
622  * \brief Get watchdog timeout (seconds).
623  *
624  * \return Seconds.
625  */
626  double getWatchDogTimeout() const;
627 
628  /*!
629  * \brief Get derated velocity tune parameter (normalized).
630  *
631  * \return Derated value [0.0, 1.0].
632  */
633  double getVelocityDerate() const;
634 
635  /*!
636  * \brief Get trajectory tune parameters.
637  *
638  * \param [out] eNorm Distance norm.
639  * \param [out] fEpsilon Waypoint precision (radians)
640  */
641  void getTrajectoryParams(LaeNorm &eNorm, double &fEpsilon) const;
642 
643  /*!
644  * \brief Get battery minimum and maximum allowed operating range voltages
645  * tune parameters.
646  *
647  * \param [out] fBattMinV Minimum battery voltage.
648  * \param [out] fBattMaxV Maximum battery voltage.
649  */
650  void getBattOpRangeParams(double &fBattMinV, double &fBattMaxV) const;
651 
652  /*!
653  * \brief Get motor velocity PID K tune parameters.
654  *
655  * \param strName Name of powertrain or powertrain pair.
656  * One of: front left_front right_front
657  * rear left_rear right_rear.
658  * \param [out] fKp Proportional constant.
659  * \param [out] fKi Integral constant.
660  * \param [out] fKd Derivative constant.
661  */
662  void getVelPidKParams(const std::string &strName,
663  double &fKp, double &fKi, double &fKd) const;
664 
665  /*!
666  * \brief Get tire dimensions tune parameters.
667  *
668  * \param strName Name of powertrain or powertrain pair.
669  * One of: front left_front right_front
670  * rear left_rear right_rear.
671  * \param [out] fTireRadius Tire radius (meters).
672  * \param [out] fTireWidth Tire width (meters).
673  */
674  void getTireDimParams(const std::string &strName,
675  double &fTireRadius, double &fTireWidth) const;
676 
677  /*!
678  * \break Map powertrain (pair) key to powertrain pair key.
679  *
680  * \param strKey Powertrain (pair) key.
681  *
682  * \return "front" or "rear"
683  */
684  std::string mapToPtp(const std::string &strKey) const;
685 
686  /*!
687  * \brief Get VL6180 range sensor tune parameters.
688  *
689  * \param strName Name of range sensor (key)
690  * \param [out] nTofOffset ToF part-to-part offset
691  * \param [out] nTofCrossTalk ToF cross-talk compensation
692  * \param [out] fAlsGain ALS analog gain
693  * \param [out] nAlsIntPeriod ALS integration period
694  */
695  void getVL6180Params(const std::string &strName,
696  int &nTofOffset,
697  int &nTofCrossTalk,
698  double &fAlsGain,
699  int &nAlsIntPeriod) const;
700 
701 
702  /*!
703  * \brief Print out tuning parameters to stdout.
704  *
705  * \param indent Left indentation.
706  */
707  void print(int indent=0);
708 
709  }; // class LaeTunes
710 
711 } // laelaps namespace
712 
713 #endif // _LAE_TUNE_H
double m_fMinV
minimum operation voltage
Definition: laeTune.h:431
const double LaeTuneVelDerateMin
Minimum robot velocity derate (% of goal velocities).
Definition: laeTune.h:169
double m_fNominalV
nominal operation voltage
Definition: laeTune.h:430
double m_fImuHz
kinematic thread rate (hertz)
Definition: laeTune.h:576
const double LaeTuneVelPidKiDft
Default motor velocity PID integral constant.
Definition: laeTune.h:295
double m_fKinematicsHz
kinematic thread rate (hertz)
Definition: laeTune.h:577
const char *const LaeTuneBattType
Fixed battery type.
Definition: laeTune.h:218
const double LaeTuneThreadHzMin
Minimum thread cycle rate (Hertz).
Definition: laeTune.h:113
const double LaeTuneVL6180AlsGainMin
Minimum Ambient Light Sensor analog gain.
Definition: laeTune.h:384
Laelaps tuning data class.
Definition: laeTune.h:566
const double LaeTuneWdTimeoutMin
Minimum watchdog timeout (msec).
Definition: laeTune.h:137
const double LaeTuneVelDerateDft
Default Laelaps robot velocity derate (% of goal velocities).
Definition: laeTune.h:164
~LaeTunesPowertrain()
Destructor.
Definition: laeTune.h:488
const int LaeTuneVL6180TofXTalkDft
Default Time-of-Flight cross-talk compensation.
Definition: laeTune.h:361
const double LaeTuneTrajEpsilonDft
Default trajectory distance epsilon (meters).
Definition: laeTune.h:201
LaeTunesMapVL6180 m_mapVL6180
range sensors tuning
Definition: laeTune.h:587
const int LaeTuneVL6180TofXTalkMax
Maximum Time-of-Flight cross-talk compensation value.
Definition: laeTune.h:371
double m_fVelPidKd
motor velocity PID derivative constant
Definition: laeTune.h:476
int m_nTofOffset
ToF part-to-part offset.
Definition: laeTune.h:522
const int LaeTuneVL6180TofXTalkMin
Minimum Time-of-Flight cross-talk compensation value.
Definition: laeTune.h:366
~LaeTunesVL6180()
Destructor.
Definition: laeTune.h:535
const double LaeTuneTireRadiusDft
Default tire radius (meters).
Definition: laeTune.h:319
const double LaeTuneBattNominalV
Fixed nominal operating voltage.
Definition: laeTune.h:262
const double LaeTuneBattMinVDft
Definition: laeTune.h:270
double m_fVelPidKp
motor velocity PID proportional const
Definition: laeTune.h:474
int m_nAlsIntPeriod
ALS integration period.
Definition: laeTune.h:525
~LaeTunesBattery()
Destructor.
Definition: laeTune.h:441
const double LaeTuneVelPidKMin
Minimum PID K constant value.
Definition: laeTune.h:308
const double LaeTuneVelPidKpDft
Default motor velocity PID proportional constant.
Definition: laeTune.h:287
std::map< std::string, LaeTunesPowertrain > LaeTunesMapPtp
Definition: laeTune.h:570
const double LaeTuneVL6180AlsGainMax
Maximum Ambient Light Sensor analog gain.
Definition: laeTune.h:389
std::string m_strType
battery type
Definition: laeTune.h:425
double m_fCapAh
battery capacity in Amp-hours
Definition: laeTune.h:427
const int LaeTuneVL6180AlsIntPeriodMax
Maximum Ambient Light Sensor integration period (msec).
Definition: laeTune.h:408
double m_fTireRadius
tire radius (meters)
Definition: laeTune.h:477
std::map< std::string, LaeTunesVL6180 > LaeTunesMapVL6180
Definition: laeTune.h:573
LaeTunesBattery()
Default constructor.
Definition: laeTune.cxx:157
const double LaeTuneThreadKinHzDft
Default kinematics thread cycle rate (Hertz).
Definition: laeTune.h:96
LaeNorm m_eTrajNorm
trajectory distanct norm
Definition: laeTune.h:581
The <b><i>Laelaps</i></b> namespace encapsulates all <b><i>Laelaps</i></b> related constructs...
Definition: laeAlarms.h:64
double m_fWatchDogTimeout
watchdog timeout (seconds)
Definition: laeTune.h:579
const double LaeTuneTrajEpsilonMin
Minimum epsilon value (meters).
Definition: laeTune.h:206
Laelaps common utilities.
const int LaeTuneVL6180AlsIntPeriodMin
Minimum Ambient Light Sensor integration period (msec).
Definition: laeTune.h:403
const int LaeTuneVL6180TofOffsetMin
Minimum Time-of-Flight part-to-part offset value.
Definition: laeTune.h:348
LaeTunesMapPtp m_mapPtp
powertrain pair tuning
Definition: laeTune.h:586
const double LaeTuneTireWidthDft
Default tire width (meters).
Definition: laeTune.h:327
int m_nTofCrossTalk
ToF cross-talk compensation.
Definition: laeTune.h:523
double m_fVelPidKi
motor velocity PID integral constant
Definition: laeTune.h:475
const double LaeTuneWdTimeoutDft
Default Laelaps watchdog timeout.
Definition: laeTune.h:132
void print(int indent=0)
Print out tuning parameters to stdout.
Definition: laeTune.cxx:178
double m_fTrajEpsilon
trajectory epsilon distance (radians)
Definition: laeTune.h:582
LaeTunesBattery & operator=(const LaeTunesBattery &rhs)
Assignment operator.
Definition: laeTune.cxx:167
const double LaeTuneThreadRangeHzDft
Default range sensing thread cycle rate (Hertz).
Definition: laeTune.h:106
const double LaeTuneVelPidKdDft
Default motor velocity PID derivative constant.
Definition: laeTune.h:303
~LaeTunes()
Destructor.
Definition: laeTune.h:596
const int LaeTuneBattCells
Fixed battery cell count.
Definition: laeTune.h:244
double m_fMaxV
maximum operating voltage
Definition: laeTune.h:429
Laelaps battery tuning data class.
Definition: laeTune.h:422
double m_fTireWidth
tire width (meters)
Definition: laeTune.h:478
int m_nCells
number of battery cells
Definition: laeTune.h:428
double m_fVelDerate
velocity derate (fraction)
Definition: laeTune.h:580
const double LaeTuneVelDerateMax
Maximum robot velocity derate (% of goal velocities).
Definition: laeTune.h:174
const double LaeTuneBattMaxVDft
Definition: laeTune.h:257
double m_fRangeHz
kinematic thread rate (hertz)
Definition: laeTune.h:578
const LaeNorm LaeTuneTrajNormDft
Default trajectory norm.
Definition: laeTune.h:186
std::string m_strChem
battery chemistry
Definition: laeTune.h:426
const int LaeTuneVL6180AlsIntPeriodDft
Default Ambient Light Sensor integration period (msec).
Definition: laeTune.h:398
Laelaps powertrain tuning data class.
Definition: laeTune.h:519
const int LaeTuneVL6180TofOffsetDft
Default Time-of-Flight part-to-part offset.
Definition: laeTune.h:343
const double LaeTuneBattMinVMin
Minimum minimum battery voltage.
Definition: laeTune.h:275
const double LaeTuneWdTimeoutMax
Maximum watchdog timeout (msec).
Definition: laeTune.h:142
Laelaps powertrain tuning data class.
Definition: laeTune.h:471
const char *const LaeTuneBattChem
Fixed battery chemistry.
Definition: laeTune.h:228
const int LaeTuneVL6180TofOffsetMax
Maximum Time-of-Flight part-to-part offset value.
Definition: laeTune.h:353
const double LaeTuneBattMaxVMax
Maximum maximum battery voltage.
Definition: laeTune.h:249
const double LaeTuneBattCapAh
Fixed battery capacity (Amp-hours).
Definition: laeTune.h:236
const double LaeTuneVL6180AlsGainDft
Default Ambient Light Sensor analog gain.
Definition: laeTune.h:379
LaeTunesBattery m_battery
battery tuning
Definition: laeTune.h:585
const double LaeTuneTireDimMin
Minimum tire dimension.
Definition: laeTune.h:332
LaeNorm
Length/Distance Norm.
Definition: laelaps.h:356
double m_fAlsGain
ALS analog gain.
Definition: laeTune.h:524
Top-level package include file.
const double LaeTuneThreadImuHzDft
Default IMU thread cycle rate (Hertz).
Definition: laeTune.h:86