diff --git a/dart/constraint/WeldJointConstraint.cpp b/dart/constraint/WeldJointConstraint.cpp index c47a39d171d27..99f17271c85f8 100644 --- a/dart/constraint/WeldJointConstraint.cpp +++ b/dart/constraint/WeldJointConstraint.cpp @@ -80,9 +80,22 @@ WeldJointConstraint::WeldJointConstraint(dynamics::BodyNode* _body1, mOldX[5] = 0.0; } +//============================================================================== +void WeldJointConstraint::setRelativeTransform(const Eigen::Isometry3d& _tf) +{ + mRelativeTransform = _tf; +} + +//============================================================================== +const Eigen::Isometry3d& WeldJointConstraint::getRelativeTransform() const +{ + return mRelativeTransform; +} + //============================================================================== WeldJointConstraint::~WeldJointConstraint() { + // Do nothing } //============================================================================== diff --git a/dart/constraint/WeldJointConstraint.hpp b/dart/constraint/WeldJointConstraint.hpp index aaebfa7c50c7e..786d3c23e61b7 100644 --- a/dart/constraint/WeldJointConstraint.hpp +++ b/dart/constraint/WeldJointConstraint.hpp @@ -51,6 +51,12 @@ class WeldJointConstraint : public JointConstraint /// Constructor that takes two bodies WeldJointConstraint(dynamics::BodyNode* _body1, dynamics::BodyNode* _body2); + /// Set the relative transform that this WeldJointConstraint will enforce + void setRelativeTransform(const Eigen::Isometry3d& _tf); + + /// Get the relative transform that this WeldJointConstraint will enforce + const Eigen::Isometry3d& getRelativeTransform() const; + /// Destructor virtual ~WeldJointConstraint();