crocoddyl 1.9.0
Contact RObot COntrol by Differential DYnamic programming Library (Crocoddyl)
 
Loading...
Searching...
No Matches
contact-impulse.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_IMPULSE_HPP_
10#define CROCODDYL_MULTIBODY_COSTS_CONTACT_IMPULSE_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-force.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
43template <typename _Scalar>
45 public:
46 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
47
48 typedef _Scalar Scalar;
53
57 typedef typename MathBase::VectorXs VectorXs;
58 typedef typename MathBase::MatrixXs MatrixXs;
59
69 CostModelContactImpulseTpl(boost::shared_ptr<StateMultibody> state,
70 boost::shared_ptr<ActivationModelAbstract> activation, const FrameForce& fref);
71
82 CostModelContactImpulseTpl(boost::shared_ptr<StateMultibody> state, const FrameForce& fref, const std::size_t nr);
83
93 CostModelContactImpulseTpl(boost::shared_ptr<StateMultibody> state, const FrameForce& fref);
95
96 protected:
100 virtual void set_referenceImpl(const std::type_info& ti, const void* pv);
101
105 virtual void get_referenceImpl(const std::type_info& ti, void* pv);
106
107 using Base::activation_;
108 using Base::nu_;
109 using Base::residual_;
110 using Base::state_;
111 using Base::unone_;
112
113 protected:
115};
116
117} // namespace crocoddyl
118
119/* --- Details -------------------------------------------------------------- */
120/* --- Details -------------------------------------------------------------- */
121/* --- Details -------------------------------------------------------------- */
122#include "crocoddyl/multibody/costs/contact-impulse.hxx"
123
124#pragma GCC diagnostic pop
125
126#endif // CROCODDYL_MULTIBODY_COSTS_CONTACT_IMPULSE_HPP_
Define a contact impulse cost function.
CostModelContactImpulseTpl(boost::shared_ptr< StateMultibody > state, const FrameForce &fref, const std::size_t nr)
Initialize the contact impulse cost model.
virtual void set_referenceImpl(const std::type_info &ti, const void *pv)
Return the reference spatial impulse .
FrameForce fref_
Reference spatial impulse .
CostModelContactImpulseTpl(boost::shared_ptr< StateMultibody > state, boost::shared_ptr< ActivationModelAbstract > activation, const FrameForce &fref)
Initialize the contact impulse cost model.
CostModelContactImpulseTpl(boost::shared_ptr< StateMultibody > state, const FrameForce &fref)
Initialize the contact impulse cost model.
virtual void get_referenceImpl(const std::type_info &ti, void *pv)
Modify the reference spatial impulse .
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
Define a contact force residual function.
State multibody representation.
Definition: multibody.hpp:31