Atlas Robotics
Tuning Nav2Intermediate

Rotation tuning: stable turning in place instead of oscillation

Atlasbot · 17/8/2026 · 11 min read

Rotation tuning: stable turning in place instead of oscillation
The robot wobbles back and forth instead of turning in one direction.

The article Tuning Velocity stated max_vel_theta. The rotational motion alone has a few parameters and a particular phenomenon deserves closer discussion — especially the "oscillation" phenomenon when the robot tries to turn in the right direction [...].

Key concepts

Symptom: the robot turns slightly right, then slightly left, repeatedly,
         instead of turning decisively in one direction toward the goal

Common causes: min_vel_theta (minimal rotation speed) is too close to 0, or the weights of critics (learned in Controller ) relative to direction (GoalAlign, PathAlign) conflict, causing the DWB to constantly switch between "a little better right" and "a little better left" at each new calculation cycle.

How it works

FollowPath:
  min_vel_theta: 0.15    # set large enough to avoid "drop" rotation near 0
  Oscillation.scale: 5.0  # increase penalty for continuous reversal

Another problem to handle separately: the robot differential - drive deviates significantly from the path (e.g., just turning through 90°) causing the DWB to try to both advance and rotate at the same time → anomalously curved trajectory, which is ineffective when the deviation is too large. Nav2 provides the RotationShimController — intermediate plugin, which, when detecting the misalignment angle between the robot direction and the path direction over a threshold, preferentially rotates in place until the direction is close to matching, before transferring to the master controller (DWB/MPPI) the normal path forward/backward handling:

controller_server:
  ros__parameters:
    controller_plugins: ["FollowPath"]
    FollowPath:
      plugin: "nav2_rotation_shim_controller::RotationShimController"
      primary_controller: "dwb_core::DWBLocalPlanner"
      rotate_to_heading_angular_vel: 1.8
      max_angular_accel: 3.2

In summary: Rotation Shim explicitly separates the two stages — "right - direction rotation" and "adaptive path movement" — rather than letting a single controller try to do both at once when the deviation angle is too large. This is a configuration solution (change plugin), not a mere parameter adjustment as in the other articles in this section.

Technical details

Formulas

acc_lim_theta affects the degree of "decisiveness" when rotating — like acc_lim_x (past) but for angular motion:

acc_lim_theta too low → slow - spinning, slow - achieving max_vel_theta,
                          more likely to feel "wobbly" if path requires
                          change direction continuously for short distances

The RotationShimController activation threshold is usually set at the deflection angle:
rotate_to_heading_min_angle ≈ 0.5-0.8 rad (~30-45°)
The offset above this threshold → preferentially rotates in place before advancing

Parameters

SymptomCheck
Wobbling back and forth as rotating in placemin_vel_theta, Oscillation.scale
anomalously curved trajectory on initial turnConsider RotationShimController
Slow,acc_lim_theta, max_vel_theta

Practical applications

In real-world AMR operation in warehouses with multiple folded turn corners (between close rows of shelves), wobble upon rotation is particularly prone if path generated from the Planner has multiple consecutive folding points (learned in the Lesson of the Planner — planner does not have an easy-to-generate postoperative smooth path of this kind). Combining RotationShimController for flexion turns with appropriate PathAlign.scale/Oscillation.scale increases helps the robot rotate more decisively, avoiding time-consuming and unprofessional-looking wobbling when operating the real-world in front of the user.

Practical example

Debugging scenario: the robot oscillates for ~5 seconds before actually starting
toward the goal, especially immediately after receiving a new goal

Step 1: check min_vel_theta — if near 0 (for example, 0.02), raise it to 0.15
Step 2: check Oscillation.scale — if low (for example, 1.0), raise it to 5.0
Step 3: retest the same scenario and observe whether oscillation remains
Step 4: if it still oscillates after a large heading change, consider RotationShimController
        rather than continuing to raise Oscillation.scale (which can have other side effects
        on normal path following)

Common mistakes

  • Set min_vel_theta too close to 0— as stated, causing a "drop" rotation phenomenon instead of a unidirectional definitive one.
  • Increasing Oscillation.scale too high to "cure"— can have a side effect on normal path-holding behavior in non-wiggling situations, considering RotationShimController for the root problem (large deviation angle) rather than just increasing the oscillation penalty.
  • Irrespective of "wobble in situ rotation" and "abnormal trajectory of just turning head" — two different symptoms, different causes and solutions (Performance Table), misdiagnosis leads to parameter correction.
  • Place acc_lim_theta too low for—-folded environments as shown in the Formulation section, which is more likely to cause a wobbling sensation when the path requires constant reorientation over short distances.

Conclusion

Wobbling on rotation has 2 different causes that need to be correctly diagnosed —min_vel_theta/Oscillation.scale for in situ wobbling, RotationShimController for an abnormal curvature trajectory when the deviation angle is too large. Not all rotation problems are solved by increasing a single penalty parameter. The next article in the column goes to Tuning Footprint — how the robot's physical shape affects the costmap.

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.

Rotation tuning: stable turning in place instead of oscillation — Atlas Robotics