Skip to content

Commit

Permalink
orbita_axis.py dosctring
Browse files Browse the repository at this point in the history
  • Loading branch information
glannuzel committed Oct 9, 2024
1 parent e11029e commit a059964
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/reachy2_sdk/orbita/orbita_axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,20 @@ def __init__(self, initial_state: Dict[str, FloatValue]) -> None:

@property
def present_speed(self) -> float:
"""
Get the present speed of the axis in rad/s.
"""
"""Get the present speed of the axis in radians per second."""
return to_position(self._present_speed)

@property
def present_load(self) -> float:
"""
Get the present load of the axis in N.
"""
"""Get the present load of the axis in Newtons."""
return float(self._present_load)

def _update_with(self, new_state: Dict[str, FloatValue]) -> None:
"""Update the present speed and load of the axis with new state values.
Args:
new_state: A dictionary containing the new state values for the axis. The keys should include
"present_speed" and "present_load", with corresponding FloatValue objects as values.
"""
self._present_speed = new_state["present_speed"].value
self._present_load = new_state["present_load"].value

0 comments on commit a059964

Please sign in to comment.