aligator  0.9.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
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), k_(k), mu_(mu), hL_(half_length), hW_(half_width) {}
36
37 void evaluate(const ConstVectorRef &, const ConstVectorRef &u,
38 BaseData &data) const;
39
40 void computeJacobians(const ConstVectorRef &, const ConstVectorRef &,
41 BaseData &data) const;
42
43 shared_ptr<BaseData> createData() const {
44 return std::make_shared<Data>(this);
45 }
46
47protected:
48 int k_; // Contact index corresponding to the contact frame
49 double mu_; // Friction coefficient
50 double hL_; // Half-length of the contact frame
51 double hW_; // Half-width of the contact frame
52};
53
54template <typename Scalar>
56 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
58
59 Eigen::Matrix<Scalar, 17, 6> Jtemp_;
60
63};
64
65} // namespace aligator
66
67#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
68#include "./centroidal-wrench-cone.txx"
69#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
shared_ptr< BaseData > createData() const
Instantiate a Data object.
void evaluate(const ConstVectorRef &, const ConstVectorRef &u, BaseData &data) const
Base struct for function data.
Definition fwd.hpp:62
Class representing ternary functions .
Definition fwd.hpp:56
StageFunctionDataTpl< Scalar > Data