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