Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix model defaults #429

Merged
merged 2 commits into from
Jan 14, 2025
Merged

Fix model defaults #429

merged 2 commits into from
Jan 14, 2025

Conversation

etaoxing
Copy link
Contributor

Category

  • New feature
  • Bugfix
  • Breaking change
  • Refactoring
  • Documentation
  • Other (please explain)

Description

Fix model defaults such that they are assigned within ModelBuilder functions instead of in function defs. This allows for users to modify ModelBuilder.default_* values. Otherwise, even when users set new values, the functions in ModelBuilder would use old values.

Also fix Model.soft_contact_max to return 0 when soft_contact_particle is None.

Changelog

  • Update Model.soft_contact_max property
  • Update ModelBuilder's add_joint_revolute(), add_joint_prismatic(), add_triangle(), add_edge(), add_cloth_grid(), add_cloth_mesh(), add_particle_grid(), add_soft_grid(), add_soft_mesh(), set_ground_plane()

Before your PR is "Ready for review"

  • Do you agree to the terms under which contributions are accepted as described in Section 9 the Warp License?
  • Have you read the Contributor Guidelines?
  • Have you written any new necessary tests?
  • Have you added or updated any necessary documentation?
  • Have you added any files modified by compiling Warp and building the documentation to this PR (.e.g. stubs.py, functions.rst)?
  • Does your code pass ruff check and ruff format --check?

@shi-eric shi-eric requested a review from eric-heiden January 13, 2025 21:39
Copy link
Contributor

@eric-heiden eric-heiden left a comment

Choose a reason for hiding this comment

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

Thank you for your contributions, @etaoxing! Your changes look good to me.

@shi-eric shi-eric merged commit af3b467 into NVIDIA:main Jan 14, 2025
11 of 12 checks passed
Ali-Razmjoo pushed a commit to fork-the-planet/warp that referenced this pull request Jan 17, 2025
@shi-eric shi-eric added the bug Something isn't working label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants