Navigation Messages (C++)
Path planning and goal types in horus::msg::. Include via <horus/msg/navigation.hpp>.
Quick Reference
| Type | Key Fields | Use Case |
|---|---|---|
NavGoal | target_x, target_y, target_theta, tolerance | Send navigation target |
GoalResult | success, distance_error, angle_error | Navigation completion |
Waypoint | x, y, heading, velocity | Path waypoint |
PathPlan | waypoint_data[768], waypoint_count, goal_pose[3] | Planned path |
VelocityObstacle | center[2], velocity[2], radius | Collision avoidance |
NavGoal — Send Navigation Target
horus::msg::NavGoal goal{};
goal.target_x = 5.0; // meters
goal.target_y = 3.0; // meters
goal.target_theta = 1.57; // radians (face east)
goal.tolerance = 0.1f; // accept within 10cm
goal.timestamp_ns = 0;
PathPlan — Compact Path Representation
768 floats = 256 waypoints x 3 values (x, y, heading):
horus::msg::PathPlan plan{};
plan.waypoint_count = 3;
plan.goal_pose[0] = 5.0f; // goal x
plan.goal_pose[1] = 3.0f; // goal y
plan.goal_pose[2] = 0.0f; // goal heading
// Waypoint 0: (0,0,0)
plan.waypoint_data[0] = 0.0f;
plan.waypoint_data[1] = 0.0f;
plan.waypoint_data[2] = 0.0f;
// Waypoint 1: (2.5, 1.5, 0.5)
plan.waypoint_data[3] = 2.5f;
plan.waypoint_data[4] = 1.5f;
plan.waypoint_data[5] = 0.5f;
// Waypoint 2: (5.0, 3.0, 0.0) = goal
plan.waypoint_data[6] = 5.0f;
plan.waypoint_data[7] = 3.0f;
plan.waypoint_data[8] = 0.0f;
See Also
- Geometry Messages — Pose2D used by Odometry
- Recipe: LiDAR Avoidance — reactive navigation