aligator  0.9.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
frame-translation.hpp
Go to the documentation of this file.
1#pragma once
2
4#include "./fwd.hpp"
5
6#include <pinocchio/multibody/model.hpp>
7#include <pinocchio/multibody/frame.hpp>
8#include <proxsuite-nlp/third-party/polymorphic_cxx14.hpp>
9
10namespace aligator {
11
12template <typename Scalar> struct FrameTranslationDataTpl;
13
14template <typename _Scalar>
16 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
17 using Scalar = _Scalar;
20 using BaseData = typename Base::Data;
21 using Model = pinocchio::ModelTpl<Scalar>;
22 using ManifoldPtr = xyz::polymorphic<ManifoldAbstractTpl<Scalar>>;
23 using SE3 = pinocchio::SE3Tpl<Scalar>;
25
27
28 FrameTranslationResidualTpl(const int ndx, const int nu, const Model &model,
29 const Vector3s &frame_trans,
30 const pinocchio::FrameIndex frame_id);
31
32 const Vector3s &getReference() const { return p_ref_; }
33 void setReference(const Eigen::Ref<const Vector3s> &p_new) { p_ref_ = p_new; }
34
35 void evaluate(const ConstVectorRef &x, BaseData &data) const;
36
37 void computeJacobians(const ConstVectorRef &x, BaseData &data) const;
38
39 shared_ptr<BaseData> createData() const {
40 return std::make_shared<Data>(*this);
41 }
42
43protected:
44 Vector3s p_ref_;
45};
46
47template <typename Scalar>
49 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
51 using PinData = pinocchio::DataTpl<Scalar>;
52
55
57 typename math_types<Scalar>::Matrix6Xs fJf_;
58
60};
61
62} // namespace aligator
63
64#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
65#include "aligator/modelling/multibody/frame-translation.txx"
66#endif
Main package namespace.
PinData pin_data_
Pinocchio data object.
FrameTranslationDataTpl(const FrameTranslationResidualTpl< Scalar > &model)
pinocchio::DataTpl< Scalar > PinData
math_types< Scalar >::Matrix6Xs fJf_
Jacobian of the error, local frame.
void evaluate(const ConstVectorRef &x, BaseData &data) const
shared_ptr< BaseData > createData() const
Instantiate a Data object.
pinocchio::ModelTpl< Scalar > Model
xyz::polymorphic< ManifoldAbstractTpl< Scalar > > ManifoldPtr
FrameTranslationResidualTpl(const int ndx, const int nu, const Model &model, const Vector3s &frame_trans, const pinocchio::FrameIndex frame_id)
void computeJacobians(const ConstVectorRef &x, 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