Skip to content

Commit 0aff249

Browse files
authored
Tweak more test tolerances for Ubuntu Resolute (#24503)
1 parent 5c07cf7 commit 0aff249

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

multibody/parsing/test/detail_sdf_parser_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ using systems::Context;
7171

7272
using CollisionPair = SortedPair<std::string>;
7373

74-
const double kEps = std::numeric_limits<double>::epsilon();
74+
const double kEps = 2 * std::numeric_limits<double>::epsilon();
7575

7676
// Fixture to add test coverage for the SDF parser. Some features such as mimic
7777
// joints and ball constraints are only supported in discrete mode when using

multibody/tree/test/spatial_inertia_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1501,7 +1501,7 @@ GTEST_TEST(SpatialInertia, VerifyMinimumBoundingBoxLengths) {
15011501
// Create a 360 meter massless rod B with 1.0 kg particles at its distal ends.
15021502
// Ensure CalcPrincipalHalfLengthsAndPoseForMinimumBoundingBox() actually
15031503
// produces a minimum bounding box with ½-lengths a = 180 m, b = 0, c = 0.
1504-
constexpr double kTolerance = 64 * std::numeric_limits<double>::epsilon();
1504+
constexpr double kTolerance = 128 * std::numeric_limits<double>::epsilon();
15051505
const double mass = 1.0;
15061506
double a = 180, b = 0, c = 0; // rod's ½-length is 180 meters.
15071507
auto M_BBcm_B = SpatialInertia<double>::NaN();

solvers/test/csdp_solver_test.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,7 @@ TEST_F(TrivialSOCP3, Solve) {
265265
MathematicalProgramResult result;
266266
solver.Solve(*prog_, {}, solver_options, &result);
267267
EXPECT_TRUE(result.is_success());
268-
// The accuracy for this test on the Mac machine is 5E-6.
269-
const double tol = 5.E-6;
268+
const double tol = 5e-5;
270269
EXPECT_NEAR(result.get_optimal_cost(), 2 - std::sqrt(7.1), tol);
271270
EXPECT_TRUE(CompareMatrices(result.GetSolution(x_),
272271
Eigen::Vector2d(-0.1, 2 - std::sqrt(7.1)),

0 commit comments

Comments
 (0)