Skip to content

Costmap based precision controller for trajectory controller#2350

Draft
mustafab0 wants to merge 52 commits into
mainfrom
mustafa/feature/auto-emax-governor
Draft

Costmap based precision controller for trajectory controller#2350
mustafab0 wants to merge 52 commits into
mainfrom
mustafa/feature/auto-emax-governor

Conversation

@mustafab0
Copy link
Copy Markdown
Contributor

@mustafab0 mustafab0 commented Jun 3, 2026

Auto e_max governor for precision-nav

Adds a CostmapPrecisionGovernor module that watches the global costmap and continuously sets the precision path follower's corridor half-width (e_max) from how cluttered the area around the robot is. Open spaces relax the corridor so the robot can drive faster; tight cluttered areas tighten it so the robot slows and tracks the path closely.

What's in this PR

  • dimos/navigation/costmap_precision_governor/module.py — the new governor module.
    Subscribes to global_costmap: In[OccupancyGrid] and odom: In[PoseStamped],
    and publishes e_max: Out[Float32].

How to test

Pull the bundled outputs and inspect them:

git lfs pull --include="data/.lfs/characterization.tar.gz,data/.lfs/benchmark.tar.gz"
tar -xzf data/.lfs/characterization.tar.gz -C data/
tar -xzf data/.lfs/benchmark.tar.gz -C data/

On the robot:

dimos run unitree-go2-precision-nav

Where to change the artifact path

The characterization artifact path is set in dimos/robot/unitree/go2/blueprints/basic/unitree_go2_coordinator.py on the precision_follower TaskConfig (around line 100). Default points at data/characterization/go2/go2_config_hw_concrete_2026-05-28_normal.json.

To override per run without editing the file:

dimos run unitree-go2-precision-nav \
  -o coordinator.tasks[2].params.artifact_path=<full/path/to.json>

tasks[2] is the precision_follower (after vel_go2 and path_follower in the task list).

Config knobs (governor)

All live on CostmapPrecisionGovernorConfig and are overridable per-run with -o costmap_precision_governor.<knob>=...:

knob default meaning
d_near 0.30 m clearance at or below this → e_max_low
d_far 1.50 m clearance at or above this → e_max_high
e_max_low 0.10 m corridor in tight spaces
e_max_high 0.90 m corridor in open spaces
hysteresis_delta 0.02 m minimum change before republishing
lookahead_m 0.50 m sample point projected along robot heading (0 = at robot)
obstacle_threshold 50 costmap cell value treated as occupied

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant