Aikido
aikido::constraint::dart::FrameTestable Class Reference

Transforms a SE(3) Testable into a MetaSkeleton-Testable by performing forward kinematics on a configuration (metaskeleton state) and checking the resulting SE(3) pose of the asked frame. More...

#include <aikido/constraint/dart/FrameTestable.hpp>

Inheritance diagram for aikido::constraint::dart::FrameTestable:
aikido::constraint::Testable

Public Member Functions

 FrameTestable (statespace::dart::MetaSkeletonStateSpacePtr _metaSkeletonStateSpace, ::dart::dynamics::MetaSkeletonPtr _metaskeleton, ::dart::dynamics::ConstJacobianNodePtr _frame, TestablePtr _poseConstraint)
 Create a Testable for the MetaSkeleton. More...
 
bool isSatisfied (const statespace::StateSpace::State *_state, TestableOutcome *outcome=nullptr) const override
 Check if the constraint is satisfied by performing forward kinematics and testing the poseConstraint. More...
 
std::unique_ptr< TestableOutcomecreateOutcome () const override
 Return the outcome of mPoseConstraint->createOutcome(). More...
 
statespace::ConstStateSpacePtr getStateSpace () const override
 Returns StateSpace in which this constraint operates. More...
 
- Public Member Functions inherited from aikido::constraint::Testable
virtual ~Testable ()=default
 

Private Attributes

statespace::dart::ConstMetaSkeletonStateSpacePtr mMetaSkeletonStateSpace
 
::dart::dynamics::MetaSkeletonPtr mMetaSkeleton
 
::dart::dynamics::ConstJacobianNodePtr mFrame
 
TestablePtr mPoseConstraint
 
std::shared_ptr< const statespace::SE3mPoseStateSpace
 

Detailed Description

Transforms a SE(3) Testable into a MetaSkeleton-Testable by performing forward kinematics on a configuration (metaskeleton state) and checking the resulting SE(3) pose of the asked frame.

Constructor & Destructor Documentation

◆ FrameTestable()

aikido::constraint::dart::FrameTestable::FrameTestable ( statespace::dart::MetaSkeletonStateSpacePtr  _metaSkeletonStateSpace,
::dart::dynamics::MetaSkeletonPtr  _metaskeleton,
::dart::dynamics::ConstJacobianNodePtr  _frame,
TestablePtr  _poseConstraint 
)

Create a Testable for the MetaSkeleton.

Parameters
_metaSkeletonStateSpaceConfiguration space of the metaskeleton.
_metaskeletonMetaSkeleton to test with
_frameFrame constrained by _poseConstraint.
_poseConstraintA testable constraint on _frame.

Member Function Documentation

◆ createOutcome()

std::unique_ptr<TestableOutcome> aikido::constraint::dart::FrameTestable::createOutcome ( ) const
overridevirtual

Return the outcome of mPoseConstraint->createOutcome().

Reason: isSatisfied in this class will just pass outcome to the isSatisfied method of of mPoseConstraint.

Implements aikido::constraint::Testable.

◆ getStateSpace()

statespace::ConstStateSpacePtr aikido::constraint::dart::FrameTestable::getStateSpace ( ) const
overridevirtual

Returns StateSpace in which this constraint operates.

Implements aikido::constraint::Testable.

◆ isSatisfied()

bool aikido::constraint::dart::FrameTestable::isSatisfied ( const statespace::StateSpace::State _state,
TestableOutcome outcome = nullptr 
) const
overridevirtual

Check if the constraint is satisfied by performing forward kinematics and testing the poseConstraint.

Parameters
_statea MetaskeletonState to set the configuration of this constraint's metaskeketon. This state's StateSpace should match StateSpace returend by getStateSpace().
outcomeTestable outcome derivative class. Passed to the isSatisfied method of mPoseConstraint to allow "pass through" of debugging information.

Implements aikido::constraint::Testable.

Member Data Documentation

◆ mFrame

::dart::dynamics::ConstJacobianNodePtr aikido::constraint::dart::FrameTestable::mFrame
private

◆ mMetaSkeleton

::dart::dynamics::MetaSkeletonPtr aikido::constraint::dart::FrameTestable::mMetaSkeleton
private

◆ mMetaSkeletonStateSpace

statespace::dart::ConstMetaSkeletonStateSpacePtr aikido::constraint::dart::FrameTestable::mMetaSkeletonStateSpace
private

◆ mPoseConstraint

TestablePtr aikido::constraint::dart::FrameTestable::mPoseConstraint
private

◆ mPoseStateSpace

std::shared_ptr<const statespace::SE3> aikido::constraint::dart::FrameTestable::mPoseStateSpace
private