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.
- Set both local and global lethal_cost_threshold correctly
- 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: )
- Tried Simulating various obstacle configurations (frontal, lateral, small) but the planner still favors a path dangerously close to obstacles.
- 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.
- Updated my nav2 repo packages with the most recent ROS2 Iron branch : Iron Branch
- 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
Questions:
- 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?
- 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