Skip to content

Commit

Permalink
Removes DRAKE_DEMANDs temporily added during a PR train transition pe…
Browse files Browse the repository at this point in the history
…riod. (RobotLocomotion#21469)

We added a number of DRAKE_DEMANDs in SapDriver::AddContactConstraints() during
a transition period in PR RobotLocomotion#20913. In that PR we explicitly loaded NANs to mark
not yet supported configurations (in this case deformables + HuntCrossley
contact constraints). Now that the feature is complete and those configurations
are supported, these DEMANDs can go away.
  • Loading branch information
amcastro-tri authored and RussTedrake committed Dec 15, 2024
1 parent ffbddee commit 51403da
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions multibody/plant/sap_driver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -251,16 +251,8 @@ std::vector<RotationMatrix<T>> SapDriver<T>::AddContactConstraints(
MakeContactConfiguration(pair), std::move(J),
make_sap_parameters()));
} else {
ContactConfiguration<T> contact_configuration =
MakeContactConfiguration(pair);
DRAKE_DEMAND(
!std::isnan(ExtractDoubleOrThrow(contact_configuration.vn)));
DRAKE_DEMAND(
!std::isnan(ExtractDoubleOrThrow(contact_configuration.fe)));
DRAKE_DEMAND(
!std::isnan(ExtractDoubleOrThrow(contact_configuration.phi)));
problem->AddConstraint(std::make_unique<SapHuntCrossleyConstraint<T>>(
std::move(contact_configuration), std::move(J),
MakeContactConfiguration(pair), std::move(J),
make_hunt_crossley_parameters()));
}
} else {
Expand Down

0 comments on commit 51403da

Please sign in to comment.