Skip to content

Commit

Permalink
Add docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalzauberzeug committed Jan 22, 2025
1 parent a3fd6d7 commit 3795bc6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rosys/hardware/imu.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class ImuMeasurement:


class Imu(Module):
"""A module that provides measurements from an IMU."""

def __init__(self, offset_rotation: Rotation | None = None, **kwargs) -> None:
super().__init__(**kwargs)
Expand Down Expand Up @@ -93,6 +94,7 @@ def developer_ui(self) -> None:


class ImuHardware(Imu, ModuleHardware):
"""A hardware module that handles the communication with an IMU."""

def __init__(self, robot_brain: RobotBrain, name: str = 'imu', **kwargs) -> None:
self.name = name
Expand Down Expand Up @@ -121,6 +123,7 @@ def handle_core_output(self, time: float, words: list[str]) -> None:


class ImuSimulation(Imu, ModuleSimulation):
"""Simulation of an IMU."""

def __init__(self, *, wheels: WheelsSimulation, interval: float = 0.1, roll_noise: float = 0.0, pitch_noise: float = 0.0, yaw_noise: float = 0.0, **kwargs) -> None:
super().__init__(**kwargs)
Expand Down

0 comments on commit 3795bc6

Please sign in to comment.