Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DegreeOfFreedom class #288

Merged
merged 34 commits into from
Jan 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
a93ba3b
getting read to add DoF class
mxgrey Nov 14, 2014
441d8b2
Merge branch 'grey/name_manager' into grey/features
mxgrey Dec 1, 2014
21ee5f5
adding DegreeOfFreedom class
mxgrey Dec 1, 2014
1efb377
integrating DegreeOfFreedom class int othe rest of the code
mxgrey Dec 2, 2014
477c048
Finished DOF class, needs testing
mxgrey Dec 15, 2014
a9a311a
more appropriate name for the name management unit test
mxgrey Dec 15, 2014
f098b82
Finished integrating DOF class into Skeleton
mxgrey Dec 15, 2014
ecd227f
created test for DOF class related features -- passing
mxgrey Dec 15, 2014
cd6c826
resolving merge conflict
mxgrey Dec 16, 2014
31a7877
Merge branch 'master' into grey/features
jslee02 Dec 31, 2014
c11170b
Add some comment and fix style
jslee02 Dec 31, 2014
0bfcdbe
Remove Joint::mIndexInSkeleton which is replaced by DegreeOfFreedom::…
jslee02 Dec 31, 2014
d247b0d
Deprecate GenCoordInfo struct whos functionality is replaced by Degre…
jslee02 Jan 1, 2015
43605e5
Rename Skeleton::mDof to Skeleton::mNumOfDofs for name consistency
jslee02 Jan 1, 2015
b27fbea
Change parameter name for name consistency with the member functions
jslee02 Jan 1, 2015
df5e461
Add missing change from the previous commit
jslee02 Jan 1, 2015
ddc5882
Fix style
jslee02 Jan 2, 2015
4f11c66
removed unnecessary namespace specification
mxgrey Jan 2, 2015
80af6de
added ability to parse DOFs -- needs testing
mxgrey Jan 2, 2015
8bd330f
creating test xml file
mxgrey Jan 3, 2015
37c4f04
fixed important typos
mxgrey Jan 3, 2015
311d2d7
added ability to prevent automatic DOF name changing
mxgrey Jan 3, 2015
24d301d
finished test for DOF parsing -- passing
mxgrey Jan 3, 2015
913d7fd
calls to DOF::setName() will, by default, set the name to be preserved
mxgrey Jan 3, 2015
f7e4840
when custom DOF names are given in a skel file, keep them preserved
mxgrey Jan 3, 2015
0b0de72
better error checking in the xml parsing
mxgrey Jan 3, 2015
5317dc6
added copyright to unit test
mxgrey Jan 6, 2015
88836b2
Style fix
jslee02 Jan 6, 2015
81d68ac
Remove outdated code in testParser.cpp
jslee02 Jan 6, 2015
79b9edf
Style fix in PlanarJoint.cpp
jslee02 Jan 6, 2015
ce2277c
Remove unnecessary namespace specification
jslee02 Jan 6, 2015
d083568
converted usage of 'effort' to 'force'
mxgrey Jan 10, 2015
88e1f50
manually merged with master
mxgrey Jan 14, 2015
df8fe62
corrected minor merge error
mxgrey Jan 14, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions dart/dynamics/BallJoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ BallJoint::BallJoint(const std::string& _name)
: MultiDofJoint(_name),
mR(Eigen::Isometry3d::Identity())
{
updateDegreeOfFreedomNames();
}

//==============================================================================
Expand All @@ -65,6 +66,17 @@ void BallJoint::integratePositions(double _dt)
mPositions = math::logMap(mR.linear());
}

//==============================================================================
void BallJoint::updateDegreeOfFreedomNames()
{
if(!mDofs[0]->isNamePreserved())
mDofs[0]->setName(mName + "_x", false);
if(!mDofs[1]->isNamePreserved())
mDofs[1]->setName(mName + "_y", false);
if(!mDofs[2]->isNamePreserved())
mDofs[2]->setName(mName + "_z", false);
}

//==============================================================================
void BallJoint::updateLocalTransform()
{
Expand Down
3 changes: 3 additions & 0 deletions dart/dynamics/BallJoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ class BallJoint : public MultiDofJoint<3>
// Documentation inherited
virtual void integratePositions(double _dt);

// Documentation inherited
virtual void updateDegreeOfFreedomNames();

// Documentation inherited
virtual void updateLocalTransform();

Expand Down
6 changes: 3 additions & 3 deletions dart/dynamics/BodyNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,16 +391,16 @@ void BodyNode::setParentJoint(Joint* _joint)

if (mSkeleton)
{
mSkeleton->mNameMgrForJoints.removeName(mParentJoint->getName());
mSkeleton->addEntryToJointNameMgr(_joint);
mSkeleton->unregisterJoint(mParentJoint);
mSkeleton->registerJoint(_joint);
}

if (mParentJoint)
mParentJoint->mChildBodyNode = NULL;

mParentJoint = _joint;
mParentJoint->mChildBodyNode = this;
// TODO: Shouldn't we delete the original mParentJoint? Seems like the BodyNode
// TODO: Should we delete the original mParentJoint? Seems like the BodyNode
// should be responsible for its parent joint
}

Expand Down
Loading