Go to the documentation of this file. 1 #ifndef AIKIDO_CONSTRAINT_DART_TSR_HPP_
2 #define AIKIDO_CONSTRAINT_DART_TSR_HPP_
5 #include <dart/math/MathTypes.hpp>
14 namespace constraint {
36 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
49 TSR(std::unique_ptr<common::RNG> _rng,
50 const Eigen::Isometry3d& _T0_w = Eigen::Isometry3d::Identity(),
51 const Eigen::Matrix<double, 6, 2>& _Bw
52 = Eigen::Matrix<double, 6, 2>::Zero(),
53 const Eigen::Isometry3d& _Tw_e = Eigen::Isometry3d::Identity(),
54 double _testableTolerance = 1e-6);
64 TSR(
const Eigen::Isometry3d& _T0_w = Eigen::Isometry3d::Identity(),
65 const Eigen::Matrix<double, 6, 2>& _Bw
66 = Eigen::Matrix<double, 6, 2>::Zero(),
67 const Eigen::Isometry3d& _Tw_e = Eigen::Isometry3d::Identity(),
68 double _testableTolerance = 1e-6);
76 virtual ~TSR() =
default;
82 std::shared_ptr<statespace::SE3>
getSE3()
const;
94 std::unique_ptr<TestableOutcome>
createOutcome()
const override;
101 void setRNG(std::unique_ptr<common::RNG> rng);
119 Eigen::MatrixXd& _out)
const override;
142 Eigen::Matrix<double, 6, 2>
mBw;
151 std::unique_ptr<common::RNG>
mRng;
159 #endif // AIKIDO_CONSTRAINT_DART_TSR_HPP_
void validate() const
Throws an invalid_argument exception if this TSR is invalid.
std::size_t getConstraintDimension() const override
Size of constraints.
A differentiable constraint.
Definition: Differentiable.hpp:27
double mTestableTolerance
Tolerance used in isSatisfied as a testable.
Definition: TSR.hpp:150
statespace::ConstStateSpacePtr getStateSpace() const override
Gets the StateSpace that this constraint operates on.
void getValue(const statespace::StateSpace::State *_s, Eigen::VectorXd &_out) const override
Get the value of constraints at _s.
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
Constraint which can be tested.
Definition: Testable.hpp:17
double getTestableTolerance()
Get the testable tolerance used in isSatisfiable.
std::shared_ptr< const StateSpace > ConstStateSpacePtr
Definition: StateSpace.hpp:15
void setTestableTolerance(double _testableTolerance)
Set the testable tolerance used in isSatisfiable.
Constraint that may be sampled from.
Definition: Sampleable.hpp:27
TSR(std::unique_ptr< common::RNG > _rng, const Eigen::Isometry3d &_T0_w=Eigen::Isometry3d::Identity(), const Eigen::Matrix< double, 6, 2 > &_Bw=Eigen::Matrix< double, 6, 2 >::Zero(), const Eigen::Isometry3d &_Tw_e=Eigen::Isometry3d::Identity(), double _testableTolerance=1e-6)
Constructor.
std::unique_ptr< SampleGenerator > createSampleGenerator() const override
Creates a SampleGenerator for sampling from this constraint.
std::shared_ptr< statespace::SE3 > mStateSpace
Definition: TSR.hpp:152
A projectable constraint.
Definition: Projectable.hpp:12
bool isSatisfied(const statespace::StateSpace::State *_s, TestableOutcome *outcome=nullptr) const override
Returns true if state satisfies this constraint.
std::shared_ptr< statespace::SE3 > getSE3() const
Returns the SE3 which this TSR operates in.
Eigen::Isometry3d mTw_e
Transformation from "w" frame into end frame.
Definition: TSR.hpp:146
TSRs describe end-effector constraint sets as subsets of SE(3).
Definition: TSR.hpp:29
std::vector< ConstraintType > getConstraintTypes() const override
Returns a vector of constraints' types, i-th element correspoinding to the type of i-th constraint.
std::unique_ptr< common::RNG > mRng
Definition: TSR.hpp:151
Base class for constraint outcomes.
Definition: TestableOutcome.hpp:13
void setRNG(std::unique_ptr< common::RNG > rng)
Set the random number generator used by SampleGenerators for this TSR.
bool project(const statespace::StateSpace::State *_s, statespace::StateSpace::State *_out) const override
Projection _s to _out.
Eigen::Matrix< double, 6, 2 > mBw
Bounds on "wiggling" in x, y, z, roll, pitch, yaw.
Definition: TSR.hpp:142
virtual void getValueAndJacobian(const statespace::StateSpace::State *_s, Eigen::VectorXd &_val, Eigen::MatrixXd &_jac) const
Get both Value and Jacobian.
TSR & operator=(const TSR &other)
void getJacobian(const statespace::StateSpace::State *_s, Eigen::MatrixXd &_out) const override
Jacobian of TSR with respect to the se(3) tangent vector of _s.
Definition: StateSpace.hpp:167
std::unique_ptr< TestableOutcome > createOutcome() const override
Return an instance of DefaultTestableOutcome, since this class doesn't have a more specialized Testab...
Definition: FrameMarker.hpp:11
Eigen::Isometry3d mT0_w
Transformation from origin frame into the TSR frame "w".
Definition: TSR.hpp:139
#define AIKIDO_DECLARE_POINTERS(X)
Definition: pointers.hpp:21