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< ResidualDataAbstract > | createData (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< StateAbstract > | state_ |
State description. | |
bool | u_dependent_ |
Label that indicates if the residual function depends on u. | |
VectorXs | unone_ |
No control vector. | |
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.
ResidualModelAbstractTpl
, calc()
, calcDiff()
, createData()
ResidualModelImpulseCoMTpl | ( | boost::shared_ptr< StateMultibody > | state | ) |
Initialize the impulse CoM residual model.
[in] | state | State of the multibody system |
|
virtual |
Compute the impulse CoM residual.
[in] | data | Impulse CoM residual data |
[in] | x | State point \(\mathbf{x}\in\mathbb{R}^{ndx}\) |
[in] | u | Control input \(\mathbf{u}\in\mathbb{R}^{nu}\) |
|
virtual |
Compute the Jacobians of the impulse CoM residual.
[in] | data | Impulse CoM residual data |
[in] | x | State point \(\mathbf{x}\in\mathbb{R}^{ndx}\) |
[in] | u | Control input \(\mathbf{u}\in\mathbb{R}^{nu}\) |
|
virtual |
Print relevant information of the impulse-com residual.
[out] | os | Output stream object |