crocoddyl  1.9.0
Contact RObot COntrol by Differential DYnamic programming Library (Crocoddyl)
ResidualModelImpulseCoMTpl< _Scalar > Class Template Reference

Impulse CoM residual. More...

#include <crocoddyl/multibody/residuals/impulse-com.hpp>

Public Types

typedef ActivationModelAbstractTpl< Scalar > ActivationModelAbstract
 
typedef ResidualModelAbstractTpl< Scalar > Base
 
typedef ResidualDataImpulseCoMTpl< Scalar > Data
 
typedef DataCollectorAbstractTpl< Scalar > DataCollectorAbstract
 
typedef MathBaseTpl< Scalar > MathBase
 
typedef ResidualDataAbstractTpl< Scalar > ResidualDataAbstract
 
typedef StateMultibodyTpl< Scalar > StateMultibody
 
typedef MathBase::VectorXs VectorXs
 

Public Member Functions

 ResidualModelImpulseCoMTpl (boost::shared_ptr< StateMultibody > state)
 Initialize the impulse CoM residual model. More...
 
virtual void calc (const boost::shared_ptr< ResidualDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u)
 Compute the impulse CoM residual. More...
 
virtual void calcDiff (const boost::shared_ptr< ResidualDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u)
 Compute the Jacobians of the impulse CoM residual. More...
 
virtual boost::shared_ptr< ResidualDataAbstractcreateData (DataCollectorAbstract *const data)
 Create the impulse CoM residual data.
 
virtual void print (std::ostream &os) const
 Print relevant information of the impulse-com residual. More...
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar
 

Protected Attributes

std::size_t nu_
 Control dimension.
 
boost::shared_ptr< StateAbstractstate_
 State description.
 
bool u_dependent_
 Label that indicates if the residual function depends on u.
 
VectorXs unone_
 No control vector.
 

Detailed Description

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

Impulse CoM residual.

This residual function is defined as \(\mathbf{r}=\mathbf{J}_{com}*(\mathbf{v}_{next}-\mathbf{v})\), \(\mathbf{J}_{com}\in\mathbb{R}^{3\times nv}\) is the CoM Jacobian, and \(\mathbf{v}_{next},\mathbf{v}\in T_{\mathbf{q}}\mathcal{Q}\) are the generalized velocities after and before the impulse, respectively. Note that the dimension of the residual vector is 3. Furthermore, the Jacobians of the residual function are computed analytically.

As described in ResidualModelAbstractTpl(), the residual value and its Jacobians are calculated by calc and calcDiff, respectively.

See also
ResidualModelAbstractTpl, calc(), calcDiff(), createData()

Definition at line 152 of file fwd.hpp.

Constructor & Destructor Documentation

◆ ResidualModelImpulseCoMTpl()

ResidualModelImpulseCoMTpl ( boost::shared_ptr< StateMultibody state)

Initialize the impulse CoM residual model.

Parameters
[in]stateState of the multibody system

Member Function Documentation

◆ calc()

virtual void calc ( const boost::shared_ptr< ResidualDataAbstract > &  data,
const Eigen::Ref< const VectorXs > &  x,
const Eigen::Ref< const VectorXs > &  u 
)
virtual

Compute the impulse CoM residual.

Parameters
[in]dataImpulse CoM residual data
[in]xState point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
[in]uControl input \(\mathbf{u}\in\mathbb{R}^{nu}\)

◆ calcDiff()

virtual void calcDiff ( const boost::shared_ptr< ResidualDataAbstract > &  data,
const Eigen::Ref< const VectorXs > &  x,
const Eigen::Ref< const VectorXs > &  u 
)
virtual

Compute the Jacobians of the impulse CoM residual.

Parameters
[in]dataImpulse CoM residual data
[in]xState point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
[in]uControl input \(\mathbf{u}\in\mathbb{R}^{nu}\)

◆ print()

virtual void print ( std::ostream &  os) const
virtual

Print relevant information of the impulse-com residual.

Parameters
[out]osOutput stream object

The documentation for this class was generated from the following files: