crocoddyl 1.9.0
Contact RObot COntrol by Differential DYnamic programming Library (Crocoddyl)
 
Loading...
Searching...
No Matches
contact-wrench-cone.hpp
1
2// 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_CONTACT_WRENCH_CONE_HPP_
10#define CROCODDYL_MULTIBODY_COSTS_CONTACT_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/core/utils/exception.hpp"
17
18#include "crocoddyl/multibody/frames-deprecated.hpp"
19
20namespace crocoddyl {
21
22#pragma GCC diagnostic push // TODO: Remove once the deprecated FrameXX has been removed in a future release
23#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
24
25template <typename _Scalar>
27 public:
28 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
29
30 typedef _Scalar Scalar;
37 typedef typename MathBase::VectorXs VectorXs;
38 typedef typename MathBase::MatrixXs MatrixXs;
39 typedef typename MathBase::MatrixX6s MatrixX6s;
40
41 CostModelContactWrenchConeTpl(boost::shared_ptr<StateMultibody> state,
42 boost::shared_ptr<ActivationModelAbstract> activation, const FrameWrenchCone& fref,
43 const std::size_t nu);
44 CostModelContactWrenchConeTpl(boost::shared_ptr<StateMultibody> state,
45 boost::shared_ptr<ActivationModelAbstract> activation, const FrameWrenchCone& fref);
46 CostModelContactWrenchConeTpl(boost::shared_ptr<StateMultibody> state, const FrameWrenchCone& fref,
47 const std::size_t nu);
48 CostModelContactWrenchConeTpl(boost::shared_ptr<StateMultibody> state, const FrameWrenchCone& fref);
50
51 protected:
52 virtual void set_referenceImpl(const std::type_info& ti, const void* pv);
53 virtual void get_referenceImpl(const std::type_info& ti, void* pv);
54
56 using Base::nu_;
57 using Base::residual_;
58 using Base::state_;
59 using Base::unone_;
60
61 private:
62 FrameWrenchCone fref_;
63};
64
65} // namespace crocoddyl
66
67/* --- Details -------------------------------------------------------------- */
68/* --- Details -------------------------------------------------------------- */
69/* --- Details -------------------------------------------------------------- */
70#include "crocoddyl/multibody/costs/contact-wrench-cone.hxx"
71
72#pragma GCC diagnostic pop
73
74#endif // CROCODDYL_MULTIBODY_COSTS_CONTACT_WRENCH_CONE_HPP_
virtual void set_referenceImpl(const std::type_info &ti, const void *pv)
Modify the cost reference.
virtual void get_referenceImpl(const std::type_info &ti, void *pv)
Return the cost reference.
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
Contact wrench cone residual function.
State multibody representation.
Definition: multibody.hpp:31