crocoddyl 1.9.0
Contact RObot COntrol by Differential DYnamic programming Library (Crocoddyl)
 
Loading...
Searching...
No Matches
contact-force.hpp
1
2// 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_CONTACT_FORCE_HPP_
10#define CROCODDYL_MULTIBODY_COSTS_CONTACT_FORCE_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
17#include "crocoddyl/multibody/frames-deprecated.hpp"
18
19namespace crocoddyl {
20
21#pragma GCC diagnostic push // TODO: Remove once the deprecated FrameXX has been removed in a future release
22#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
23
42template <typename _Scalar>
44 public:
45 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
46
47 typedef _Scalar Scalar;
54 typedef typename MathBase::VectorXs VectorXs;
55 typedef typename MathBase::MatrixXs MatrixXs;
56
67 CostModelContactForceTpl(boost::shared_ptr<StateMultibody> state,
68 boost::shared_ptr<ActivationModelAbstract> activation, const FrameForce& fref,
69 const std::size_t nu);
70
81 CostModelContactForceTpl(boost::shared_ptr<StateMultibody> state,
82 boost::shared_ptr<ActivationModelAbstract> activation, const FrameForce& fref);
83
95 CostModelContactForceTpl(boost::shared_ptr<StateMultibody> state, const FrameForce& fref, const std::size_t nr,
96 const std::size_t nu);
97
109 CostModelContactForceTpl(boost::shared_ptr<StateMultibody> state, const FrameForce& fref, const std::size_t nr);
110
120 CostModelContactForceTpl(boost::shared_ptr<StateMultibody> state, const FrameForce& fref);
122
123 protected:
127 virtual void get_referenceImpl(const std::type_info& ti, void* pv);
128
132 virtual void set_referenceImpl(const std::type_info& ti, const void* pv);
133
134 using Base::activation_;
135 using Base::nu_;
136 using Base::residual_;
137 using Base::state_;
138 using Base::unone_;
139
140 protected:
142};
143
144} // namespace crocoddyl
145
146/* --- Details -------------------------------------------------------------- */
147/* --- Details -------------------------------------------------------------- */
148/* --- Details -------------------------------------------------------------- */
149#include "crocoddyl/multibody/costs/contact-force.hxx"
150
151#pragma GCC diagnostic pop
152
153#endif // CROCODDYL_MULTIBODY_COSTS_CONTACT_FORCE_HPP_
Define a contact force cost function.
CostModelContactForceTpl(boost::shared_ptr< StateMultibody > state, const FrameForce &fref, const std::size_t nr)
Initialize the contact force cost model.
CostModelContactForceTpl(boost::shared_ptr< StateMultibody > state, boost::shared_ptr< ActivationModelAbstract > activation, const FrameForce &fref, const std::size_t nu)
Initialize the contact force cost model.
CostModelContactForceTpl(boost::shared_ptr< StateMultibody > state, boost::shared_ptr< ActivationModelAbstract > activation, const FrameForce &fref)
Initialize the contact force cost model.
virtual void set_referenceImpl(const std::type_info &ti, const void *pv)
Return the reference spatial contact force .
CostModelContactForceTpl(boost::shared_ptr< StateMultibody > state, const FrameForce &fref)
Initialize the contact force cost model.
FrameForce fref_
Reference spatial contact force .
CostModelContactForceTpl(boost::shared_ptr< StateMultibody > state, const FrameForce &fref, const std::size_t nr, const std::size_t nu)
Initialize the contact force cost model.
virtual void get_referenceImpl(const std::type_info &ti, void *pv)
Modify the reference spatial contact force .
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