Gazebo Math

API Reference

6.15.1
gz/math/GaussMarkovProcess.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef GZ_MATH_GAUSSMARKOVPROCESS_HH_
18 #define GZ_MATH_GAUSSMARKOVPROCESS_HH_
19 
20 #include <chrono>
21 #include <memory>
22 #include <gz/math/Export.hh>
23 #include <gz/math/config.hh>
24 
25 namespace ignition
26 {
27  namespace math
28  {
29  // Use a steady clock
31 
32  // Inline bracket to help doxygen filtering.
33  inline namespace IGNITION_MATH_VERSION_NAMESPACE {
34  //
35  // Forward declarations.
36  class GaussMarkovProcessPrivate;
37 
41  class IGNITION_MATH_VISIBLE GaussMarkovProcess
51  {
52  // Default constructor. This sets all the parameters to zero.
53  public: GaussMarkovProcess();
54 
64  public: GaussMarkovProcess(double _start, double _theta, double _mu,
65  double _sigma);
66 
68  public: ~GaussMarkovProcess();
69 
76  public: void Set(double _start, double _theta, double _mu, double _sigma);
77 
81  public: double Start() const;
82 
85  public: double Value() const;
86 
90  public: double Theta() const;
91 
95  public: double Mu() const;
96 
100  public: double Sigma() const;
101 
104  public: void Reset();
105 
134  public: double Update(const clock::duration &_dt);
135 
136  public: double Update(double _dt);
137 
138 #ifdef _WIN32
139 // Disable warning C4251 which is triggered by
140 // std::unique_ptr
141 #pragma warning(push)
142 #pragma warning(disable: 4251)
143 #endif
146 #ifdef _WIN32
147 #pragma warning(pop)
148 #endif
149  };
150  }
151  }
152 }
153 #endif
double Value() const
Get the current process value.
double Start() const
Get the start value.
void Reset()
Reset the process. This will set the current process value to the start value.
Definition: gz/math/AdditivelySeparableScalarField3.hh:27
double Update(const clock::duration &_dt)
Update the process and get the new value.
double Mu() const
Get the mu ( ) value.
double Sigma() const
Get the sigma ( ) value.
std::chrono::steady_clock clock
Definition: gz/math/DiffDriveOdometry.hh:31
void Set(double _start, double _theta, double _mu, double _sigma)
Set the process parameters. This will also call Reset().
double Theta() const
Get the theta ( ) value.