Crocoddyl
Loading...
Searching...
No Matches
ControlParametrizationModelNumDiffTpl< _Scalar > Class Template Reference
Inheritance diagram for ControlParametrizationModelNumDiffTpl< _Scalar >:
ControlParametrizationModelAbstractTpl< _Scalar >ControlParametrizationModelBase

Public Types

typedef ControlParametrizationModelAbstractTpl< _Scalar > Base
typedef ControlParametrizationDataAbstractTpl< _Scalar > ControlParametrizationDataAbstract
typedef ControlParametrizationDataNumDiffTpl< _Scalar > Data
typedef MathBaseTpl< Scalar > MathBase
typedef MathBase::MatrixXs MatrixXs
typedef MathBase::VectorXs VectorXs
Public Types inherited from ControlParametrizationModelAbstractTpl< _Scalar >
typedef ControlParametrizationDataAbstractTpl< Scalar > ControlParametrizationDataAbstract
typedef MathBaseTpl< Scalar > MathBase
typedef MathBase::MatrixXs MatrixXs
typedef MathBase::VectorXs VectorXs

Public Member Functions

 ControlParametrizationModelNumDiffTpl (std::shared_ptr< Base > model)
 Construct a new ControlParametrizationModelNumDiff object.
void calc (const std::shared_ptr< ControlParametrizationDataAbstract > &data, const Scalar t, const Eigen::Ref< const VectorXs > &u) const override
 Get the value of the control at the specified time.
void calcDiff (const std::shared_ptr< ControlParametrizationDataAbstract > &data, const Scalar t, const Eigen::Ref< const VectorXs > &u) const override
 Get the value of the Jacobian of the control with respect to the parameters.
template<typename NewScalar>
ControlParametrizationModelNumDiffTpl< NewScalar > cast () const
void convertBounds (const Eigen::Ref< const VectorXs > &w_lb, const Eigen::Ref< const VectorXs > &w_ub, Eigen::Ref< VectorXs > u_lb, Eigen::Ref< VectorXs > u_ub) const override
 Convert the bounds on the control to bounds on the control parameters.
virtual std::shared_ptr< ControlParametrizationDataAbstractcreateData () override
 Create the control-parametrization data.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW CROCODDYL_DERIVED_CAST (ControlParametrizationModelBase, ControlParametrizationModelNumDiffTpl) typedef _Scalar Scalar
const Scalar get_disturbance () const
 Return the disturbance constant used in the numerical differentiation routine.
const std::shared_ptr< Base > & get_model () const
 Get the model_ object.
void multiplyByJacobian (const std::shared_ptr< ControlParametrizationDataAbstract > &data, const Eigen::Ref< const MatrixXs > &A, Eigen::Ref< MatrixXs > out, const AssignmentOp=setto) const override
 Compute the product between a specified matrix and the Jacobian of the control (with respect to the parameters)
void multiplyJacobianTransposeBy (const std::shared_ptr< ControlParametrizationDataAbstract > &data, const Eigen::Ref< const MatrixXs > &A, Eigen::Ref< MatrixXs > out, const AssignmentOp=setto) const override
 Compute the product between the transposed Jacobian of the control (with respect to the parameters) and a specified matrix.
void params (const std::shared_ptr< ControlParametrizationDataAbstract > &data, const Scalar t, const Eigen::Ref< const VectorXs > &w) const override
 Get a value of the control parameters such that the control at the specified time t is equal to the specified value u.
void set_disturbance (const Scalar disturbance)
 Modify the disturbance constant used in the numerical differentiation routine.
Public Member Functions inherited from ControlParametrizationModelAbstractTpl< _Scalar >
 ControlParametrizationModelAbstractTpl (const std::size_t nw, const std::size_t nu)
 Initialize the control dimensions.
virtual void calc (const std::shared_ptr< ControlParametrizationDataAbstract > &data, const Scalar t, const Eigen::Ref< const VectorXs > &u) const =0
 Get the value of the control at the specified time.
virtual void calcDiff (const std::shared_ptr< ControlParametrizationDataAbstract > &data, const Scalar t, const Eigen::Ref< const VectorXs > &u) const =0
 Get the value of the Jacobian of the control with respect to the parameters.
virtual bool checkData (const std::shared_ptr< ControlParametrizationDataAbstract > &data)
 Checks that a specific data belongs to this model.
std::size_t get_nu () const
 Return the dimension of control parameters.
std::size_t get_nw () const
 Return the dimension of the control inputs.
virtual void multiplyByJacobian (const std::shared_ptr< ControlParametrizationDataAbstract > &data, const Eigen::Ref< const MatrixXs > &A, Eigen::Ref< MatrixXs > out, const AssignmentOp op=setto) const =0
 Compute the product between the given matrix A and the derivative of the control input with respect to the control parameters (i.e., A*dw_du).
virtual MatrixXs multiplyByJacobian_J (const std::shared_ptr< ControlParametrizationDataAbstract > &data, const Eigen::Ref< const MatrixXs > &A, const AssignmentOp op=setto) const
virtual void multiplyJacobianTransposeBy (const std::shared_ptr< ControlParametrizationDataAbstract > &data, const Eigen::Ref< const MatrixXs > &A, Eigen::Ref< MatrixXs > out, const AssignmentOp op=setto) const =0
 Compute the product between the transpose of the derivative of the control input with respect to the control parameters and a given matrix A (i.e., dw_du^T*A)
virtual MatrixXs multiplyJacobianTransposeBy_J (const std::shared_ptr< ControlParametrizationDataAbstract > &data, const Eigen::Ref< const MatrixXs > &A, const AssignmentOp op=setto) const
virtual void params (const std::shared_ptr< ControlParametrizationDataAbstract > &data, const Scalar t, const Eigen::Ref< const VectorXs > &w) const =0
 Update the control parameters u for a specified time t given the control input w.
virtual void print (std::ostream &os) const
 Print relevant information of the control model.

Protected Attributes

std::size_t nu_
 Control parameters dimension.
std::size_t nw_
 Control dimension.
Protected Attributes inherited from ControlParametrizationModelAbstractTpl< _Scalar >
std::size_t nu_
 Control parameters dimension.
std::size_t nw_
 Control dimension.

Additional Inherited Members

Public Attributes inherited from ControlParametrizationModelAbstractTpl< _Scalar >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar

Detailed Description

template<typename _Scalar>
class crocoddyl::ControlParametrizationModelNumDiffTpl< _Scalar >

Definition at line 19 of file control.hpp.

Member Typedef Documentation

◆ MathBase

template<typename _Scalar>
typedef MathBaseTpl<Scalar> MathBase

Definition at line 27 of file control.hpp.

◆ Base

template<typename _Scalar>
typedef ControlParametrizationModelAbstractTpl<_Scalar> Base

Definition at line 28 of file control.hpp.

◆ Data

template<typename _Scalar>
typedef ControlParametrizationDataNumDiffTpl<_Scalar> Data

Definition at line 29 of file control.hpp.

◆ ControlParametrizationDataAbstract

Definition at line 31 of file control.hpp.

◆ VectorXs

template<typename _Scalar>
typedef MathBase::VectorXs VectorXs

Definition at line 32 of file control.hpp.

◆ MatrixXs

template<typename _Scalar>
typedef MathBase::MatrixXs MatrixXs

Definition at line 33 of file control.hpp.

Constructor & Destructor Documentation

◆ ControlParametrizationModelNumDiffTpl()

template<typename _Scalar>
ControlParametrizationModelNumDiffTpl(std::shared_ptr< Base >model)
explicit

Construct a new ControlParametrizationModelNumDiff object.

Parameters
model

Member Function Documentation

◆ calc()

template<typename _Scalar>
void calc(const std::shared_ptr< ControlParametrizationDataAbstract > &data,
const Scalart,
const Eigen::Ref< const VectorXs > &u ) const
override

Get the value of the control at the specified time.

Parameters
[in]dataControl-parametrization numdiff data
[in]tTime in [0,1]
[in]uControl parameters

◆ calcDiff()

template<typename _Scalar>
void calcDiff(const std::shared_ptr< ControlParametrizationDataAbstract > &data,
const Scalart,
const Eigen::Ref< const VectorXs > &u ) const
override

Get the value of the Jacobian of the control with respect to the parameters.

Parameters
[in]dataControl-parametrization numdiff data
[in]tTime in [0,1]
[in]uControl parameters

◆ createData()

template<typename _Scalar>
virtual std::shared_ptr< ControlParametrizationDataAbstract > createData()
overridevirtual

Create the control-parametrization data.

Returns
the control-parametrization data

Reimplemented from ControlParametrizationModelAbstractTpl< _Scalar >.

◆ params()

template<typename _Scalar>
void params(const std::shared_ptr< ControlParametrizationDataAbstract > &data,
const Scalart,
const Eigen::Ref< const VectorXs > &w ) const
override

Get a value of the control parameters such that the control at the specified time t is equal to the specified value u.

Parameters
[in]dataControl-parametrization numdiff data
[in]tTime in [0,1]
[in]wControl values

◆ convertBounds()

template<typename _Scalar>
void convertBounds(const Eigen::Ref< const VectorXs > &w_lb,
const Eigen::Ref< const VectorXs > &w_ub,
Eigen::Ref< VectorXs >u_lb,
Eigen::Ref< VectorXs >u_ub ) const
overridevirtual

Convert the bounds on the control to bounds on the control parameters.

Parameters
[in]w_lbControl lower bound
[in]w_ubControl upper bound
[in]u_lbControl parameter lower bound
[in]u_ubControl parameter upper bound

Implements ControlParametrizationModelAbstractTpl< _Scalar >.

◆ multiplyByJacobian()

template<typename _Scalar>
void multiplyByJacobian(const std::shared_ptr< ControlParametrizationDataAbstract > &data,
const Eigen::Ref< const MatrixXs > &A,
Eigen::Ref< MatrixXs >out,
const AssignmentOp = setto ) const
override

Compute the product between a specified matrix and the Jacobian of the control (with respect to the parameters)

Parameters
[in]dataControl-parametrization numdiff data
[in]AA matrix to multiply times the Jacobian
[out]outProduct between the matrix A and the Jacobian of the control with respect to the parameters
[in]opAssignment operator which sets, adds, or removes the given results

◆ multiplyJacobianTransposeBy()

template<typename _Scalar>
void multiplyJacobianTransposeBy(const std::shared_ptr< ControlParametrizationDataAbstract > &data,
const Eigen::Ref< const MatrixXs > &A,
Eigen::Ref< MatrixXs >out,
const AssignmentOp = setto ) const
override

Compute the product between the transposed Jacobian of the control (with respect to the parameters) and a specified matrix.

Parameters
[in]dataControl-parametrization numdiff data
[in]AA matrix to multiply times the Jacobian
[out]outProduct between the transposed Jacobian of the control with respect to the parameters and the matrix A
[in]opAssignment operator which sets, adds, or removes the given results

◆ get_model()

template<typename _Scalar>
const std::shared_ptr< Base > & get_model()const

Get the model_ object.

Returns
Base&

Member Data Documentation

◆ nu_

template<typename _Scalar>
std::size_t nu_
protected

Control parameters dimension.

Definition at line 206 of file control-base.hpp.

◆ nw_

template<typename _Scalar>
std::size_t nw_
protected

Control dimension.

Definition at line 205 of file control-base.hpp.


The documentation for this class was generated from the following files:
  • /build/source/include/crocoddyl/core/fwd.hpp
  • /build/source/include/crocoddyl/core/numdiff/control.hpp