crocoddyl  1.8.0
Contact RObot COntrol by Differential DYnamic programming Library (Crocoddyl)
frame-placement.hpp
1 // BSD 3-Clause License
3 //
4 // Copyright (C) 2019-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_MULTIBODY_COSTS_FRAME_PLACEMENT_HPP_
10 #define CROCODDYL_MULTIBODY_COSTS_FRAME_PLACEMENT_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/frame-placement.hpp"
16 #include "crocoddyl/multibody/frames.hpp"
17 #include "crocoddyl/core/utils/exception.hpp"
18 
19 namespace crocoddyl {
20 
36 template <typename _Scalar>
38  public:
39  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
40 
41  typedef _Scalar Scalar;
48  typedef typename MathBase::VectorXs VectorXs;
49  typedef typename MathBase::Matrix6xs Matrix6xs;
50 
59  CostModelFramePlacementTpl(boost::shared_ptr<StateMultibody> state,
60  boost::shared_ptr<ActivationModelAbstract> activation, const FramePlacement& Fref,
61  const std::size_t nu);
62 
72  CostModelFramePlacementTpl(boost::shared_ptr<StateMultibody> state,
73  boost::shared_ptr<ActivationModelAbstract> activation, const FramePlacement& Fref);
74 
84  CostModelFramePlacementTpl(boost::shared_ptr<StateMultibody> state, const FramePlacement& Fref,
85  const std::size_t nu);
86 
97  CostModelFramePlacementTpl(boost::shared_ptr<StateMultibody> state, const FramePlacement& Fref);
98  virtual ~CostModelFramePlacementTpl();
99 
100  protected:
104  virtual void get_referenceImpl(const std::type_info& ti, void* pv);
105 
109  virtual void set_referenceImpl(const std::type_info& ti, const void* pv);
110 
111  using Base::activation_;
112  using Base::nu_;
113  using Base::residual_;
114  using Base::state_;
115  using Base::unone_;
116 
117  private:
118  FramePlacement Mref_;
119 };
120 
121 } // namespace crocoddyl
122 
123 /* --- Details -------------------------------------------------------------- */
124 /* --- Details -------------------------------------------------------------- */
125 /* --- Details -------------------------------------------------------------- */
126 #include "crocoddyl/multibody/costs/frame-placement.hxx"
127 
128 #endif // CROCODDYL_MULTIBODY_COSTS_FRAME_PLACEMENT_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
CostModelFramePlacementTpl(boost::shared_ptr< StateMultibody > state, boost::shared_ptr< ActivationModelAbstract > activation, const FramePlacement &Fref, const std::size_t nu)
Initialize the frame placement cost model.
virtual void get_referenceImpl(const std::type_info &ti, void *pv)
Return the frame placement reference.
virtual void set_referenceImpl(const std::type_info &ti, const void *pv)
Modify the frame placement reference.
boost::shared_ptr< ActivationModelAbstract > activation_
Activation model.
Definition: cost-base.hpp:235
State multibody representation.
Definition: fwd.hpp:300
Frame placement residual.
Definition: fwd.hpp:132
VectorXs unone_
No control vector.
Definition: cost-base.hpp:238
std::size_t nu_
Control dimension.
Definition: cost-base.hpp:237
boost::shared_ptr< StateAbstract > state_
State description.
Definition: cost-base.hpp:234