crocoddyl
1.9.0
Contact RObot COntrol by Differential DYnamic programming Library (Crocoddyl)
frame-velocity.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_VELOCITY_HPP_
10
#define CROCODDYL_MULTIBODY_COSTS_FRAME_VELOCITY_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-velocity.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
42
template
<
typename
_Scalar>
43
class
CostModelFrameVelocityTpl
:
public
CostModelResidualTpl
<_Scalar> {
44
public
:
45
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
46
47
typedef
_Scalar Scalar;
48
typedef
MathBaseTpl<Scalar>
MathBase
;
49
typedef
CostModelResidualTpl<Scalar>
Base
;
50
typedef
CostDataFrameVelocityTpl<Scalar>
Data
;
51
typedef
StateMultibodyTpl<Scalar>
StateMultibody
;
52
typedef
ActivationModelAbstractTpl<Scalar>
ActivationModelAbstract
;
53
typedef
ResidualModelFrameVelocityTpl<Scalar>
ResidualModelFrameVelocity
;
54
typedef
FrameMotionTpl<Scalar>
FrameMotion
;
55
typedef
typename
MathBase::VectorXs VectorXs;
56
65
CostModelFrameVelocityTpl
(boost::shared_ptr<StateMultibody> state,
66
boost::shared_ptr<ActivationModelAbstract> activation,
const
FrameMotion
& Fref,
67
const
std::size_t nu);
68
78
CostModelFrameVelocityTpl
(boost::shared_ptr<StateMultibody> state,
79
boost::shared_ptr<ActivationModelAbstract> activation,
const
FrameMotion
& Fref);
80
90
CostModelFrameVelocityTpl
(boost::shared_ptr<StateMultibody> state,
const
FrameMotion
& Fref,
const
std::size_t nu);
91
101
CostModelFrameVelocityTpl
(boost::shared_ptr<StateMultibody> state,
const
FrameMotion
& Fref);
102
virtual
~
CostModelFrameVelocityTpl
();
103
104
protected
:
108
virtual
void
get_referenceImpl
(
const
std::type_info& ti,
void
* pv);
109
113
virtual
void
set_referenceImpl
(
const
std::type_info& ti,
const
void
* pv);
114
115
using
Base::activation_
;
116
using
Base::nu_
;
117
using
Base::residual_
;
118
using
Base::state_
;
119
using
Base::unone_
;
120
121
private
:
122
FrameMotion
vref_;
123
};
124
125
}
// namespace crocoddyl
126
127
/* --- Details -------------------------------------------------------------- */
128
/* --- Details -------------------------------------------------------------- */
129
/* --- Details -------------------------------------------------------------- */
130
#include "crocoddyl/multibody/costs/frame-velocity.hxx"
131
132
#pragma GCC diagnostic pop
133
134
#endif // CROCODDYL_MULTIBODY_COSTS_FRAME_VELOCITY_HPP_
crocoddyl::CostModelResidualTpl
Residual-based cost.
Definition:
residual.hpp:36
crocoddyl::CostModelFrameVelocityTpl::CostModelFrameVelocityTpl
CostModelFrameVelocityTpl(boost::shared_ptr< StateMultibody > state, boost::shared_ptr< ActivationModelAbstract > activation, const FrameMotion &Fref, const std::size_t nu)
Initialize the frame velocity cost model.
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::CostModelFrameVelocityTpl::get_referenceImpl
virtual void get_referenceImpl(const std::type_info &ti, void *pv)
Return the frame velocity reference.
crocoddyl::ResidualModelFrameVelocityTpl
Frame velocity residual.
Definition:
fwd.hpp:147
crocoddyl::CostModelFrameVelocityTpl::set_referenceImpl
virtual void set_referenceImpl(const std::type_info &ti, const void *pv)
Modify the frame velocity reference.
crocoddyl::CostModelFrameVelocityTpl
Frame velocity cost.
Definition:
frame-velocity.hpp:43
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::CostDataResidualTpl
Definition:
residual.hpp:136
crocoddyl::CostModelAbstractTpl::residual_
boost::shared_ptr< ResidualModelAbstract > residual_
Residual model.
Definition:
cost-base.hpp:242
crocoddyl::ActivationModelAbstractTpl< Scalar >
crocoddyl::FrameMotionTpl< Scalar >
crocoddyl::CostModelAbstractTpl::nu_
std::size_t nu_
Control dimension.
Definition:
cost-base.hpp:243
include
crocoddyl
multibody
costs
frame-velocity.hpp
Generated by
1.8.17