Aikido
DifferentiableSubspace.hpp
Go to the documentation of this file.
1 #ifndef AIKIDO_CONSTRAINT_DIFFERENTIABLESUBSPACE_HPP_
2 #define AIKIDO_CONSTRAINT_DIFFERENTIABLESUBSPACE_HPP_
3 
6 
7 namespace aikido {
8 namespace constraint {
9 
13 {
14 public:
20  std::shared_ptr<const statespace::CartesianProduct> _stateSpace,
21  DifferentiablePtr _constraint,
22  std::size_t _index);
23 
24  virtual ~DifferentiableSubspace() = default;
25 
26  // Documentation inherited.
28 
29  // Documentation inherited.
30  std::vector<ConstraintType> getConstraintTypes() const override;
31 
32  // Documentation inherited.
33  std::size_t getConstraintDimension() const override;
34 
35  // Documentation inherited.
36  void getValue(const statespace::StateSpace::State* _s, Eigen::VectorXd& _out)
37  const override;
38 
39  // Documentation inherited.
40  void getJacobian(
42  Eigen::MatrixXd& _out) const override;
43 
44  // Documentation inherited.
47  Eigen::VectorXd& _val,
48  Eigen::MatrixXd& _jac) const override;
49 
50 private:
51  std::shared_ptr<const statespace::CartesianProduct> mStateSpace;
53  std::size_t mIndex;
54 };
55 
56 } // namespace constraint
57 } // namespace aikido
58 
59 #endif // AIKIDO_CONSTRAINT_DIFFERENTIABLESUBSPACE_HPP_
aikido::constraint::Differentiable
A differentiable constraint.
Definition: Differentiable.hpp:27
aikido
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
Differentiable.hpp
aikido::constraint::DifferentiableSubspace::getValue
void getValue(const statespace::StateSpace::State *_s, Eigen::VectorXd &_out) const override
Get the value of constraints at _s.
aikido::statespace::ConstStateSpacePtr
std::shared_ptr< const StateSpace > ConstStateSpacePtr
Definition: StateSpace.hpp:15
CartesianProduct.hpp
aikido::constraint::DifferentiableSubspace::mIndex
std::size_t mIndex
Definition: DifferentiableSubspace.hpp:53
aikido::constraint::DifferentiableSubspace::DifferentiableSubspace
DifferentiableSubspace(std::shared_ptr< const statespace::CartesianProduct > _stateSpace, DifferentiablePtr _constraint, std::size_t _index)
Apply _constraint to the i-th subspace of _stateSpace.
aikido::constraint::DifferentiableSubspace::~DifferentiableSubspace
virtual ~DifferentiableSubspace()=default
aikido::constraint::DifferentiableSubspace::getConstraintDimension
std::size_t getConstraintDimension() const override
Size of constraints.
aikido::constraint::DifferentiableSubspace::getStateSpace
statespace::ConstStateSpacePtr getStateSpace() const override
Gets the StateSpace that this constraint operates on.
aikido::constraint::DifferentiableSubspace::mStateSpace
std::shared_ptr< const statespace::CartesianProduct > mStateSpace
Definition: DifferentiableSubspace.hpp:51
aikido::constraint::DifferentiableSubspace::getJacobian
void getJacobian(const statespace::StateSpace::State *_s, Eigen::MatrixXd &_out) const override
Get the jacobian of constraints evaluated at _s, expressed in the frame each state space is expressed...
aikido::constraint::DifferentiablePtr
std::shared_ptr< Differentiable > DifferentiablePtr
Definition: Differentiable.hpp:14
aikido::constraint::DifferentiableSubspace::mConstraint
DifferentiablePtr mConstraint
Definition: DifferentiableSubspace.hpp:52
aikido::constraint::DifferentiableSubspace::getConstraintTypes
std::vector< ConstraintType > getConstraintTypes() const override
Returns a vector of constraints' types, i-th element correspoinding to the type of i-th constraint.
aikido::constraint::DifferentiableSubspace::getValueAndJacobian
void getValueAndJacobian(const statespace::StateSpace::State *_s, Eigen::VectorXd &_val, Eigen::MatrixXd &_jac) const override
Get both Value and Jacobian.
aikido::statespace::StateSpace::State
Definition: StateSpace.hpp:167
aikido::constraint::DifferentiableSubspace
A differentiable constraint applied only on a subspace of a CompoundState.
Definition: DifferentiableSubspace.hpp:12