From 598abebd6042beb304478dfdfae5efb1dfbd0f3a Mon Sep 17 00:00:00 2001
From: diegoferigo <diego.ferigo@iit.it>
Date: Wed, 9 Oct 2024 15:02:42 +0200
Subject: [PATCH] Fix max_squarings argument of visco-elastic contact model

---
 src/jaxsim/rbda/contacts/visco_elastic.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/jaxsim/rbda/contacts/visco_elastic.py b/src/jaxsim/rbda/contacts/visco_elastic.py
index dcbfd3d20..9bd686d8d 100644
--- a/src/jaxsim/rbda/contacts/visco_elastic.py
+++ b/src/jaxsim/rbda/contacts/visco_elastic.py
@@ -195,7 +195,7 @@ class ViscoElasticContacts(common.ContactModel):
         default_factory=FlatTerrain
     )
 
-    max_squarings: jax_dataclasses.Static[int] = 25
+    max_squarings: jax_dataclasses.Static[int] = dataclasses.field(default=25)
 
     @classmethod
     def build(
@@ -239,7 +239,7 @@ def build(
             parameters=parameters,
             terrain=terrain or cls.__dataclass_fields__["terrain"].default_factory(),
             max_squarings=int(
-                max_squarings or cls.__dataclass_fields__["max_squarings"].default()
+                max_squarings or cls.__dataclass_fields__["max_squarings"].default
             ),
         )