Navigation Messages
Data types for autonomous navigation — goals, paths, maps, and obstacle avoidance.
from horus import NavGoal, GoalResult, PathPlan, Waypoint, NavPath, OccupancyGrid, CostMap
NavGoal
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(),
)
| Field | Type | Default | Description |
|---|---|---|---|
x, y, theta | float | 0.0 | Target pose (m, rad) |
position_tolerance | float | 0.1 | Position tolerance (m) |
angle_tolerance | float | 0.1 | Heading tolerance (rad) |
timeout | float | 30.0 | Goal timeout (seconds) |
timestamp_ns | int | 0 | Timestamp in nanoseconds |
GoalResult
Navigation goal outcome.
result = horus.GoalResult(goal_id=1, status=0, progress=1.0, timestamp_ns=horus.timestamp_ns())
| Field | Type | Default | Description |
|---|---|---|---|
goal_id | int | 0 | Associated goal identifier |
status | int | 0 | Result status code |
progress | float | 0.0 | Completion progress (0.0-1.0) |
timestamp_ns | int | 0 | Timestamp in nanoseconds |
Waypoint
Single waypoint in a path.
wp = horus.Waypoint(x=2.0, y=3.0, theta=0.0)
| Field | Type | Default | Description |
|---|---|---|---|
x, y, theta | float | 0.0 | Waypoint pose (m, rad) |
NavPath
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())
| Field | Type | Default | Description |
|---|---|---|---|
goal_x, goal_y, goal_theta | float | 0.0 | Goal pose (m, rad) |
timestamp_ns | int | 0 | Timestamp 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)
| Field | Type | Default | Description |
|---|---|---|---|
width, height | int | 0 | Grid dimensions (cells) |
resolution | float | 0.05 | Meters per cell |
CostMap
Weighted grid for path planning — higher cost = harder to traverse.
costmap = horus.CostMap(width=100, height=100, resolution=0.05)
| Field | Type | Default | Description |
|---|---|---|---|
width, height | int | 0 | Grid dimensions (cells) |
resolution | float | 0.05 | Meters 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
| Field | Type | Default | Description |
|---|---|---|---|
px | float | 0.0 | Position X (m) |
py_ | float | 0.0 | Position Y (m) — note trailing underscore |
vx, vy | float | 0.0 | Velocity (m/s) |
radius | float | 0.0 | Obstacle radius (m) |
time_horizon | float | 1.0 | Planning time horizon (s) |
obstacle_id | int | 0 | Obstacle identifier |
See Also
- Geometry Messages — Pose2D, Twist, Vector3
- Sensor Messages — LaserScan, Odometry
- Rust Navigation Messages — Rust equivalent