Repository navigation
nav: plan_vehicle_route, routes a vehicle with a turning circle can drive (P9 R1) - #704
Merged
Merged
Conversation
…rive (P9 R1) grid_nav::astar plans for a point that turns on the spot. The physics plant's Humvees (a 6.7 m turning circle, 4.8 m long) wedge where such a route asks for a turn tighter than their circle or a U-turn in a narrow street. plan_vehicle_route is a Hybrid A* over the rear axle's pose (x, y, heading): - arcs of 1.5 cells at five curvatures up to 1 / min_radius, forward or backing up; - every footprint disc kept clear of the walls on the grid's exact distance transform; - the cost is the length, with backing up dearer (2x) and each cusp dearer still (4 steps), a little for steering and its changes, and for coming near a wall; - the heuristic is the free-space distance to the goal, weighted 1.5 (weighted A*). A dead end or a tight corner comes back as a multi-point turn (reverse poses between cusps); a wedged start may stay as close as it is for its first moves, so the route leads it out. route_clearance checks a pose's footprint. nav_vehicle_route_test (7, the Humvee on 1 m cells): straight across open ground; it turns round within its circle; it backs out of an 8 m dead end the bicycle turns round in; it takes a corner between 9 m streets; it leads a wedged vehicle out; it reports an enclosed goal; and it crosses a 384 m city in 740 expansions and 8 ms (heuristic x1: 168,000 and 0.63 s, a route 1.9% shorter). Every route turns within the circle and keeps the body clear.
… on its own grid On Austin's 7.8 m cells (3 km on 384) a 1.5-cell move is 11.7 m, which turns a Humvee 100 degrees in one arc, and keying the closed set on the occupancy cells prunes moves that stay in a cell. The default step is now at most 0.6 x min_radius and the closed set is keyed at step / 1.5. On the tests' 1 m cells the Humvee's routes are unchanged. The bicycle (a 1.03 m radius) searches finer and turns in the dead end with a 1.2 m backing nudge.
The exact search took 6.06 s in the Linux Debug package builds against a 5 s limit. The weighted searches stay under 5000 expansions (740 and 586) on any machine.
transfix
force-pushed
the
feat/nav-vehicle-routes
branch
from
October 19, 2026 02:50
7f224fb to
10de8ac
Compare
This was referenced Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first step of vehicle-aware routes (Joe: "start vehicle-aware routes").
The problem
grid_nav::astarplans for a point that turns on the spot. On the Jolt plant (#702) a Humvee has a 6.7 m turning circle and a 4.8 m body. In the Austin finale it wedges where its route asks for a turn tighter than that circle, or a U-turn in a narrow street.The planner
plan_vehicle_route(inc/cvc/nav/vehicle_route.h) is a Hybrid A* over the rear axle's pose (x, y, heading):1/min_radius, forward or backing up.edt2_squared).comfort.The output is poses with gear, so a dead end or a too-tight corner becomes a multi-point turn. A wedged start, already touching a wall, may stay as close as it is for its first moves, so the route leads it out.
route_clearancechecks a pose. Nav-only: it doesn't depend on #702, and takes the footprint as plain offsets and radius (#702'splant_plan_ofprovides them).Measured (
nav_vehicle_route_test, 7 tests; Humvee on 1 m cells)Every route turns no tighter than the vehicle can and keeps its body clear of the walls.
Next
sim_world(a command override for backing up and stopping at cusps).