Aikido
|
A BoxConstraint on RealVectorStates. More...
#include <aikido/constraint/uniform/RnBoxConstraint.hpp>
Public Types | |
using | VectorNd = Eigen::Matrix< double, N, 1 > |
Public Member Functions | |
RBoxConstraint (std::shared_ptr< const statespace::R< N >> _space, std::unique_ptr< common::RNG > _rng, const VectorNd &_lowerLimits, const VectorNd &_upperLimits) | |
Constructor. More... | |
statespace::ConstStateSpacePtr | getStateSpace () const override |
Gets the StateSpace that this constraint operates on. More... | |
std::size_t | getConstraintDimension () const override |
Size of constraints. More... | |
std::vector< constraint::ConstraintType > | getConstraintTypes () const override |
Returns a vector of constraints' types, i-th element correspoinding to the type of i-th constraint. More... | |
bool | isSatisfied (const statespace::StateSpace::State *state, TestableOutcome *outcome=nullptr) const override |
Returns true if state satisfies this constraint. More... | |
std::unique_ptr< TestableOutcome > | createOutcome () const override |
Return an instance of DefaultTestableOutcome, since this class doesn't have a more specialized TestableOutcome derivative assigned to it. More... | |
bool | project (const statespace::StateSpace::State *_s, statespace::StateSpace::State *_out) const override |
Projection _s to _out. More... | |
void | getValue (const statespace::StateSpace::State *_s, Eigen::VectorXd &_out) const override |
Get the value of constraints at _s. More... | |
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 in). More... | |
std::unique_ptr< constraint::SampleGenerator > | createSampleGenerator () const override |
Creates a SampleGenerator for sampling from this constraint. More... | |
auto | getLowerLimits () const -> const VectorNd & |
Returns lower limits of this constraint. More... | |
auto | getUpperLimits () const -> const VectorNd & |
Returns upper limits of this constraint. More... | |
![]() | |
virtual | ~Differentiable ()=default |
Destructor. More... | |
virtual void | getValueAndJacobian (const statespace::StateSpace::State *_s, Eigen::VectorXd &_val, Eigen::MatrixXd &_jac) const |
Get both Value and Jacobian. More... | |
![]() | |
virtual | ~Projectable ()=default |
virtual bool | project (statespace::StateSpace::State *_s) const |
Performs an in-place projection. More... | |
![]() | |
virtual | ~Sampleable ()=default |
![]() | |
virtual | ~Testable ()=default |
Private Attributes | |
std::shared_ptr< const statespace::R< N > > | mSpace |
std::unique_ptr< common::RNG > | mRng |
VectorNd | mLowerLimits |
VectorNd | mUpperLimits |
A BoxConstraint on RealVectorStates.
For each dimension, this constraint has lowerLimit and upperLimit.
using aikido::constraint::uniform::RBoxConstraint< N >::VectorNd = Eigen::Matrix<double, N, 1> |
aikido::constraint::uniform::RBoxConstraint< N >::RBoxConstraint | ( | std::shared_ptr< const statespace::R< N >> | _space, |
std::unique_ptr< common::RNG > | _rng, | ||
const VectorNd & | _lowerLimits, | ||
const VectorNd & | _upperLimits | ||
) |
Constructor.
_space | Space in which this constraint operates. |
_rng | Random number generator to be used for sampling. |
_lowerLimits | Lower limits on the states. The length of this vector should match the dimension of _space. |
_upperLimits | Upper limits. The length of this vector should match the dimension of _space. |
|
overridevirtual |
Return an instance of DefaultTestableOutcome, since this class doesn't have a more specialized TestableOutcome derivative assigned to it.
Implements aikido::constraint::Testable.
|
overridevirtual |
Creates a SampleGenerator for sampling from this constraint.
Implements aikido::constraint::Sampleable.
|
overridevirtual |
Size of constraints.
Implements aikido::constraint::Differentiable.
|
overridevirtual |
Returns a vector of constraints' types, i-th element correspoinding to the type of i-th constraint.
Implements aikido::constraint::Differentiable.
|
overridevirtual |
Get the jacobian of constraints evaluated at _s, expressed in the frame each state space is expressed in).
_s | State to be evaluated at. | |
[out] | _out | Jacobian matrix. The dimension should be the following: SO3 StateSpace : m x 3 SO2 : m x 1 SE2 : m x 3 SE3 : m x 6 Rn : m x n CartesianProduct: m x k (k = sum of all state jacobian cols) If Matrix of incorrect dimension is given, false will be returned. |
Implements aikido::constraint::Differentiable.
auto aikido::constraint::uniform::RBoxConstraint< N >::getLowerLimits |
Returns lower limits of this constraint.
|
overridevirtual |
Gets the StateSpace that this constraint operates on.
Implements aikido::constraint::Differentiable.
auto aikido::constraint::uniform::RBoxConstraint< N >::getUpperLimits |
Returns upper limits of this constraint.
|
overridevirtual |
Get the value of constraints at _s.
Should be 0 to satisfy equality constraints. Should be <=0 to satisfy inequality constraints.
_s | State to be evaluated at. | |
[out] | _out | Vector to store the value. Length should match the number of constraints. |
Implements aikido::constraint::Differentiable.
|
overridevirtual |
Returns true if state satisfies this constraint.
[in] | _state | given state to test. |
[in] | outcome | pointer to TestableOutcome derivative instance that method will populate with useful information. Each derivative class of Testable may expect outcome to be a different derivative class of TestableOutcome (this casting and population is done under the hood). If this argument is missing, it is ignored. |
Implements aikido::constraint::Testable.
|
overridevirtual |
Projection _s to _out.
Returns false if projection cannot be done.
_s | state to be projected. |
_out | resulting projection. |
Implements aikido::constraint::Projectable.
|
private |
|
private |
|
private |
|
private |