TSMP.h
Go to the documentation of this file.
1 /**
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @author Jianfeng Gao ( jianfeng dot gao at kit dot edu )
17  * @date 2022
18  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19  * GNU General Public License
20  */
21 
22 #pragma once
23 
25 #include <ArmarXCore/interface/serialization/Eigen.h>
27 #include "MP.h"
28 
29 
31 {
32 
33  struct TSMPInput : virtual MPInput
34  {
36  Eigen::Vector6f vel = Eigen::Vector6f::Zero();
37  double deltaT;
38  };
39 
40  struct TSMPOutput : virtual MPOutput
41  {
43  Eigen::Vector6f vel = Eigen::Vector6f::Zero();
44  };
45 
46  using TSMPInputPtr = std::shared_ptr<TSMPInput>;
47  using TSMPOutputPtr = std::shared_ptr<TSMPOutput>;
48 
49 
50 
51  class TSMP : virtual public MP
52  {
53  public:
54  TSMP(const MPConfig& c);
55  ~TSMP(){};
56 
57  void run(MPInputPtr, MPOutputPtr) override;
58  void validateInitialState(const DVec& starts) override;
59 
61  };
62 
63  typedef std::shared_ptr<TSMP> TSMPPtr;
64 
65 } /// namespace armarx::control::common::mp
66 
armarx::control::common::mp::MP
Definition: MP.h:67
armarx::control::common::mp::TSMP::TSMP
TSMP(const MPConfig &c)
Definition: TSMP.cpp:18
armarx::control::common::mp::TSMPInput::vel
Eigen::Vector6f vel
Definition: TSMP.h:36
armarx::control::common::mp::TSMPPtr
std::shared_ptr< TSMP > TSMPPtr
Definition: TSMP.h:63
armarx::control::common::mp::TSMP::validateInitialState
void validateInitialState(const DVec &starts) override
Definition: TSMP.cpp:38
armarx::control::common::mp::TSMP
Definition: TSMP.h:51
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
armarx::control::common::mp
This file is part of ArmarX.
Definition: aron_conversions.cpp:331
armarx::control::common::mp::TSMP::run
void run(MPInputPtr, MPOutputPtr) override
Definition: TSMP.cpp:46
armarx::control::common::mp::TSMP::previousAngularVelocity
Eigen::Quaterniond previousAngularVelocity
Definition: TSMP.h:60
armarx::control::common::mp::TSMPOutput::pose
Eigen::Matrix4f pose
Definition: TSMP.h:42
MP.h
GfxTL::Identity
void Identity(MatrixXX< N, N, T > *a)
Definition: MatrixXX.h:523
armarx::control::common::mp::TSMPOutputPtr
std::shared_ptr< TSMPOutput > TSMPOutputPtr
Definition: TSMP.h:47
armarx::control::common::mp::DVec
Ice::DoubleSeq DVec
Definition: MP.h:46
armarx::control::common::mp::MPInputPtr
std::shared_ptr< MPInput > MPInputPtr
Definition: MP.h:63
armarx::control::common::mp::TSMP::~TSMP
~TSMP()
Definition: TSMP.h:55
armarx::control::common::mp::MPInput
Definition: MP.h:49
armarx::control::common::mp::TSMPOutput::vel
Eigen::Vector6f vel
Definition: TSMP.h:43
armarx::control::common::mp::TSMPInput::deltaT
double deltaT
Definition: TSMP.h:37
TripleBuffer.h
armarx::control::common::mp::MPOutputPtr
std::shared_ptr< MPOutput > MPOutputPtr
Definition: MP.h:64
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:601
armarx::control::common::mp::TSMPOutput
Definition: TSMP.h:40
Eigen::Quaterniond
Quaternion< double, 0 > Quaterniond
Definition: EigenForwardDeclarations.h:62
Eigen::Matrix< float, 6, 1 >
armarx::control::common::mp::TSMPInput
Definition: TSMP.h:33
Logging.h
armarx::control::common::mp::TSMPInputPtr
std::shared_ptr< TSMPInput > TSMPInputPtr
Definition: TSMP.h:46
armarx::control::common::mp::TSMPInput::pose
Eigen::Matrix4f pose
Definition: TSMP.h:35
armarx::control::common::mp::MPOutput
Definition: MP.h:56