Navigation Messages

Data types for autonomous navigation — goals, paths, maps, and obstacle avoidance.

from horus import NavGoal, GoalResult, PathPlan, Waypoint, NavPath, OccupancyGrid, CostMap

Navigation goal — target pose with tolerance.

import horus

goal = horus.NavGoal(
    x=5.0, y=3.0, theta=1.57,
    position_tolerance=0.1,
    angle_tolerance=0.05,
    timeout=30.0,
    timestamp_ns=horus.timestamp_ns(),
)
FieldTypeDefaultDescription
x, y, thetafloat0.0Target pose (m, rad)
position_tolerancefloat0.1Position tolerance (m)
angle_tolerancefloat0.1Heading tolerance (rad)
timeoutfloat30.0Goal timeout (seconds)
timestamp_nsint0Timestamp in nanoseconds

GoalResult

Navigation goal outcome.

result = horus.GoalResult(goal_id=1, status=0, progress=1.0, timestamp_ns=horus.timestamp_ns())
FieldTypeDefaultDescription
goal_idint0Associated goal identifier
statusint0Result status code
progressfloat0.0Completion progress (0.0-1.0)
timestamp_nsint0Timestamp in nanoseconds

Waypoint

Single waypoint in a path.

wp = horus.Waypoint(x=2.0, y=3.0, theta=0.0)
FieldTypeDefaultDescription
x, y, thetafloat0.0Waypoint pose (m, rad)

Ordered list of waypoints. Created with no parameters.

path = horus.NavPath()

PathPlan

Planned path to a goal.

plan = horus.PathPlan(goal_x=5.0, goal_y=3.0, goal_theta=1.57, timestamp_ns=horus.timestamp_ns())
FieldTypeDefaultDescription
goal_x, goal_y, goal_thetafloat0.0Goal pose (m, rad)
timestamp_nsint0Timestamp in nanoseconds

OccupancyGrid

2D grid map — each cell is free (0), occupied (100), or unknown (-1).

grid = horus.OccupancyGrid(width=100, height=100, resolution=0.05)
FieldTypeDefaultDescription
width, heightint0Grid dimensions (cells)
resolutionfloat0.05Meters per cell

CostMap

Weighted grid for path planning — higher cost = harder to traverse.

costmap = horus.CostMap(width=100, height=100, resolution=0.05)
FieldTypeDefaultDescription
width, heightint0Grid dimensions (cells)
resolutionfloat0.05Meters per cell

VelocityObstacle / VelocityObstacles

Dynamic obstacle representation for reactive avoidance.

vo = horus.VelocityObstacle(
    px=2.0, py_=1.0,
    vx=0.5, vy=0.0,
    radius=0.3,
    time_horizon=1.0,
    obstacle_id=0,
)
vos = horus.VelocityObstacles()  # No parameters
FieldTypeDefaultDescription
pxfloat0.0Position X (m)
py_float0.0Position Y (m) — note trailing underscore
vx, vyfloat0.0Velocity (m/s)
radiusfloat0.0Obstacle radius (m)
time_horizonfloat1.0Planning time horizon (s)
obstacle_idint0Obstacle identifier

See Also