I'm facing an issue where the SMAC Planner in Nav2 consistently plans paths too close to obstacles, often just on the margins or even within the inflated areas. My aim is for the planner to consistently choose paths that are significantly clear of obstacles, enhancing safety margins for my truck-sized robot. In figure below, it is seen the path violates the inflated obstacle region.

Violating Costmap Regions

Violate Inflated Regions Attempts

  1. Set both local and global lethal_cost_threshold correctly
  2. Doubled the inflation radius (assigned two times greater than my truck length), which visually affects the costmap but doesn't influence the planner's obstacle avoidance as expected. Decreasing cost_scaling_factor didn't help expand the effective repulsive either (as suggested here: )
  3. Tried Simulating various obstacle configurations (frontal, lateral, small) but the planner still favors a path dangerously close to obstacles.
  4. Tried different global Planners (SMAC Hybrid with Reeds_Sheep Motion, NAVFN, and SMAC Planner Lattice). Unfortunately, all of them plan very closely and even violate the inflated obstacle's region.
  5. Updated my nav2 repo packages with the most recent ROS2 Iron branch : Iron Branch
  6. I have read and tried solutions provided for these similar questions and issues below:

A) SmacPlannerHybrid creates kinematically infeasible path

B) SMAC Planner Enable goal orientation non-specificiy

C) SMAC Planner Start and goal are moved to closest cell

D) Planner does not respect obstacles from costmap filter

E) Robot Drives Near Keepout Zones, and Stops when "incidentally" enters the keepout zone

F) How to avoid planner jumping between 2 possible path


  1. Are there specific parameters or configurations within Nav2's costmap or SMAC Planner that could force a greater clearance from obstacles? I mean to expand the lethal region for the inflated spot and the next cells around it?
  2. How can I ensure that the planner avoids not just the obstacles but also their immediate vicinity more effectively?

My configuration file is following this link nav2_params.yaml

A video of this behavior is following: Global Planner Violate Lethal Region


2 Answers 2


This seems to be another report of the issue in https://github.com/open-navigation/navigation2/issues/4271. We are currently discussing over there and I encourage you to get involved and help us look into this!

But if nothing else, your inflation settings are odd. See more in that ticket.

  • $\begingroup$ Thanks to guide me to a solution Steve I will dive into this link! I am increasing the global and local costamp resolution as work around. It is producing suboptimal and poor path, however it seems having some effect in avoiding the obstacles at least. $\endgroup$ Commented May 6 at 20:13
  • $\begingroup$ I would be very grateful if you have some time to provide me some hint on this elliptical path issue robotics.stackexchange.com/questions/111023/… . To fix this I am planning to create keep out zones using camera data (filtering out the grass and crops assigning blocked areas) since I will navigate off-road. I mean we have a segmentation camera node, which split navigable vs non-navigable are. Do you think is it the best alternative to get rid of this ellipsis behavior? I have seen masks just manually added. $\endgroup$ Commented May 6 at 20:18

It seems the Steve Commit has improved the collision checking and avoidance for the Ackerman motion model. I applied this modification to my local nav2_smac_planner and set the costmap resolutions (global and local) to 2.0. Another key parameter was setting the inflation_radius greater than my robot's footprint(maximum length = 10 meters), so let it to 15.0.

This setup helped simulate collision avoidance, but occasionally, the truck still gets too close to obstacles or collide to obstacles' corners. In the next video, the truck just stopped very close to ambulance, due to the collision monitor action:

SMAC not avoid collision

However, as said, sometimes the avoidance is addressed correctly! The result of this successful behavior can be visualized in the video below:

SMAC Planner Avoided Collision

Despite achieving the "Reached the Goal!" and "Goal Succeded" messages, I aim for smoother, faster paths-follow path with a safer offset from obstacles. I wand the truck to start collision checking earlier, preparing sooner a transition away from obstacles. Let's see check what this discussion can still bring: SMAC Planner Hybrid Issue to create kinematically Feasible Path


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.