11 #ifndef CROCODDYL_CORE_NUMDIFF_STATE_HPP_
12 #define CROCODDYL_CORE_NUMDIFF_STATE_HPP_
14 #include <boost/make_shared.hpp>
15 #include <boost/shared_ptr.hpp>
17 #include "crocoddyl/core/fwd.hpp"
18 #include "crocoddyl/core/state-base.hpp"
22 template <
typename _Scalar>
25 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
27 typedef _Scalar Scalar;
30 typedef typename MathBase::VectorXs VectorXs;
31 typedef typename MathBase::MatrixXs MatrixXs;
36 virtual VectorXs
zero()
const;
37 virtual VectorXs
rand()
const;
38 virtual void diff(
const Eigen::Ref<const VectorXs>& x0,
39 const Eigen::Ref<const VectorXs>& x1,
40 Eigen::Ref<VectorXs> dxout)
const;
41 virtual void integrate(
const Eigen::Ref<const VectorXs>& x,
42 const Eigen::Ref<const VectorXs>& dx,
43 Eigen::Ref<VectorXs> xout)
const;
59 virtual void Jdiff(
const Eigen::Ref<const VectorXs>& x0,
60 const Eigen::Ref<const VectorXs>& x1,
61 Eigen::Ref<MatrixXs> Jfirst, Eigen::Ref<MatrixXs> Jsecond,
62 Jcomponent firstsecond = both)
const;
78 virtual void Jintegrate(
const Eigen::Ref<const VectorXs>& x,
79 const Eigen::Ref<const VectorXs>& dx,
80 Eigen::Ref<MatrixXs> Jfirst,
81 Eigen::Ref<MatrixXs> Jsecond,
82 const Jcomponent firstsecond = both,
83 const AssignmentOp op = setto)
const;
86 const Eigen::Ref<const VectorXs>& dx,
87 Eigen::Ref<MatrixXs> Jin,
88 const Jcomponent firstsecond = both)
const;
103 boost::shared_ptr<Base>
123 #include "crocoddyl/core/numdiff/state.hxx"
Abstract class for the state representation.
std::size_t nv_
Velocity dimension.
std::size_t nx_
State dimension.
bool has_limits_
Indicates whether any of the state limits is finite.
std::size_t nq_
Configuration dimension.
VectorXs lb_
Lower state limits.
VectorXs ub_
Upper state limits.
std::size_t ndx_
State rate dimension.
virtual void integrate(const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &dx, Eigen::Ref< VectorXs > xout) const
Compute the state manifold integration.
virtual VectorXs zero() const
Generate a zero state.
virtual void Jdiff(const Eigen::Ref< const VectorXs > &x0, const Eigen::Ref< const VectorXs > &x1, Eigen::Ref< MatrixXs > Jfirst, Eigen::Ref< MatrixXs > Jsecond, Jcomponent firstsecond=both) const
This computes the Jacobian of the diff method by finite differentiation:
const Scalar get_disturbance() const
Return the disturbance constant used in the numerical differentiation routine.
virtual void diff(const Eigen::Ref< const VectorXs > &x0, const Eigen::Ref< const VectorXs > &x1, Eigen::Ref< VectorXs > dxout) const
Compute the state manifold differentiation.
void set_disturbance(const Scalar disturbance)
Modify the disturbance constant used by the numerical differentiation routine.
virtual void JintegrateTransport(const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &dx, Eigen::Ref< MatrixXs > Jin, const Jcomponent firstsecond=both) const
Parallel transport from integrate(x, dx) to x.
virtual void Jintegrate(const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &dx, Eigen::Ref< MatrixXs > Jfirst, Eigen::Ref< MatrixXs > Jsecond, const Jcomponent firstsecond=both, const AssignmentOp op=setto) const
This computes the Jacobian of the integrate method by finite differentiation:
virtual VectorXs rand() const
Generate a random state.