Skip to content

Commit

Permalink
Add parent joint getter in Joint class.
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio El Khoury committed Oct 12, 2012
1 parent 5c495b6 commit 7546fa9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/ard/rbdl/model/joint.hh
Expand Up @@ -78,6 +78,9 @@ namespace ard
/// still exist once the shared pointer has been deleted. /// still exist once the shared pointer has been deleted.
virtual to_pointer<CjrlJoint>::type parentJoint () const; virtual to_pointer<CjrlJoint>::type parentJoint () const;


/// \brief Get shared pointer to parent joint.
virtual void parentJoint (jointShPtr_t& joint) const;

/// \brief Add a child joint. /// \brief Add a child joint.
virtual bool addChildJoint (CjrlJoint& joint); virtual bool addChildJoint (CjrlJoint& joint);


Expand Down
5 changes: 5 additions & 0 deletions src/joint.cc
Expand Up @@ -167,6 +167,11 @@ namespace ard
return getSharedPointer (parentJoint_); return getSharedPointer (parentJoint_);
} }


void Joint::parentJoint (jointShPtr_t& joint) const
{
joint = getSharedPointer (parentJoint_);
}

bool Joint::addChildJoint (CjrlJoint& joint) bool Joint::addChildJoint (CjrlJoint& joint)
{ {
// Link joints in abstract robot dynamics. The rbdl joints // Link joints in abstract robot dynamics. The rbdl joints
Expand Down

0 comments on commit 7546fa9

Please sign in to comment.