PythonRobotics
PythonRobotics copied to clipboard
Fix/path smoothing robot radius
Reference issue
- fix #1230 Fixes path smoothing safety issue discussed in #1230
What does this implement/fix?
This PR fixes an issue in the path_smoothing() function, where the collision checking via line_collision_check() did not take robot_radius into account correctly. This caused the smoothed path to pass dangerously close to obstacles.
- Modified
line_collision_check()to check collision along finite-length line segments and incorporaterobot_radius. - Updated
path_smoothing()logic to use this corrected check. - Added a new unit test to verify that smoothed paths maintain clearance from obstacles based on robot radius.
Additional information
- Confirmed original vs smoothed paths via animation and test assertions.
CheckList
- [x] Did you add an unittest for your new example or defect fix?
- [ ] Did you add documents for your new example? N/A (not a new algorithm)
- [x] All CIs are green? (You can check it after submitting)