planning-kit is an experimental toolbox implementing sampling-based motion planning for high-dimensional systems. The toolbox is exposed in the form of a Rust library with Python bindings.
- Download a recent
.whl
from GitHub Releases - Run
pip install planning_kit_py<...>.whl
(replace<...>
with the actual filename) - Test it:
python -c 'import planning_kit'
Plan around a sphere obstacle in
Lines 1 to 51 in 7579c0d
A state space (or configuration space) is defined by all possible configurations of the system. Arbitrary state space definitions are possible for use with the library.
For example, to define a Euclidean space (which has equivalent behavior to the built-in StateSpace.euclidean
):
planning-kit/demo/02_custom_space.py
Lines 1 to 32 in 7579c0d
Planning subject to manifold constraints is implemented via the unifying framework IMACS (implicit manifold configuration space) presented in [KiMK19]. Projection is used to adhere samples from an ambient space to the constrained manifold while preserving the planner properties of probabilistic completeness and asymptotic optimality.
In order to converge on an adhering sample, Newton's method is used to approximate the roots of the constraints. Constraint Jacobians (required for Newton's method) are automatically computed via central finite difference or complex-step differentiation, or are provided analytically.
For example, we can define a constraint which confines the state space to the surface of a unit sphere. With this constraint, we can define a state space which is automatically projected into the manifold. This state space can be used like any other, e.g. for use in motion planning algorithms.
planning-kit/demo/03_constraints.py
Lines 1 to 33 in 7579c0d
Planner | Category | Optimal | Reference |
---|---|---|---|
PRM | Multi-query | ❌ | [KSLO96] |
RRT | Single-query | ❌ | [LaVa98] |
RRT-Connect | Single-query | ❌ | [KuLa00] |
TODO
One potential application is to plan a joint-space trajectory for a robot arm which does not collide with obstacles in the environment. A predefined setup for this problem is defined in planning_kit.KinematicChainProblem
. An example demonstrating its usage is provided:
planning-kit/demo/04_arm_obstacle.py
Lines 1 to 68 in 7579c0d
04_arm_obstacle.webm
[KiMK19]: Z. Kingston, M. Moll, and L. E. Kavraki, "Exploring implicit spaces for constrained sampling-based planning," The International Journal of Robotics Research, vol. 38, no. 10–11, pp. 1151–1178, Sep. 2019, doi: 10.1177/0278364919868530.
[KSLO96]: L. E. Kavraki, P. Svestka, J.-C. Latombe, and M. H. Overmars, "Probabilistic roadmaps for path planning in high-dimensional configuration spaces," IEEE Transactions on Robotics and Automation, vol. 12, no. 4, pp. 566–580, Aug. 1996, doi: 10.1109/70.508439.
[LaVa98]: S. LaValle, "Rapidly-exploring random trees : a new tool for path planning," The annual research report, 1998, Accessed: May 26, 2023. [Online]. Available: https://www.semanticscholar.org/paper/Rapidly-exploring-random-trees-%3A-a-new-tool-for-LaValle/d967d9550f831a8b3f5cb00f8835a4c866da60ad
[KuLa00]: J. J. Kuffner and S. M. LaValle, "RRT-connect: An efficient approach to single-query path planning," in Proceedings 2000 ICRA. Millennium Conference. IEEE International Conference on Robotics and Automation. Symposia Proceedings (Cat. No.00CH37065), San Francisco, CA, USA: IEEE, 2000, pp. 995–1001. doi: 10.1109/ROBOT.2000.844730.