crocoddyl
1.9.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/core/utils/exception.hpp"
17
18
#include "crocoddyl/multibody/frames-deprecated.hpp"
19
20
namespace
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
25
template
<
typename
_Scalar>
26
class
CostModelImpulseWrenchConeTpl
:
public
CostModelResidualTpl
<_Scalar> {
27
public
:
28
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
29
30
typedef
_Scalar Scalar;
31
typedef
MathBaseTpl<Scalar>
MathBase
;
32
typedef
CostModelResidualTpl<Scalar>
Base
;
33
typedef
StateMultibodyTpl<Scalar>
StateMultibody
;
34
typedef
ActivationModelAbstractTpl<Scalar>
ActivationModelAbstract
;
35
typedef
ResidualModelContactWrenchConeTpl<Scalar>
ResidualModelContactWrenchCone
;
36
typedef
FrameWrenchConeTpl<Scalar>
FrameWrenchCone
;
37
typedef
typename
MathBase::VectorXs VectorXs;
38
typedef
typename
MathBase::MatrixXs MatrixXs;
39
typedef
typename
MathBase::MatrixX6s MatrixX6s;
40
41
CostModelImpulseWrenchConeTpl
(boost::shared_ptr<StateMultibody> state,
42
boost::shared_ptr<ActivationModelAbstract> activation,
const
FrameWrenchCone
& fref);
43
CostModelImpulseWrenchConeTpl
(boost::shared_ptr<StateMultibody> state,
const
FrameWrenchCone
& fref);
44
virtual
~
CostModelImpulseWrenchConeTpl
();
45
46
protected
:
47
virtual
void
set_referenceImpl
(
const
std::type_info& ti,
const
void
* pv);
48
virtual
void
get_referenceImpl
(
const
std::type_info& ti,
void
* pv);
49
50
using
Base::activation_
;
51
using
Base::residual_
;
52
using
Base::state_
;
53
54
private
:
55
FrameWrenchCone
fref_;
56
};
57
58
}
// namespace crocoddyl
59
60
/* --- Details -------------------------------------------------------------- */
61
/* --- Details -------------------------------------------------------------- */
62
/* --- Details -------------------------------------------------------------- */
63
#include "crocoddyl/multibody/costs/impulse-wrench-cone.hxx"
64
65
#pragma GCC diagnostic pop
66
67
#endif // CROCODDYL_MULTIBODY_COSTS_IMPULSE_WRENCH_CONE_HPP_
crocoddyl::CostModelImpulseWrenchConeTpl::get_referenceImpl
virtual void get_referenceImpl(const std::type_info &ti, void *pv)
Return the cost reference.
crocoddyl::CostModelImpulseWrenchConeTpl::set_referenceImpl
virtual void set_referenceImpl(const std::type_info &ti, const void *pv)
Modify the cost reference.
crocoddyl::CostModelResidualTpl
Residual-based cost.
Definition:
residual.hpp:36
crocoddyl::MathBaseTpl< Scalar >
crocoddyl::CostModelAbstractTpl::activation_
boost::shared_ptr< ActivationModelAbstract > activation_
Activation model.
Definition:
cost-base.hpp:241
crocoddyl::CostModelAbstractTpl
Abstract class for cost models.
Definition:
cost-base.hpp:49
crocoddyl::ResidualModelContactWrenchConeTpl
Contact wrench cone residual function.
Definition:
fwd.hpp:117
crocoddyl::StateMultibodyTpl
State multibody representation.
Definition:
fwd.hpp:305
crocoddyl::CostModelImpulseWrenchConeTpl
Definition:
impulse-wrench-cone.hpp:26
crocoddyl::CostModelAbstractTpl::state_
boost::shared_ptr< StateAbstract > state_
State description.
Definition:
cost-base.hpp:240
crocoddyl::CostModelAbstractTpl::residual_
boost::shared_ptr< ResidualModelAbstract > residual_
Residual model.
Definition:
cost-base.hpp:242
crocoddyl::ActivationModelAbstractTpl< Scalar >
crocoddyl::FrameWrenchConeTpl< Scalar >
include
crocoddyl
multibody
costs
impulse-wrench-cone.hpp
Generated by
1.8.17