crocoddyl  1.8.0
Contact RObot COntrol by Differential DYnamic programming Library (Crocoddyl)
impulse-wrench-cone.hpp
1 // BSD 3-Clause License
3 //
4 // Copyright (C) 2020-2021, University of Edinburgh, INRIA
5 // Copyright note valid unless otherwise stated in individual files.
6 // All rights reserved.
8 
9 #ifndef CROCODDYL_MULTIBODY_COSTS_IMPULSE_WRENCH_CONE_HPP_
10 #define CROCODDYL_MULTIBODY_COSTS_IMPULSE_WRENCH_CONE_HPP_
11 
12 #include "crocoddyl/multibody/fwd.hpp"
13 #include "crocoddyl/core/costs/residual.hpp"
14 #include "crocoddyl/multibody/states/multibody.hpp"
15 #include "crocoddyl/multibody/residuals/contact-wrench-cone.hpp"
16 #include "crocoddyl/multibody/frames.hpp"
17 #include "crocoddyl/core/utils/exception.hpp"
18 
19 namespace crocoddyl {
20 
21 template <typename _Scalar>
23  public:
24  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
25 
26  typedef _Scalar Scalar;
33  typedef typename MathBase::VectorXs VectorXs;
34  typedef typename MathBase::MatrixXs MatrixXs;
35  typedef typename MathBase::MatrixX6s MatrixX6s;
36 
37  CostModelImpulseWrenchConeTpl(boost::shared_ptr<StateMultibody> state,
38  boost::shared_ptr<ActivationModelAbstract> activation, const FrameWrenchCone& fref);
39  CostModelImpulseWrenchConeTpl(boost::shared_ptr<StateMultibody> state, const FrameWrenchCone& fref);
41 
42  protected:
43  virtual void set_referenceImpl(const std::type_info& ti, const void* pv);
44  virtual void get_referenceImpl(const std::type_info& ti, void* pv);
45 
46  using Base::activation_;
47  using Base::residual_;
48  using Base::state_;
49 
50  private:
51  FrameWrenchCone fref_;
52 };
53 
54 } // namespace crocoddyl
55 
56 /* --- Details -------------------------------------------------------------- */
57 /* --- Details -------------------------------------------------------------- */
58 /* --- Details -------------------------------------------------------------- */
59 #include "crocoddyl/multibody/costs/impulse-wrench-cone.hxx"
60 
61 #endif // CROCODDYL_MULTIBODY_COSTS_IMPULSE_WRENCH_CONE_HPP_
boost::shared_ptr< ResidualModelAbstract > residual_
Residual model.
Definition: cost-base.hpp:236
Abstract class for cost models.
Definition: cost-base.hpp:49
Residual-based cost.
Definition: residual.hpp:36
boost::shared_ptr< ActivationModelAbstract > activation_
Activation model.
Definition: cost-base.hpp:235
State multibody representation.
Definition: fwd.hpp:300
virtual void get_referenceImpl(const std::type_info &ti, void *pv)
Contact wrench cone residual function.
Definition: fwd.hpp:117
virtual void set_referenceImpl(const std::type_info &ti, const void *pv)
boost::shared_ptr< StateAbstract > state_
State description.
Definition: cost-base.hpp:234