8. Following a route
path_follower_node walks the robot along a taught route, stops and dwells at its stop points, and reports its state on navigation/status.
8.1 From a recording to a route
Teaching records the localized pose every min_spacing_m (0.2 m). Loading the route then cleans it: duplicate points go, the route is resampled every processing.spacing (0.1 m) and smoothed between anchors that never move (the ends and the stop points). The smoothed points
solved at once as a tridiagonal system, with smooth_weight_data (0.05) and smooth_weight_smooth (0.4). A larger max_deviation (0.3 m): the robot would leave the walkway that was taught.
8.2 The speed profile
Each point of the route gets a speed limit, computed once when the route loads:
Curves: with
the curvature, , clipped to [ min_speed,cruise] (: lateral_accel).Stops: stop points and the end at
approach_speed.Braking into them, backwards along the route:
, and the reaction time of the braking model (Eq. (2.2)) before each stop. Accelerating out, forwards:
.
| Curve radius | 0.5 m | 1 m | 2 m | straight |
|---|---|---|---|---|
| Limit ( | 0.39 m/s | 0.55 m/s | 0.77 m/s | cruise |
The X30’s cruise is 0.4 m/s: only curves tighter than about 0.5 m slow it. accel and decel (0.3 m/s2) are comfort values, below the profile’s braking: the robot slows into a stop point gently, not at the field’s limit.
8.3 The path controllers
Every controller gets the robot’s pose, the route, its progress controller picks one; the X30 uses holonomic.
8.3.1 Holonomic (the X30’s)
A carrot is taken lookahead (0.6 m) ahead along the route. The robot walks toward it in its own frame at heading_lookahead:
with kp_yaw (1.5 1/s). The sideways part is capped at max_lateral_speed (above the X30’s Walk gait the envelope caps it again at max_vy), the backward part at max_reverse_speed. A longer lookahead cuts corners and sways less; a shorter one tracks tighter.
8.3.2 The others
pure_pursuitthe arc through the carrot at lookahead: with the carrot at in the robot frame, and . stanleythe route’s curvature as feedforward plus the cross-track errorand the heading error : . keeps low speeds from over-steering. pidPID on the heading error toward the carrot, the integral clamped atintegral_limitand frozen while the output saturates (anti-windup).lqrthe path errorof a unicycle at speed , discretized at the control period : . The gain solves the discrete Riccati equation for and (cached every 5 cm/s of speed); . mppisamplesyaw-rate sequences drawn around the previous plan, each rolled out as a unicycle overhorizon_steps; the cost is the distance to the route, the distance of the end to the carrot andobstacle_weighttimes the deepest intrusion intoclearance. The sequences are averaged with the weights, temperature.neupanNeuPAN plans forward, sideways and yaw motion over a horizon straight from the scan’s points, with a network (DUNE) trained for the X30’s footprint. It avoids by itself; the guard and the field stay. It needs its own Python environment (tools/install_neupan.sh).
8.4 Stops, joining and dwelling
- Joining a robot up to
join.max_distance(3 m) from the route first walks onto it, withinjoin.on_route. - Approach
approach.radiusbefore a stop point the follower leaves the controller and converges onto the exact pose:, , capped at approach.max_speedandapproach.max_yaw_rateand never belowapproach.min_speed(the X30’s slowest step). It arrives withinposition_tolerance(5 cm) andyaw_tolerance_deg(3°); a stop the robot passed by more thanskip_margincounts as skipped. - Dwelling at the stop the inspection runs (
hooks.inspection); the follower waits for it up to the dwell plushooks.inspection_timeout_sec(180 s on the X30, above the inspection’s own 150 s per point). - Battery below
low_batterythe lap finishes and no new one starts; belowcritical_batterythe robot pauses.
8.5 Smoothness
The command passes a last stage before it leaves: the profile’s envelope, a smoothing of the yaw rate and the sideways speed, speed.smoothing (0.5; 1: off), and the acceleration limits. A robot that weaves on a straight needs a lower
8.6 The supervisor
| Setting | Effect |
|---|---|
tf_timeout_sec, scan_timeout_sec | an older pose or safety scan stops the robot |
off_path_slow, off_path_stop | farther from the route than 0.6 m: the floor speed; than 1.5 m: OFF_PATH, stopped |
blocked_timeout_sec | standing still (moved less than stall_distance and turned less than stall_yaw_deg) for 10 s: BLOCKED, reported to NETRA |
lateral_margin, human_speed, pass_margin, yaw_margin_deg | the guard’s model; at least the protective field’s values, checked at start against control_node |