aligator  0.15.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
centroidal-wrench-cone.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace aligator {
6
19
20template <typename Scalar> struct CentroidalWrenchConeDataTpl;
21
22template <typename _Scalar>
24
25public:
26 using Scalar = _Scalar;
29 using BaseData = typename Base::Data;
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
51protected:
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
58template <typename Scalar>
60 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
62
63 Eigen::Matrix<Scalar, 17, 6> Jtemp_;
64
67};
68
69} // namespace aligator
70
71#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
72#include "./centroidal-wrench-cone.txx"
73#endif
Base definitions for ternary functions.
Main package namespace.
This residual implements the wrench cone for a centroidal model with control with 6D spatial force.
CentroidalWrenchConeDataTpl(const CentroidalWrenchConeResidualTpl< Scalar > *model)
CentroidalWrenchConeResidualTpl(const int ndx, const int nu, const int k, const double mu, const double half_length, const double half_width)
void computeJacobians(const ConstVectorRef &, const ConstVectorRef &, BaseData &data) const
CentroidalWrenchConeDataTpl< Scalar > Data
shared_ptr< BaseData > createData() const
Instantiate a Data object.
void evaluate(const ConstVectorRef &, const ConstVectorRef &u, BaseData &data) const
StageFunctionDataTpl(const int ndx, const int nu, const int nr)
const int nu
Control dimension.
StageFunctionDataTpl< Scalar > Data
StageFunctionTpl(const int ndx, const int nu, const int nr)