Skip to content

check friction in io.put_model#978

Merged
thowell merged 1 commit intogoogle-deepmind:mainfrom
thowell:friction
Jan 12, 2026
Merged

check friction in io.put_model#978
thowell merged 1 commit intogoogle-deepmind:mainfrom
thowell:friction

Conversation

@thowell
Copy link
Collaborator

@thowell thowell commented Jan 5, 2026

instead of silently overriding, provide a warning if small friction values are provided

@thowell thowell added the enhancement New feature or request label Jan 6, 2026
@adenzler-nvidia
Copy link
Collaborator

I'm not sure about existing conventions, but it could be an option to override with a warning, and avoid the potential NaN in all cases.

But this looks good as well, I'm just not sure what is consistent behavior.

@thowell
Copy link
Collaborator Author

thowell commented Jan 9, 2026

the friction values are clamped here with MJ_MINMU (=1e-5).

the issue is that this minimum value was tuned for double instead of float and this value seems to be insufficient to prevent nans, see experiments with mujoco using floats here.

opened an issue to track updating relevant constants #1000.

Copy link
Collaborator

@adenzler-nvidia adenzler-nvidia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving, yes makes sense to warn for this.

@thowell thowell merged commit af2347d into google-deepmind:main Jan 12, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants