Add manual test for CG converence

Also add MJTOL_SCALE to fixture to allow tests to be run with zero tolerance. This is useful when assesing the impact of code changes (A/B comparison of failure values)

PiperOrigin-RevId: 924219083
Change-Id: Ifdd09ac850904ca8dd79179930ce738a4b37d284
This commit is contained in:
Yuval Tassa
2026-05-31 03:15:06 -07:00
committed by Copybara-Service
parent 50e823e91c
commit 4358a102cd
11 changed files with 512 additions and 74 deletions
+2 -2
View File
@@ -67,8 +67,8 @@ TEST_F(UtilMiscTest, Sigmoid) {
EXPECT_EQ(mju_sigmoid(2), 1);
// epsilon for finite-differencing
constexpr mjtNum dx = MjTol(1e-7, 1e-3);
constexpr mjtNum fd_tol = MjTol(1e-7, 1e-3);
const mjtNum dx = MjTol(1e-7, 1e-3);
const mjtNum fd_tol = MjTol(1e-7, 1e-3);
// derivative at 0
mjtNum dy_dx_0 = (mju_sigmoid(0 + dx) - mju_sigmoid(0)) / dx;