Skip to content

Commit bb2c24e

Browse files
committed
Use custom warning to print model reduction warning once
1 parent 345d41e commit bb2c24e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/jaxsim/parsers/descriptions/model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from collections.abc import Sequence
66

77
from jaxsim import logging
8+
from jaxsim.logging import jaxsim_warn
89

910
from ..kinematic_graph import KinematicGraph, KinematicGraphTransforms, RootPose
1011
from .collision import CollidablePoint, CollisionShape
@@ -164,7 +165,7 @@ def reduce(self, considered_joints: Sequence[str]) -> ModelDescription:
164165
A `ModelDescription` instance that only includes the considered joints.
165166
"""
166167

167-
logging.warning(
168+
jaxsim_warn(
168169
"The joint order in the model description is not preserved when reducing "
169170
"the model. Consider using the `names_to_indices` method to get the correct "
170171
"order of the joints, or use the `joint_names()` method to inspect the internal joint ordering."

0 commit comments

Comments
 (0)