Skip to content

Commit

Permalink
Make compatible with Eigen-3.3.8 (RobotLocomotion#14159)
Browse files Browse the repository at this point in the history
Eigen introduces Eigen::all[1], so we need this patch to avoid name conflicts with drake::all.

[1]: http://eigen.tuxfamily.org/dox-devel/group__Core__Module.html#ga790ab6c4226ef5f678b9eb532a3eab14
  • Loading branch information
soonho-tri authored Oct 2, 2020
1 parent 25e8b40 commit 7ed34fe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions systems/framework/system_constraint.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,19 +220,19 @@ class SystemConstraint final {
// elegant, and so that double evaluation is as fast as possible.
if (type() == SystemConstraintType::kEquality) {
if (tol == 0.0) {
return all(value.array() == 0.0);
return drake::all(value.array() == 0.0);
} else {
return all(value.cwiseAbs().array() <= tol);
return drake::all(value.cwiseAbs().array() <= tol);
}
} else {
DRAKE_ASSERT(type() == SystemConstraintType::kInequality);
// TODO(hongkai.dai): ignore the bounds that are infinite.
if (tol == 0.0) {
return all(value.array() >= lower_bound().array()) &&
all(value.array() <= upper_bound().array());
return drake::all(value.array() >= lower_bound().array()) &&
drake::all(value.array() <= upper_bound().array());
} else {
return all((value - lower_bound()).array() >= -tol) &&
all((upper_bound() - value).array() >= -tol);
return drake::all((value - lower_bound()).array() >= -tol) &&
drake::all((upper_bound() - value).array() >= -tol);
}
}
}
Expand Down

0 comments on commit 7ed34fe

Please sign in to comment.