trajectory_simulator_online.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Software License Agreement (BSD License) *
3  * Copyright (C) 2016 by Horatiu George Todoran <todorangrg@gmail.com> *
4  * *
5  * Redistribution and use in source and binary forms, with or without *
6  * modification, are permitted provided that the following conditions *
7  * are met: *
8  * *
9  * 1. Redistributions of source code must retain the above copyright *
10  * notice, this list of conditions and the following disclaimer. *
11  * 2. Redistributions in binary form must reproduce the above copyright *
12  * notice, this list of conditions and the following disclaimer in *
13  * the documentation and/or other materials provided with the *
14  * distribution. *
15  * 3. Neither the name of the copyright holder nor the names of its *
16  * contributors may be used to endorse or promote products derived *
17  * from this software without specific prior written permission. *
18  * *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT *
21  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS *
22  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE *
23  * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, *
24  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, *
25  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
26  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER *
27  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT *
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY *
29  * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
30  * POSSIBILITY OF SUCH DAMAGE. *
31  ***************************************************************************/
32 
33 #ifndef TRAJECTORY_SIMULATOR_ONLINE_H
34 #define TRAJECTORY_SIMULATOR_ONLINE_H
35 
37 
38 #include <functional>
39 
40 namespace tuw
41 {
43 {
44  // special class member functions
45 public:
47 
48 public:
49  TrajectorySimulatorOnline(StateSimPtr _stateSim, std::unique_ptr<CostsEvaluatorClass> _costsEvaluator);
50 
51 public:
52  virtual ~TrajectorySimulatorOnline() = default;
53 
54 public:
56 
57 public:
59 
60 public:
62 
63 public:
65 
66 public:
67  void simulateTrajectory(double _lastValidArc = 0) override;
68 
69 private:
70  void populatePartSimLatticesGeneral(std::size_t _firstLaticeInvalidIdx, double _arcParamMax,
71  double _minArcLatticeVal) override;
72 
73 private:
74  void populatePartSimLatticesDtOnly(const size_t& _firstLaticeInvalidIdx, double _arcParamMax) override;
75 
77 private:
78  void resizeBeginGeneral(const double& _arcParamMax);
80 private:
81  void resizeBeginDtOnly(const double& _arcParamMax);
83 private:
84  double toNextIntMult(const double& _x, const double& _dx) const;
85 };
86 }
87 
88 #endif // TRAJECTORY_SIMULATOR_ONLINE_H
void populatePartSimLatticesDtOnly(const size_t &_firstLaticeInvalidIdx, double _arcParamMax) override
Performs simulation and populates simulation and partial lattice when only equal dt lattice is enable...
void simulateTrajectory(double _lastValidArc=0) override
Simulates (discrete numerical evaluation) an entire trajectory according to the specified intervals a...
void populatePartSimLatticesGeneral(std::size_t _firstLaticeInvalidIdx, double _arcParamMax, double _minArcLatticeVal) override
double toNextIntMult(const double &_x, const double &_dx) const
Numeric safe incremental rounding of x (finds the smallest multiple of.
virtual ~TrajectorySimulatorOnline()=default
void resizeBeginGeneral(const double &_arcParamMax)
Performs lattices resizing relevant to the general online simulation algorithm.
std::shared_ptr< StateSim > StateSimPtr
void resizeBeginDtOnly(const double &_arcParamMax)
Performs lattices resizing relevant to the DT-only online simulation algorithm.
TrajectorySimulatorOnline & operator=(const TrajectorySimulatorOnline &)=default


tuw_control
Author(s): George Todoran
autogenerated on Mon Jun 10 2019 15:27:22