Atlas Robotics
Tuning Nav2Advanced

Controller tuning: adjusting DWB critic weights

Atlasbot · 17/8/2026 · 12 min read

Controller tuning: adjusting DWB critic weights
Each critic pulls the trajectory in a different priority direction

The article Controller introduced critics (ObstacleFootprint, PathAlign, GoalAlign...) scoring trajectory candidates in DWB. This is the last article in the Tuning Nav2 — series to synthesize all the parameters learned in previous articles into a systematic editing procedure.

Key concepts

FollowPath:
  critics: ["ObstacleFootprint", "PathAlign", "GoalAlign", "PathDist", "GoalDist", "Oscillation"]
  ObstacleFootprint.scale: 0.02
  PathAlign.scale: 32.0
  GoalAlign.scale: 24.0
  PathDist.scale: 32.0
  GoalDist.scale: 24.0
ObstacleFootprint — penalizes trajectories approaching obstacles (combined with Costmap)
PathAlign          — rewards HEADING alignment with the path at the nearest point
PathDist           — rewards POSITION close to the path
GoalAlign          — rewards trajectories pointing directly toward the final goal
GoalDist           — rewards trajectories approaching the final goal
Oscillation        — penalizes repeated direction changes (Tuning rotation)

Each critic "pulls" a choice of trajectory in a different preferred direction — the total score is a weighted combination of all scale the higher the critic has a decisive voice.

How it works

Systematic weighting procedure:

1. Start with Nav2's widely tested default weights
2. Observe actual behavior and clearly record the specific symptom
   (rather than a vague statement such as "not running well")
3. Identify the critic directly related to that symptom
4. Change only ONE critic at a time, by a small amount (for example, ±20%)
5. Retest, observe, and repeat step 3

In summary: Regulating multiple critics at once is the most common mistake — where behavior changes, it is impossible to know exactly which critic causes the effect, prone to a systematic trial - error loop. Always correct one parameter, observe clearly, then move on to the next one — in accordance with basic scientific principles in experiment, not just Nav2.

Technical details

Formulas

The candidate trajectory sum is the weighted linear combination of every critic — understanding this formula helps to predict the direction of influence when correcting a scale:

Total_score(trajectory) = Σ (scale_i × critic_score_i(trajectory))

Increasing a critic's scale → increases its weight in the total score
→ the chosen trajectory is pulled more strongly toward that critic's preference,
  relative to the other critics (without changing their absolute values)

This is why relative tuning matters more than absolute tuning — reducing PathAlign.scale can have the same effect as increasing ObstacleFootprint.scale (both give the obstacle critic relatively more influence), even though they are different operations.

Parameters

SymptomCritic needs review
Robots cut corners, do not follow pathsIncrease PathAlign.scale, PathDist.scale
Robot is too close to the obstacleIncrease ObstacleFootprint.scale, or Review inflation_radius (Ligning Costmap)
The robot takes the path first when it's going through the danger zone.Reduction of PathAlign.scale relative to ObstacleFootprint.scale
Wobbling near the targetSee Article Tuning Rotation , increasing Oscillation.scale
"Reasonable" trajectory, but not the fastest destination.Increasing GoalDist.scale, GoalAlign.scale

Practical applications

Controlled tests: to compare equally the effects of each parameter change, tests on the same fixed scenario each time (the same map, the same starting point, the same destination point, ideally using ros2 bag — paper ros2 bag — recording a real LiDAR/odometry scenario and replaying it several times) — changes the test environment between trials making it impossible to distinguish between effects due to new parameters or different environmental conditions. This empirical discipline is just as important as understanding what each critic means.

Practical example

Practical debugging scenario: the robot cuts too close to inside corners in a warehouse,
even though the planner's path leaves enough clearance

Step 1: record the exact symptom — cutting corners means taking a shortcut through
        the inside of a turn instead of following the planned path
Step 2: from the Parameters table, PathAlign/PathDist scales are
        too weak relative to GoalDist/GoalAlign (the robot favors reaching the goal
        quickly over following the correct path)
Step 3: change ONE parameter — raise PathAlign.scale from 32.0 to 38.0 (+~20%)
Step 4: retest the exact same scenario (using the same recorded bag)
Step 5: observe: path following is clearly better -> keep this change
        If corner cutting remains: raise it by another ~20% and repeat

Common mistakes

  • Multiple critic changes at the same time— as stated in the Abstract, cannot accurately identify which critic causes the observed effect, prone to an amorphous trial-error loop.
  • Tests on different environments/scripts between— trials cannot fairly compare the effects of parameter changes, easily erroneously concluded due to interference from changing environmental conditions.
  • Recording generic symptoms ("not running well") rather than specific— does not have enough information to properly identify the relevant criticism, leading to incorrect parameter corrections that do not correctly resolve the original problem.
  • Without understanding the linear combinatorial formula, tuning scales to the sentiment "as high as possible" — as in the Formula section, indiscriminately increasing a scale without considering the relative influence on other critics is prone to an overall behavioral imbalance.

Conclusion

Rating criticism is the final, most subtle tuning step in the Nav2 Tuning sequence. — should only be done after the basic physical limitations (velocity, acceleration, footprint) are right. Systematic process — one parameter once, test on fixed scenarios, record specific symptoms — is more important discipline than memorizing the meaning of each critic. The Navigation Nav2 item has gone through all the parameters: Velocity , Acceleration , Rotation , Footprint , Costmap , and Controller — in the right order to refine when implementing Nav2 on a real robot: from the fundamental physical limit to more refined behavioral parameters. It also closes the entire ROS2 Navigation / Nav2 column, from the platform concept, SLAM, Localization, Nav2 framework, to the complete real-world refinement.

Get new articles and lessons by email

When a new technical article or course module is published, Atlas Robotics sends you a short email. No spam.

Unsubscribe any time with the link in each email. See our Privacy policy.

Controller tuning: adjusting DWB critic weights — Atlas Robotics