Skip to content

Conversation

@Tanisha-Sharma005
Copy link

Problem

Friction calculations in collision_pair.cpp produced NaN values due to improper handling of collision pair types and geom data arrays.

Solution

  • Added proper validation for wp_array_dyn_t friction pair types
  • Fixed geom data array processing to prevent uninitialized reads
  • Ensured friction coefficients are properly initialized before use

Testing

Verified friction calculations now produce valid float values in all collision scenarios.

Closes #942

@thowell
Copy link
Collaborator

thowell commented Jan 6, 2026

@Tanisha-Sharma005 thank you for your contribution to mujoco warp! the nans reported in #942 are likely the result of floating point precision and not a bug in the implementation. if you are interested in further contributing to mujoco warp, please comment on an issue marked with 'good first issue'. thanks!

@thowell thowell closed this Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

set sliding friction is 0 cause Nan

2 participants