Aikido
aikido::constraint::CartesianProductProjectable Class Reference

A Projectable for CompoundStates. More...

#include <aikido/constraint/CartesianProductProjectable.hpp>

Inheritance diagram for aikido::constraint::CartesianProductProjectable:
aikido::constraint::Projectable

Public Member Functions

 CartesianProductProjectable (std::shared_ptr< const statespace::CartesianProduct > _stateSpace, std::vector< ProjectablePtr > _constraints)
 Constructor. More...
 
statespace::ConstStateSpacePtr getStateSpace () const override
 Gets the StateSpace that this constraint operates on. More...
 
bool project (const statespace::StateSpace::State *_s, statespace::StateSpace::State *_out) const override
 Projection _s to _out. More...
 
- Public Member Functions inherited from aikido::constraint::Projectable
virtual ~Projectable ()=default
 
virtual bool project (statespace::StateSpace::State *_s) const
 Performs an in-place projection. More...
 

Private Attributes

std::shared_ptr< const statespace::CartesianProductmStateSpace
 
std::vector< ProjectablePtrmConstraints
 

Detailed Description

A Projectable for CompoundStates.

It takes in a set of Projectables and project i-th substate to i-th constraint.

Constructor & Destructor Documentation

◆ CartesianProductProjectable()

aikido::constraint::CartesianProductProjectable::CartesianProductProjectable ( std::shared_ptr< const statespace::CartesianProduct _stateSpace,
std::vector< ProjectablePtr _constraints 
)

Constructor.

Parameters
_stateSpaceCartesianProduct in which this constraint operates.
_constraintsSet of constraints. The size of _constraints should match the number of subspaces in _stateSpace. i-th constraint applies to i-th subspace.

Member Function Documentation

◆ getStateSpace()

statespace::ConstStateSpacePtr aikido::constraint::CartesianProductProjectable::getStateSpace ( ) const
overridevirtual

Gets the StateSpace that this constraint operates on.

Implements aikido::constraint::Projectable.

◆ project()

bool aikido::constraint::CartesianProductProjectable::project ( const statespace::StateSpace::State _s,
statespace::StateSpace::State _out 
) const
overridevirtual

Projection _s to _out.

Returns false if projection cannot be done.

Parameters
_sstate to be projected.
_outresulting projection.

Implements aikido::constraint::Projectable.

Member Data Documentation

◆ mConstraints

std::vector<ProjectablePtr> aikido::constraint::CartesianProductProjectable::mConstraints
private

◆ mStateSpace

std::shared_ptr<const statespace::CartesianProduct> aikido::constraint::CartesianProductProjectable::mStateSpace
private