- 3.0.2 models module.
HyQWithContactModelLinearizedForward.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 namespace ct {
11 namespace models {
12 namespace HyQ {
13 
15 {
16 public:
18 
23 
24  HyQWithContactModelLinearizedForward(const ct::core::SYSTEM_TYPE& type = ct::core::SYSTEM_TYPE::GENERAL)
25  : ct::core::LinearSystem<36, 12>(type)
26  {
27  initialize();
28  }
29 
32 
33  virtual HyQWithContactModelLinearizedForward* clone() const override
34  {
36  }
37 
38  virtual const state_matrix_t& getDerivativeState(const state_vector_t& x,
39  const control_vector_t& u,
40  const double t = double(0.0)) override;
41 
42  virtual const state_control_matrix_t& getDerivativeControl(const state_vector_t& x,
43  const control_vector_t& u,
44  const double t = double(0.0)) override;
45 
46 private:
47  void initialize()
48  {
49  dFdx_.setZero();
50  dFdu_.setZero();
51  vX_.fill(0.0);
52  vU_.fill(0.0);
53  }
54 
55  state_matrix_t dFdx_;
56  state_control_matrix_t dFdu_;
57  std::array<double, 1697> vX_;
58  std::array<double, 240> vU_;
59 };
60 }
61 }
62 }
Base::state_vector_t state_vector_t
Definition: HyQWithContactModelLinearizedForward.h:19
virtual ~HyQWithContactModelLinearizedForward()
Definition: HyQWithContactModelLinearizedForward.h:31
ct::core::ControlVector< control_dim > u
ct::core::LinearSystem< 36, 12, double > Base
Definition: HyQWithContactModelLinearizedForward.h:17
clear all close all load ct GNMSLog0 mat reformat t
Base::control_vector_t control_vector_t
Definition: HyQWithContactModelLinearizedForward.h:20
Base::state_control_matrix_t state_control_matrix_t
Definition: HyQWithContactModelLinearizedForward.h:22
HyQWithContactModelLinearizedForward(const ct::core::SYSTEM_TYPE &type=ct::core::SYSTEM_TYPE::GENERAL)
Definition: HyQWithContactModelLinearizedForward.h:24
virtual const state_matrix_t & getDerivativeState(const state_vector_t &x, const control_vector_t &u, const double t=double(0.0)) override
Definition: HyQWithContactModelLinearizedForward.cpp:13
Base::state_matrix_t state_matrix_t
Definition: HyQWithContactModelLinearizedForward.h:21
virtual const state_control_matrix_t & getDerivativeControl(const state_vector_t &x, const control_vector_t &u, const double t=double(0.0)) override
Definition: HyQWithContactModelLinearizedForward.cpp:10682
HyQWithContactModelLinearizedForward(const HyQWithContactModelLinearizedForward &other)
Definition: HyQWithContactModelLinearizedForward.h:30
StateVector< 36, double > state_vector_t
virtual HyQWithContactModelLinearizedForward * clone() const override
Definition: HyQWithContactModelLinearizedForward.h:33
ct::core::StateVector< state_dim > x
Definition: HyQWithContactModelLinearizedForward.h:14
ControlVector< 12, double > control_vector_t