- 3.0.2 models module.
HyQWithContactModelLinearizedReverse.h
Go to the documentation of this file.
1 /**********************************************************************************************************************
2 This file is part of the Control Toolbox (https://github.com/ethz-adrl/control-toolbox), copyright by ETH Zurich.
3 Licensed under the BSD-2 license (see LICENSE file in main directory)
4 **********************************************************************************************************************/
5 
6 #pragma once
7 
8 #include <ct/core/core.h>
9 
10 
11 namespace ct {
12 namespace models {
13 namespace HyQ {
14 
16 {
17 public:
20 
21  HyQWithContactModelLinearizedReverse(const ct::core::SYSTEM_TYPE& type = ct::core::SYSTEM_TYPE::GENERAL)
22  : ct::core::LinearSystem<36, 12>(type)
23  {
24  initialize();
25  }
26 
29 
30  virtual HyQWithContactModelLinearizedReverse* clone() const override
31  {
33  }
34 
35  virtual const state_matrix_t& getDerivativeState(const ct::core::StateVector<36>& x,
37  const double t = 0.0) override;
38 
39  virtual const state_control_matrix_t& getDerivativeControl(const ct::core::StateVector<36>& x,
41  const double t = 0.0) override;
42 
43 private:
44  void initialize()
45  {
46  dFdx_.setZero();
47  dFdu_.setZero();
48  vX_.fill(0.0);
49  vU_.fill(0.0);
50  }
51 
52  state_matrix_t dFdx_;
53  state_control_matrix_t dFdu_;
54  std::array<double, 9379> vX_;
55  std::array<double, 383> vU_;
56 };
57 } // namespace HyQ
58 } // namespace models
59 } // namespace ct
ct::core::StateControlMatrix< 36, 12, double > state_control_matrix_t
Definition: HyQWithContactModelLinearizedReverse.h:19
virtual const state_control_matrix_t & getDerivativeControl(const ct::core::StateVector< 36 > &x, const ct::core::ControlVector< 12 > &u, const double t=0.0) override
Definition: HyQWithContactModelLinearizedReverse.cpp:65824
ct::core::ControlVector< control_dim > u
virtual ~HyQWithContactModelLinearizedReverse()
Definition: HyQWithContactModelLinearizedReverse.h:28
ct::core::StateMatrix< 36, double > state_matrix_t
Definition: HyQWithContactModelLinearizedReverse.h:18
clear all close all load ct GNMSLog0 mat reformat t
virtual const state_matrix_t & getDerivativeState(const ct::core::StateVector< 36 > &x, const ct::core::ControlVector< 12 > &u, const double t=0.0) override
Definition: HyQWithContactModelLinearizedReverse.cpp:14
Definition: HyQWithContactModelLinearizedReverse.h:15
HyQWithContactModelLinearizedReverse(const ct::core::SYSTEM_TYPE &type=ct::core::SYSTEM_TYPE::GENERAL)
Definition: HyQWithContactModelLinearizedReverse.h:21
ct::core::StateVector< state_dim > x
HyQWithContactModelLinearizedReverse(const HyQWithContactModelLinearizedReverse &other)
Definition: HyQWithContactModelLinearizedReverse.h:27
virtual HyQWithContactModelLinearizedReverse * clone() const override
Definition: HyQWithContactModelLinearizedReverse.h:30