aligator
0.19.0
A versatile and efficient C++ library for real-time constrained trajectory optimization.
Toggle main menu visibility
Loading...
Searching...
No Matches
centroidal-wrench-cone.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
aligator/core/function-abstract.hpp
"
4
5
namespace
aligator
{
6
19
20
template
<
typename
Scalar>
struct
CentroidalWrenchConeDataTpl
;
21
22
template
<
typename
_Scalar>
23
struct
CentroidalWrenchConeResidualTpl
:
StageFunctionTpl
<_Scalar> {
24
25
public
:
26
using
Scalar
= _Scalar;
27
ALIGATOR_DYNAMIC_TYPEDEFS
(
Scalar
);
28
using
Base
=
StageFunctionTpl<Scalar>
;
29
using
BaseData
=
typename
Base::Data
;
30
using
Data
=
CentroidalWrenchConeDataTpl<Scalar>
;
31
32
CentroidalWrenchConeResidualTpl
(
const
int
ndx,
const
int
nu
,
const
int
k,
33
const
double
mu,
const
double
half_length,
34
const
double
half_width)
35
:
Base
(ndx,
nu
, 17)
36
,
k_
(k)
37
,
mu_
(mu)
38
,
hL_
(half_length)
39
,
hW_
(half_width) {}
40
41
void
evaluate
(
const
ConstVectorRef &,
const
ConstVectorRef &u,
42
BaseData
&data)
const
;
43
44
void
computeJacobians
(
const
ConstVectorRef &,
const
ConstVectorRef &,
45
BaseData
&data)
const
;
46
47
shared_ptr<BaseData>
createData
()
const
{
48
return
std::make_shared<Data>(
this
);
49
}
50
51
protected
:
52
int
k_
;
// Contact index corresponding to the contact frame
53
double
mu_
;
// Friction coefficient
54
double
hL_
;
// Half-length of the contact frame
55
double
hW_
;
// Half-width of the contact frame
56
};
57
58
template
<
typename
Scalar>
59
struct
CentroidalWrenchConeDataTpl
:
StageFunctionDataTpl
<Scalar> {
60
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
61
using
Base
=
StageFunctionDataTpl<Scalar>
;
62
63
Eigen::Matrix<Scalar, 17, 6>
Jtemp_
;
64
65
CentroidalWrenchConeDataTpl
(
66
const
CentroidalWrenchConeResidualTpl<Scalar>
*model);
67
};
68
69
}
// namespace aligator
70
71
#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
72
#include "./centroidal-wrench-cone.txx"
73
#endif
function-abstract.hpp
Base definitions for ternary functions.
aligator
Main package namespace.
Definition
action-model-wrap.hpp:14
aligator::CentroidalWrenchConeDataTpl
This residual implements the wrench cone for a centroidal model with control with 6D spatial force.
Definition
centroidal-wrench-cone.hpp:59
aligator::CentroidalWrenchConeDataTpl::Jtemp_
Eigen::Matrix< Scalar, 17, 6 > Jtemp_
Definition
centroidal-wrench-cone.hpp:63
aligator::CentroidalWrenchConeDataTpl::CentroidalWrenchConeDataTpl
CentroidalWrenchConeDataTpl(const CentroidalWrenchConeResidualTpl< Scalar > *model)
aligator::CentroidalWrenchConeDataTpl::Base
StageFunctionDataTpl< Scalar > Base
Definition
centroidal-wrench-cone.hpp:61
aligator::CentroidalWrenchConeResidualTpl
Definition
centroidal-wrench-cone.hpp:23
aligator::CentroidalWrenchConeResidualTpl::k_
int k_
Definition
centroidal-wrench-cone.hpp:52
aligator::CentroidalWrenchConeResidualTpl::CentroidalWrenchConeResidualTpl
CentroidalWrenchConeResidualTpl(const int ndx, const int nu, const int k, const double mu, const double half_length, const double half_width)
Definition
centroidal-wrench-cone.hpp:32
aligator::CentroidalWrenchConeResidualTpl::BaseData
typename Base::Data BaseData
Definition
centroidal-wrench-cone.hpp:29
aligator::CentroidalWrenchConeResidualTpl::computeJacobians
void computeJacobians(const ConstVectorRef &, const ConstVectorRef &, BaseData &data) const
aligator::CentroidalWrenchConeResidualTpl::Data
CentroidalWrenchConeDataTpl< Scalar > Data
Definition
centroidal-wrench-cone.hpp:30
aligator::CentroidalWrenchConeResidualTpl::createData
shared_ptr< BaseData > createData() const
Instantiate a Data object.
Definition
centroidal-wrench-cone.hpp:47
aligator::CentroidalWrenchConeResidualTpl::hL_
double hL_
Definition
centroidal-wrench-cone.hpp:54
aligator::CentroidalWrenchConeResidualTpl::Scalar
_Scalar Scalar
Definition
centroidal-wrench-cone.hpp:26
aligator::CentroidalWrenchConeResidualTpl::Base
StageFunctionTpl< Scalar > Base
Definition
centroidal-wrench-cone.hpp:28
aligator::CentroidalWrenchConeResidualTpl::mu_
double mu_
Definition
centroidal-wrench-cone.hpp:53
aligator::CentroidalWrenchConeResidualTpl::evaluate
void evaluate(const ConstVectorRef &, const ConstVectorRef &u, BaseData &data) const
aligator::CentroidalWrenchConeResidualTpl::ALIGATOR_DYNAMIC_TYPEDEFS
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
aligator::CentroidalWrenchConeResidualTpl::hW_
double hW_
Definition
centroidal-wrench-cone.hpp:55
aligator::StageFunctionDataTpl< Scalar >::StageFunctionDataTpl
StageFunctionDataTpl(const int ndx, const int nu, const int nr)
aligator::StageFunctionTpl::nu
const int nu
Control dimension.
Definition
function-abstract.hpp:21
aligator::StageFunctionTpl< Scalar >::Data
StageFunctionDataTpl< Scalar > Data
Definition
function-abstract.hpp:16
aligator::StageFunctionTpl::StageFunctionTpl
StageFunctionTpl(const int ndx, const int nu, const int nr)
include
aligator
modelling
centroidal
centroidal-wrench-cone.hpp
Generated by
1.17.0