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

Fix build errors and warnings for DART 6.13.0 #465

Merged
merged 2 commits into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
7 changes: 7 additions & 0 deletions dartsim/src/Base.hh
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,17 @@ class Base : public Implements3d<FeatureList<Feature>>
}
for (auto &bn : skel->getBodyNodes())
{
#if DART_VERSION_AT_LEAST(6, 13, 0)
bn->eachShapeNode([this](dart::dynamics::ShapeNode *_sn)
{
this->shapes.RemoveEntity(_sn);
});
#else
for (auto &sn : bn->getShapeNodes())
{
this->shapes.RemoveEntity(sn);
}
#endif
this->links.RemoveEntity(bn);
}
this->models.RemoveEntity(skel);
Expand Down
20 changes: 20 additions & 0 deletions dartsim/src/SimulationFeatures.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,17 @@ dart::constraint::ContactSurfaceParams IgnContactSurfaceHandler::createParams(
typedef FeaturePolicy3d P;
typename F::ContactSurfaceParams<P> pIgn;

#if DART_VERSION_AT_LEAST(6, 13, 0)
pIgn.frictionCoeff = pDart.mPrimaryFrictionCoeff;
#else
pIgn.frictionCoeff = pDart.mFrictionCoeff;
#endif
pIgn.secondaryFrictionCoeff = pDart.mSecondaryFrictionCoeff;
#if DART_VERSION_AT_LEAST(6, 13, 0)
pIgn.slipCompliance = pDart.mPrimarySlipCompliance;
#else
pIgn.slipCompliance = pDart.mSlipCompliance;
#endif
pIgn.secondarySlipCompliance = pDart.mSecondarySlipCompliance;
pIgn.restitutionCoeff = pDart.mRestitutionCoeff;
pIgn.firstFrictionalDirection = pDart.mFirstFrictionalDirection;
Expand All @@ -185,11 +193,23 @@ dart::constraint::ContactSurfaceParams IgnContactSurfaceHandler::createParams(
_numContactsOnCollisionObject, pIgn);

if (pIgn.frictionCoeff)
{
#if DART_VERSION_AT_LEAST(6, 13, 0)
pDart.mPrimaryFrictionCoeff = pIgn.frictionCoeff.value();
#else
pDart.mFrictionCoeff = pIgn.frictionCoeff.value();
#endif
}
if (pIgn.secondaryFrictionCoeff)
pDart.mSecondaryFrictionCoeff = pIgn.secondaryFrictionCoeff.value();
if (pIgn.slipCompliance)
{
#if DART_VERSION_AT_LEAST(6, 13, 0)
pDart.mPrimarySlipCompliance = pIgn.slipCompliance.value();
#else
pDart.mSlipCompliance = pIgn.slipCompliance.value();
#endif
}
if (pIgn.secondarySlipCompliance)
pDart.mSecondarySlipCompliance = pIgn.secondarySlipCompliance.value();
if (pIgn.restitutionCoeff)
Expand Down