A robot that only avoids obstacles treats a person like a box. People expect more room than that. I tested this in a simulated office with twelve walking people.
Phase 1: a costmap layer that knows about people
I wrote a custom Nav2 costmap layer in C++. It paints a cost field around each tracked person, following the intimate, personal and social zones from proxemics. This hand-tuned version was the baseline.
Phase 2: learning the distances
A Soft Actor-Critic agent then adjusts those three distances every half second, instead of using fixed values. Because it changes the costmap and not the controller, the approach works with any local controller.
Four rounds of reward design
- Version 1: the agent inflated the personal space until no path existed, and it reached no goals.
- Version 2: tighter limits led to an aggressive policy that squeezed past people.
- Version 3: a social force term removed collisions, but goal completion stayed low.
- Version 4: placing a local goal 2 m ahead on the planned path brought goal completion level with the baseline.
What else I found
Swapping the local controller mattered more than any reward change. With the same settings, moving from Regulated Pure Pursuit to DWB raised the minimum distance from 0.62 m to 1.12 m.
Limits
Each setup ran for only 10 episodes, so small differences are not reliable. The collision and distance gains stand out, but this is not proof at scale. Training was limited to about 3,000 steps on a CPU, and the simulator could not reset between episodes, which made training unstable.


