Control gravity residual. More...
#include <crocoddyl/multibody/residuals/control-gravity.hpp>
Public Types | |
typedef ResidualModelAbstractTpl< Scalar > | Base |
typedef ResidualDataControlGravTpl< Scalar > | Data |
typedef DataCollectorAbstractTpl< Scalar > | DataCollectorAbstract |
typedef MathBaseTpl< Scalar > | MathBase |
typedef MathBase::MatrixXs | MatrixXs |
typedef ResidualDataAbstractTpl< Scalar > | ResidualDataAbstract |
typedef StateMultibodyTpl< Scalar > | StateMultibody |
typedef MathBase::VectorXs | VectorXs |
Public Member Functions | |
ResidualModelControlGravTpl (boost::shared_ptr< StateMultibody > state) | |
Initialize the control gravity residual model. More... | |
ResidualModelControlGravTpl (boost::shared_ptr< StateMultibody > state, const std::size_t nu) | |
Initialize the control gravity residual model. More... | |
virtual void | calc (const boost::shared_ptr< ResidualDataAbstract > &data, const Eigen::Ref< const VectorXs > &x) |
virtual void | calc (const boost::shared_ptr< ResidualDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u) |
Compute the control gravity residual. More... | |
virtual void | calcDiff (const boost::shared_ptr< ResidualDataAbstract > &data, const Eigen::Ref< const VectorXs > &x) |
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 control gravity residual. More... | |
virtual boost::shared_ptr< ResidualDataAbstract > | createData (DataCollectorAbstract *const data) |
virtual void | print (std::ostream &os) const |
Print relevant information of the control-grav 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. | |
VectorXs | unone_ |
No control vector. | |
bool | v_dependent_ |
Label that indicates if the residual function depends on v. | |
Control gravity residual.
This residual function is defined as \(\mathbf{r}=\mathbf{u}-\mathbf{g}(\mathbf{q})\), where \(\mathbf{u}\in~\mathbb{R}^{nu}\) is the current control input, \(\mathbf{g}(\mathbf{q})\) is the gravity torque corresponding to the current configuration, \(\mathbf{q}\in~\mathbb{R}^{nq}\) the current position joints input. Note that the dimension of the residual vector is obtained from StateAbstractTpl::get_nv()
.
As described in ResidualModelAbstractTpl()
, the residual value and its Jacobians are calculated by calc()
and calcDiff()
, respectively.
ResidualModelAbstractTpl
, calc()
, calcDiff()
, createData()
ResidualModelControlGravTpl | ( | boost::shared_ptr< StateMultibody > | state, |
const std::size_t | nu | ||
) |
Initialize the control gravity residual model.
[in] | state | State of the multibody system |
[in] | nu | Dimension of control vector |
ResidualModelControlGravTpl | ( | boost::shared_ptr< StateMultibody > | state | ) |
Initialize the control gravity residual model.
The default nu
value is obtained from StateAbstractTpl::get_nv()
.
[in] | state | State of the multibody system |
|
virtual |
Compute the control gravity residual.
[in] | data | Control residual data |
[in] | x | State point \(\mathbf{x}\in\mathbb{R}^{ndx}\) |
[in] | u | Control input \(\mathbf{u}\in\mathbb{R}^{nu}\) |
|
virtual |
|
virtual |
Compute the Jacobians of the control gravity residual.
[in] | data | Control residual data |
[in] | x | State point \(\mathbf{x}\in\mathbb{R}^{ndx}\) |
[in] | u | Control input \(\mathbf{u}\in\mathbb{R}^{nu}\) |
|
virtual |
|
virtual |
Print relevant information of the control-grav residual.
[out] | os | Output stream object |