Skip to content

Commit

Permalink
Rename soft_contacts module to soft
Browse files Browse the repository at this point in the history
  • Loading branch information
flferretti committed Jun 17, 2024
1 parent 9675c49 commit d3b7d38
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
3 changes: 1 addition & 2 deletions docs/modules/rbda.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ This module provides a set of algorithms for rigid body dynamics.
crba
forward_kinematics
jacobian
soft_contacts
utils

Articulated Body Algorithm
Expand All @@ -31,7 +30,7 @@ Collision Detection
Contact Models
~~~~~~~~~~~~~~

.. automodule:: jaxsim.rbda.soft_contacts
.. automodule:: jaxsim.rbda.contacts.soft
:members:

Composite Rigid Body Algorithm
Expand Down
4 changes: 2 additions & 2 deletions src/jaxsim/api/contact.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import jaxsim.api as js
import jaxsim.terrain
import jaxsim.typing as jtp
from jaxsim.rbda.contacts.soft_contacts import SoftContacts, SoftContactsParams
from jaxsim.rbda.contacts.soft import SoftContacts, SoftContactsParams

from .common import VelRepr

Expand Down Expand Up @@ -246,7 +246,7 @@ def estimate_good_soft_contacts_parameters(
The user is encouraged to fine-tune the parameters based on the
specific application.
"""
from jaxsim.rbda.contacts.soft_contacts import SoftContactsParams
from jaxsim.rbda.contacts.soft import SoftContactsParams

def estimate_model_height(model: js.model.JaxSimModel) -> jtp.Float:
""""""
Expand Down
2 changes: 1 addition & 1 deletion src/jaxsim/api/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import jaxsim.rbda
import jaxsim.typing as jtp
from jaxsim.math import Quaternion
from jaxsim.rbda.contacts.soft_contacts import SoftContacts
from jaxsim.rbda.contacts.soft import SoftContacts
from jaxsim.utils import Mutability
from jaxsim.utils.tracing import not_tracing

Expand Down
4 changes: 2 additions & 2 deletions src/jaxsim/api/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def build_from_model_description(
"""

import jaxsim.parsers.rod
from jaxsim.rbda.contacts.soft_contacts import SoftContacts
from jaxsim.rbda.contacts.soft import SoftContacts

# Parse the input resource (either a path to file or a string with the URDF/SDF)
# and build the -intermediate- model description
Expand Down Expand Up @@ -171,7 +171,7 @@ def build(
Returns:
The built Model object.
"""
from jaxsim.rbda.contacts.soft_contacts import SoftContacts
from jaxsim.rbda.contacts.soft import SoftContacts

# Set the model name (if not provided, use the one from the model description)
model_name = model_name if model_name is not None else model_description.name
Expand Down
2 changes: 1 addition & 1 deletion src/jaxsim/api/ode_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import jaxsim.api as js
import jaxsim.typing as jtp
from jaxsim.rbda import ContactsState
from jaxsim.rbda.contacts.soft_contacts import SoftContacts, SoftContactsState
from jaxsim.rbda.contacts.soft import SoftContacts, SoftContactsState
from jaxsim.utils import JaxsimDataclass

# =============================================================================
Expand Down
2 changes: 1 addition & 1 deletion tests/test_automatic_differentiation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import jaxsim.rbda
import jaxsim.typing as jtp
from jaxsim import VelRepr
from jaxsim.rbda.contacts.soft_contacts import SoftContacts, SoftContactsParams
from jaxsim.rbda.contacts.soft import SoftContacts, SoftContactsParams

# All JaxSim algorithms, excluding the variable-step integrators, should support
# being automatically differentiated until second order, both in FWD and REV modes.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_simulations.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import jaxsim.integrators
import jaxsim.rbda
from jaxsim import VelRepr
from jaxsim.rbda.contacts.soft_contacts import SoftContactsParams
from jaxsim.rbda.contacts.soft import SoftContactsParams


def test_box_with_external_forces(
Expand Down

0 comments on commit d3b7d38

Please sign in to comment.