crocoddyl
1.9.0
Contact RObot COntrol by Differential DYnamic programming Library (Crocoddyl)
frame-rotation.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_ROTATION_HPP_
10
#define CROCODDYL_MULTIBODY_COSTS_FRAME_ROTATION_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-rotation.hpp"
16
#include "crocoddyl/multibody/data/multibody.hpp"
17
#include "crocoddyl/core/utils/exception.hpp"
18
19
#include "crocoddyl/multibody/frames-deprecated.hpp"
20
21
namespace
crocoddyl {
22
23
#pragma GCC diagnostic push // TODO: Remove once the deprecated FrameXX has been removed in a future release
24
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
25
41
template
<
typename
_Scalar>
42
class
CostModelFrameRotationTpl
:
public
CostModelResidualTpl
<_Scalar> {
43
public
:
44
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
45
46
typedef
_Scalar Scalar;
47
typedef
MathBaseTpl<Scalar>
MathBase
;
48
typedef
CostModelResidualTpl<Scalar>
Base
;
49
typedef
StateMultibodyTpl<Scalar>
StateMultibody
;
50
typedef
ActivationModelAbstractTpl<Scalar>
ActivationModelAbstract
;
51
typedef
ResidualModelFrameRotationTpl<Scalar>
ResidualModelFrameRotation
;
52
typedef
FrameRotationTpl<Scalar>
FrameRotation
;
53
typedef
typename
MathBase::VectorXs VectorXs;
54
typedef
typename
MathBase::Matrix3xs Matrix3xs;
55
64
CostModelFrameRotationTpl
(boost::shared_ptr<StateMultibody> state,
65
boost::shared_ptr<ActivationModelAbstract> activation,
const
FrameRotation
& Fref,
66
const
std::size_t nu);
67
78
CostModelFrameRotationTpl
(boost::shared_ptr<StateMultibody> state,
79
boost::shared_ptr<ActivationModelAbstract> activation,
const
FrameRotation
& Fref);
80
91
CostModelFrameRotationTpl
(boost::shared_ptr<StateMultibody> state,
const
FrameRotation
& Fref,
const
std::size_t nu);
92
104
CostModelFrameRotationTpl
(boost::shared_ptr<StateMultibody> state,
const
FrameRotation
& Fref);
105
virtual
~
CostModelFrameRotationTpl
();
106
107
protected
:
111
virtual
void
get_referenceImpl
(
const
std::type_info& ti,
void
* pv);
112
116
virtual
void
set_referenceImpl
(
const
std::type_info& ti,
const
void
* pv);
117
118
using
Base::activation_
;
119
using
Base::nu_
;
120
using
Base::residual_
;
121
using
Base::state_
;
122
using
Base::unone_
;
123
124
private
:
125
FrameRotation
Rref_;
126
};
127
128
}
// namespace crocoddyl
129
130
/* --- Details -------------------------------------------------------------- */
131
/* --- Details -------------------------------------------------------------- */
132
/* --- Details -------------------------------------------------------------- */
133
#include "crocoddyl/multibody/costs/frame-rotation.hxx"
134
135
#pragma GCC diagnostic pop
136
137
#endif // CROCODDYL_MULTIBODY_COSTS_FRAME_ROTATION_HPP_
crocoddyl::ResidualModelFrameRotationTpl
Frame rotation residual.
Definition:
fwd.hpp:137
crocoddyl::CostModelResidualTpl
Residual-based cost.
Definition:
residual.hpp:36
crocoddyl::MathBaseTpl< Scalar >
crocoddyl::CostModelAbstractTpl::unone_
VectorXs unone_
No control vector.
Definition:
cost-base.hpp:244
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::CostModelFrameRotationTpl
Frame rotation cost.
Definition:
frame-rotation.hpp:42
crocoddyl::FrameRotationTpl< Scalar >
crocoddyl::CostModelFrameRotationTpl::set_referenceImpl
virtual void set_referenceImpl(const std::type_info &ti, const void *pv)
Modify the frame rotation reference.
crocoddyl::StateMultibodyTpl
State multibody representation.
Definition:
fwd.hpp:305
crocoddyl::CostModelAbstractTpl::state_
boost::shared_ptr< StateAbstract > state_
State description.
Definition:
cost-base.hpp:240
crocoddyl::CostModelFrameRotationTpl::get_referenceImpl
virtual void get_referenceImpl(const std::type_info &ti, void *pv)
Return the frame rotation reference.
crocoddyl::CostModelAbstractTpl::residual_
boost::shared_ptr< ResidualModelAbstract > residual_
Residual model.
Definition:
cost-base.hpp:242
crocoddyl::ActivationModelAbstractTpl< Scalar >
crocoddyl::CostModelFrameRotationTpl::CostModelFrameRotationTpl
CostModelFrameRotationTpl(boost::shared_ptr< StateMultibody > state, boost::shared_ptr< ActivationModelAbstract > activation, const FrameRotation &Fref, const std::size_t nu)
Initialize the frame rotation cost model.
crocoddyl::CostModelAbstractTpl::nu_
std::size_t nu_
Control dimension.
Definition:
cost-base.hpp:243
include
crocoddyl
multibody
costs
frame-rotation.hpp
Generated by
1.8.17