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
+1 -1
View File
@@ -1378,7 +1378,7 @@ TEST_F(XMLReaderTest, ParseReplicate) {
// check body positions
mjtNum pos[2] = {0, 0};
constexpr mjtNum tol = MjTol(1e-8, 1e-3);
const mjtNum tol = MjTol(1e-8, 1e-3);
for (int i = 1; i < 102; ++i) {
mjtNum theta = (i-1) * 1.8 * mjPI / 180;
EXPECT_NEAR(m->body_pos[3*i+0], pos[0] + sin(theta), tol) << i;