Improve mj_addM and associated test

- Updated docs to clarify that only the lower triangle is touched
- The function was unnecessarily adding the upper triangle in the sparse case
- The test used an unnecessarily large model and stepping it leading to timeouts under ASAN

PiperOrigin-RevId: 798528736
Change-Id: I592cc17dfb62379bb0cd6b332a8eb7e8b0ef6355
This commit is contained in:
Yuval Tassa
2025-08-23 03:56:02 -07:00
committed by Copybara-Service
parent a64a26c3ae
commit a230aa60c5
6 changed files with 20 additions and 22 deletions
+1 -1
View File
@@ -3001,7 +3001,7 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([
nullable=True,
),
),
doc='Add inertia matrix to destination matrix. Destination can be sparse or dense when all int* are NULL.', # pylint: disable=line-too-long
doc='Add inertia matrix to destination matrix (lower triangle only). Destination can be sparse or dense when all int* are NULL.', # pylint: disable=line-too-long
)),
('mj_applyFT',
FunctionDecl(