JSMP.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 
28 #include <armarx/control/common/mp/aron/MPConfig.aron.generated.h>
29 
30 #include "MP.h"
31 
33 {
34  struct JSMPInput : virtual MPInput
35  {
36  Eigen::VectorXf angleRadian;
37  Eigen::VectorXf angularVel;
38  double deltaT;
39  };
40 
41  struct JSMPOutput : virtual MPOutput
42  {
43  Eigen::VectorXf angleRadian;
44  Eigen::VectorXf angularVel;
45  };
46 
47  using JSMPInputPtr = std::shared_ptr<JSMPInput>;
48  using JSMPOutputPtr = std::shared_ptr<JSMPOutput>;
49 
50  class JSMP : virtual public MP
51  {
52  public:
53  JSMP(const arondto::MPConfig& c);
54  ~JSMP(){};
55 
56  void run(MPInputPtr, MPOutputPtr) override;
57 
59  };
60 
61  typedef std::shared_ptr<JSMP> JSMPPtr;
62 
63 } // namespace armarx::control::common::mp
armarx::control::common::mp::MP
Definition: MP.h:67
armarx::control::common::mp::JSMPInputPtr
std::shared_ptr< JSMPInput > JSMPInputPtr
Definition: JSMP.h:47
armarx::control::common::mp::JSMPInput::angularVel
Eigen::VectorXf angularVel
Definition: JSMP.h:37
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::JSMP::JSMP
JSMP(const arondto::MPConfig &c)
Definition: JSMP.cpp:15
armarx::control::common::mp::JSMPOutput
Definition: JSMP.h:41
armarx::control::common::mp::JSMPOutputPtr
std::shared_ptr< JSMPOutput > JSMPOutputPtr
Definition: JSMP.h:48
armarx::control::common::mp::JSMPInput::deltaT
double deltaT
Definition: JSMP.h:38
armarx::control::common::mp::JSMPOutput::angularVel
Eigen::VectorXf angularVel
Definition: JSMP.h:44
MP.h
GfxTL::Identity
void Identity(MatrixXX< N, N, T > *a)
Definition: MatrixXX.h:523
armarx::control::common::mp::JSMPPtr
std::shared_ptr< JSMP > JSMPPtr
Definition: JSMP.h:61
armarx::control::common::mp::MPInputPtr
std::shared_ptr< MPInput > MPInputPtr
Definition: MP.h:63
armarx::control::common::mp::MPInput
Definition: MP.h:49
armarx::control::common::mp::JSMP::run
void run(MPInputPtr, MPOutputPtr) override
Definition: JSMP.cpp:31
armarx::control::common::mp::JSMP::previousAngularVelocity
Eigen::Quaterniond previousAngularVelocity
Definition: JSMP.h:58
TripleBuffer.h
armarx::control::common::mp::MPOutputPtr
std::shared_ptr< MPOutput > MPOutputPtr
Definition: MP.h:64
armarx::control::common::mp::JSMP::~JSMP
~JSMP()
Definition: JSMP.h:54
armarx::control::common::mp::JSMP
Definition: JSMP.h:50
armarx::control::common::mp::JSMPInput
Definition: JSMP.h:34
Eigen::Quaterniond
Quaternion< double, 0 > Quaterniond
Definition: EigenForwardDeclarations.h:62
Logging.h
armarx::control::common::mp::JSMPOutput::angleRadian
Eigen::VectorXf angleRadian
Definition: JSMP.h:43
armarx::control::common::mp::JSMPInput::angleRadian
Eigen::VectorXf angleRadian
Definition: JSMP.h:36
armarx::control::common::mp::MPOutput
Definition: MP.h:56