crocoddyl 1.9.0
Contact RObot COntrol by Differential DYnamic programming Library (Crocoddyl)
 
Loading...
Searching...
No Matches
control-gravity.hpp
1
2// BSD 3-Clause License
3//
4// Copyright (C) 2020-2021, LAAS-CNRS, University of Edinburgh, INRIA
5// Copyright note valid unless otherwise stated in individual files.
6// All rights reserved.
8
9#ifndef CROCODDYL_CORE_COSTS_CONTROL_GRAVITY_HPP_
10#define CROCODDYL_CORE_COSTS_CONTROL_GRAVITY_HPP_
11
12#include "crocoddyl/core/costs/residual.hpp"
13#include "crocoddyl/multibody/states/multibody.hpp"
14#include "crocoddyl/multibody/residuals/control-gravity.hpp"
15#include "crocoddyl/core/utils/exception.hpp"
16
17namespace crocoddyl {
18
35template <typename _Scalar>
37 public:
38 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
39
40 typedef _Scalar Scalar;
46 typedef typename MathBase::VectorXs VectorXs;
47 typedef typename MathBase::MatrixXs MatrixXs;
48
56 CostModelControlGravTpl(boost::shared_ptr<StateMultibody> state,
57 boost::shared_ptr<ActivationModelAbstract> activation, const std::size_t nu);
58
67 CostModelControlGravTpl(boost::shared_ptr<StateMultibody> state,
68 boost::shared_ptr<ActivationModelAbstract> activation);
69
79 CostModelControlGravTpl(boost::shared_ptr<StateMultibody> state, const std::size_t nu);
80
90 explicit CostModelControlGravTpl(boost::shared_ptr<StateMultibody> state);
91
93
94 protected:
96 using Base::nu_;
97 using Base::residual_;
98 using Base::state_;
99 using Base::unone_;
100};
101
102} // namespace crocoddyl
103
104/* --- Details -------------------------------------------------------------- */
105/* --- Details -------------------------------------------------------------- */
106/* --- Details -------------------------------------------------------------- */
107#include "crocoddyl/multibody/costs/control-gravity.hxx"
108
109#endif // CROCODDYL_MULTIBODY_COSTS_CONTROL_GRAVITY_HPP_
CostModelControlGravTpl(boost::shared_ptr< StateMultibody > state, boost::shared_ptr< ActivationModelAbstract > activation, const std::size_t nu)
Initialize the control gravity cost model.
CostModelControlGravTpl(boost::shared_ptr< StateMultibody > state, const std::size_t nu)
Initialize the control gravity cost model.
CostModelControlGravTpl(boost::shared_ptr< StateMultibody > state, boost::shared_ptr< ActivationModelAbstract > activation)
Initialize the control gravity cost model.
CostModelControlGravTpl(boost::shared_ptr< StateMultibody > state)
Initialize the control gravity cost model.
Residual-based cost.
Definition: residual.hpp:36
boost::shared_ptr< ActivationModelAbstract > activation_
Activation model.
Definition: cost-base.hpp:241
boost::shared_ptr< StateAbstract > state_
State description.
Definition: cost-base.hpp:240
std::size_t nu_
Control dimension.
Definition: cost-base.hpp:243
VectorXs unone_
No control vector.
Definition: cost-base.hpp:244
boost::shared_ptr< ResidualModelAbstract > residual_
Residual model.
Definition: cost-base.hpp:242
State multibody representation.
Definition: multibody.hpp:31