crocoddyl 1.9.0
Contact RObot COntrol by Differential DYnamic programming Library (Crocoddyl)
 
Loading...
Searching...
No Matches
frame-rotation.hpp
1
2// BSD 3-Clause License
3//
4// Copyright (C) 2019-2021, LAAS-CNRS, University of Edinburgh, INRIA
5// Copyright note valid unless otherwise stated in individual files.
6// All rights reserved.
8
9#ifndef CROCODDYL_MULTIBODY_COSTS_FRAME_ROTATION_HPP_
10#define CROCODDYL_MULTIBODY_COSTS_FRAME_ROTATION_HPP_
11
12#include "crocoddyl/multibody/fwd.hpp"
13#include "crocoddyl/core/costs/residual.hpp"
14#include "crocoddyl/multibody/states/multibody.hpp"
15#include "crocoddyl/multibody/residuals/frame-rotation.hpp"
16#include "crocoddyl/multibody/data/multibody.hpp"
17#include "crocoddyl/core/utils/exception.hpp"
18
19#include "crocoddyl/multibody/frames-deprecated.hpp"
20
21namespace crocoddyl {
22
23#pragma GCC diagnostic push // TODO: Remove once the deprecated FrameXX has been removed in a future release
24#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
25
41template <typename _Scalar>
43 public:
44 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
45
46 typedef _Scalar Scalar;
53 typedef typename MathBase::VectorXs VectorXs;
54 typedef typename MathBase::Matrix3xs Matrix3xs;
55
64 CostModelFrameRotationTpl(boost::shared_ptr<StateMultibody> state,
65 boost::shared_ptr<ActivationModelAbstract> activation, const FrameRotation& Fref,
66 const std::size_t nu);
67
78 CostModelFrameRotationTpl(boost::shared_ptr<StateMultibody> state,
79 boost::shared_ptr<ActivationModelAbstract> activation, const FrameRotation& Fref);
80
91 CostModelFrameRotationTpl(boost::shared_ptr<StateMultibody> state, const FrameRotation& Fref, const std::size_t nu);
92
104 CostModelFrameRotationTpl(boost::shared_ptr<StateMultibody> state, const FrameRotation& Fref);
106
107 protected:
111 virtual void get_referenceImpl(const std::type_info& ti, void* pv);
112
116 virtual void set_referenceImpl(const std::type_info& ti, const void* pv);
117
118 using Base::activation_;
119 using Base::nu_;
120 using Base::residual_;
121 using Base::state_;
122 using Base::unone_;
123
124 private:
125 FrameRotation Rref_;
126};
127
128} // namespace crocoddyl
129
130/* --- Details -------------------------------------------------------------- */
131/* --- Details -------------------------------------------------------------- */
132/* --- Details -------------------------------------------------------------- */
133#include "crocoddyl/multibody/costs/frame-rotation.hxx"
134
135#pragma GCC diagnostic pop
136
137#endif // CROCODDYL_MULTIBODY_COSTS_FRAME_ROTATION_HPP_
CostModelFrameRotationTpl(boost::shared_ptr< StateMultibody > state, boost::shared_ptr< ActivationModelAbstract > activation, const FrameRotation &Fref, const std::size_t nu)
Initialize the frame rotation cost model.
virtual void set_referenceImpl(const std::type_info &ti, const void *pv)
Modify the frame rotation reference.
CostModelFrameRotationTpl(boost::shared_ptr< StateMultibody > state, boost::shared_ptr< ActivationModelAbstract > activation, const FrameRotation &Fref)
Initialize the frame rotation cost model.
CostModelFrameRotationTpl(boost::shared_ptr< StateMultibody > state, const FrameRotation &Fref, const std::size_t nu)
Initialize the frame rotation cost model.
CostModelFrameRotationTpl(boost::shared_ptr< StateMultibody > state, const FrameRotation &Fref)
Initialize the frame rotation cost model.
virtual void get_referenceImpl(const std::type_info &ti, void *pv)
Return the frame rotation reference.
Residual-based cost.
Definition: residual.hpp:36
boost::shared_ptr< ActivationModelAbstract > activation_
Activation model.
Definition: cost-base.hpp:241
boost::shared_ptr< StateAbstract > state_
State description.
Definition: cost-base.hpp:240
std::size_t nu_
Control dimension.
Definition: cost-base.hpp:243
VectorXs unone_
No control vector.
Definition: cost-base.hpp:244
boost::shared_ptr< ResidualModelAbstract > residual_
Residual model.
Definition: cost-base.hpp:242
State multibody representation.
Definition: multibody.hpp:31