aligator  0.9.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
centroidal-translation.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace aligator {
6
7template <typename Scalar> struct CentroidalCoMDataTpl;
8
9template <typename _Scalar>
11
12public:
13 using Scalar = _Scalar;
16 using BaseData = typename Base::Data;
18
19 CentroidalCoMResidualTpl(const int ndx, const int nu, const Vector3s &p_ref)
20 : Base(ndx, nu, 3), p_ref_(p_ref) {}
21
22 const Vector3s &getReference() const { return p_ref_; }
23 void setReference(const Eigen::Ref<const Vector3s> &p_new) { p_ref_ = p_new; }
24
25 void evaluate(const ConstVectorRef &x, BaseData &data) const;
26
27 void computeJacobians(const ConstVectorRef &, BaseData &data) const;
28
29 shared_ptr<BaseData> createData() const {
30 return std::make_shared<Data>(this);
31 }
32
33protected:
34 Vector3s p_ref_;
35};
36
37template <typename Scalar>
39 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
41
43};
44
45} // namespace aligator
46
47#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
48#include "aligator/modelling/centroidal/centroidal-translation.txx"
49#endif
Main package namespace.
CentroidalCoMDataTpl(const CentroidalCoMResidualTpl< Scalar > *model)
CentroidalCoMResidualTpl(const int ndx, const int nu, const Vector3s &p_ref)
shared_ptr< BaseData > createData() const
Instantiate a Data object.
void evaluate(const ConstVectorRef &x, BaseData &data) const
void computeJacobians(const ConstVectorRef &, BaseData &data) const
void setReference(const Eigen::Ref< const Vector3s > &p_new)
Base struct for function data.
Definition fwd.hpp:62
StageFunctionDataTpl< _Scalar > Data
Represents unary functions of the form , with no control (or next-state) arguments.
Definition fwd.hpp:59