Skip to content

Commit

Permalink
Update docstrings and return type of js.ode.system_dynamics
Browse files Browse the repository at this point in the history
  • Loading branch information
flferretti committed Feb 18, 2025
1 parent 5acaf49 commit f9e0675
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/jaxsim/api/ode.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import jaxsim.api as js
import jaxsim.typing as jtp
from jaxsim.api.data import JaxSimModelData
from jaxsim.math import Quaternion, Skew

from .common import VelRepr
Expand Down Expand Up @@ -123,7 +122,7 @@ def system_dynamics(
link_forces: jtp.Vector | None = None,
joint_torques: jtp.Vector | None = None,
baumgarte_quaternion_regularization: jtp.FloatLike = 1.0,
) -> JaxSimModelData:
) -> dict[str, jtp.Vector]:
"""
Compute the dynamics of the system.
Expand All @@ -139,9 +138,9 @@ def system_dynamics(
quaternion (only used in integrators not operating on the SO(3) manifold).
Returns:
A tuple with an `JaxSimModelData` object storing in each of its attributes the
corresponding derivative, and the dictionary of auxiliary data returned
by the system dynamics evaluation.
A dictionary containing the derivatives of the base position, the base quaternion,
the joint positions, the base linear velocity, the base angular velocity, and the
joint velocities.
"""

with data.switch_velocity_representation(velocity_representation=VelRepr.Inertial):
Expand Down

0 comments on commit f9e0675

Please sign in to comment.