Skip to content

Commit

Permalink
Add docs for type aliases for 2D vector, line, circle, robot pose, an…
Browse files Browse the repository at this point in the history
…d range
  • Loading branch information
ll7 committed Feb 13, 2024
1 parent 7deb982 commit 87c55a1
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions robot_sf/sensor/range_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,23 @@

from robot_sf.nav.occupancy import ContinuousOccupancy


Vec2D = Tuple[float, float]
RobotPose = Tuple[Vec2D, float]
Range = Tuple[float, float]
"""Type alias for a 2D vector represented as a tuple of two floats"""


Vec2D = Tuple[float, float]
Line2D = Tuple[Vec2D, Vec2D]
"""Type alias for a 2D line represented as a tuple of two 2D vectors (start and end points)"""

Circle2D = Tuple[Vec2D, float]
"""Type alias for a 2D circle represented as a tuple of a 2D vector (center) and a float (radius)"""

RobotPose = Tuple[Vec2D, float]
"""
Type alias for a robot's pose represented as a tuple of a 2D vector (position)
and a float (orientation)
"""

Range = Tuple[float, float]
"""Type alias for a range represented as a tuple of two floats"""


@numba.njit(fastmath=True)
Expand Down

0 comments on commit 87c55a1

Please sign in to comment.