This is a path planning with Elastic Bands.
.. autoclass:: PathPlanning.ElasticBands.elastic_bands.ElasticBands
- Elastic Band: A dynamically deformable collision-free path initialized by a global planner.
- Objective:
- Shorten and smooth the path.
- Maximize obstacle clearance.
- Maintain global path connectivity.
Definition: A local free-space region around configuration b:
B(b) = \{ q: \|q - b\| < \rho(b) \},where \rho(b) is the radius of the bubble.
The elastic band deforms under artificial forces:
Purpose: Reduces path slack and length.
Formula: For node b_i:
f_c(b_i) = k_c \left( \frac{b_{i-1} - b_i}{\|b_{i-1} - b_i\|} + \frac{b_{i+1} - b_i}{\|b_{i+1} - b_i\|} \right)where k_c is the contraction gain.
Purpose: Pushes the path away from obstacles.
Formula: For node b_i:
f_r(b_i) = \begin{cases} k_r (\rho_0 - \rho(b_i)) \nabla \rho(b_i) & \text{if } \rho(b_i) < \rho_0, \\ 0 & \text{otherwise}. \end{cases}where k_r is the repulsion gain, \rho_0 is the maximum distance for applying repulsion force, and \nabla \rho(b_i) is approximated via finite differences:
\frac{\partial \rho}{\partial x} \approx \frac{\rho(b_i + h) - \rho(b_i - h)}{2h}.
Node Update:
b_i^{\text{new}} = b_i^{\text{old}} + \alpha (f_c + f_r),where \alpha is a step-size parameter, which often proportional to \rho(b_i^{\text{old}})
2. Overlap Enforcement: - Insert new nodes if adjacent nodes are too far apart - Remove redundant nodes if adjacent nodes are too close
