aligator  0.9.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
frame-velocity.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/data.hpp>
8#include <pinocchio/multibody/frame.hpp>
9#include <proxsuite-nlp/third-party/polymorphic_cxx14.hpp>
10
11namespace aligator {
12
13template <typename Scalar> struct FrameVelocityDataTpl;
14
15template <typename _Scalar>
17public:
18 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
19 using Scalar = _Scalar;
22 using BaseData = typename Base::Data;
23 using Model = pinocchio::ModelTpl<Scalar>;
24 using ManifoldPtr = xyz::polymorphic<ManifoldAbstractTpl<Scalar>>;
25 using SE3 = pinocchio::SE3Tpl<Scalar>;
26 using Motion = pinocchio::MotionTpl<Scalar>;
28
30
31 FrameVelocityResidualTpl(const int ndx, const int nu, const Model &model,
32 const Motion &velocity,
33 const pinocchio::FrameIndex id,
34 const pinocchio::ReferenceFrame type);
35
36 const Motion &getReference() const { return vref_; }
37 void setReference(const Motion &v_new) { vref_ = v_new; }
38
39 void evaluate(const ConstVectorRef &x, BaseData &data) const;
40 void computeJacobians(const ConstVectorRef &x, BaseData &data) const;
41
42 shared_ptr<BaseData> createData() const {
43 return std::make_shared<Data>(*this);
44 }
45
46protected:
48 pinocchio::ReferenceFrame type_;
49};
50
51template <typename Scalar>
53 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
55 using Motion = pinocchio::MotionTpl<Scalar>;
56
58 pinocchio::DataTpl<Scalar> pin_data_;
59
61};
62
63} // namespace aligator
64
65#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
66#include "aligator/modelling/multibody/frame-velocity.txx"
67#endif
Main package namespace.
pinocchio::MotionTpl< Scalar > Motion
pinocchio::DataTpl< Scalar > pin_data_
Pinocchio data object.
FrameVelocityDataTpl(const FrameVelocityResidualTpl< Scalar > &model)
shared_ptr< BaseData > createData() const
Instantiate a Data object.
pinocchio::SE3Tpl< Scalar > SE3
void evaluate(const ConstVectorRef &x, BaseData &data) const
const Motion & getReference() const
FrameVelocityResidualTpl(const int ndx, const int nu, const Model &model, const Motion &velocity, const pinocchio::FrameIndex id, const pinocchio::ReferenceFrame type)
void setReference(const Motion &v_new)
pinocchio::MotionTpl< Scalar > Motion
pinocchio::ModelTpl< Scalar > Model
xyz::polymorphic< ManifoldAbstractTpl< Scalar > > ManifoldPtr
void computeJacobians(const ConstVectorRef &x, BaseData &data) const
pinocchio::ReferenceFrame type_
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