Motion planning is a computational problem to find a sequence of valid configurations that moves the object from the source to destination.
This library is designed for robotic applications, especially sampling-based algorithms for high-dimension configuration spaces(e.g., robot arm).
- pythonic: easy to debug, customize and extend
- standalone collision checker (hpp-fcl): without relying on any physical simulator (e.g., mujoco, pybullet, sapien) to check collision
- out-of-box: common motion planning algorithms (e.g., RRT-Connect) are implemented for robotic manipulation
This library (pymp) depends on pinocchio to handle URDF and robot kinematics, hpp-fcl to check collision, toppra to do time parameterization.
For Windows + conda see next section.
From pip:
pip install motion-planning
From source:
git clone https://github.com/Jiayuan-Gu/pymp.git
pip install -e .
From Github directly:
pip install --upgrade git+https://github.com/Jiayuan-Gu/pymp.git
I had trouble with the above methods on Windows, because pin was not available through pip. Also, hpp-fcl acted up as it could not find the DLLs. What eventually worked for me was the following:
conda create -n motion_planning python=3.8
conda activate motion_planning
conda install hpp-fcl
conda install pinocchio
# versions I got:
# hpp-fcl -> 3.2.2
# pinocchio -> 2.6.18
git clone https://github.com/mrudorfer/pymp.git
cd pymp
pip install -e .['meshcat']
# this one has a modified setup.py, without the pinocchio dependency
See example.py for basic usage. Note that pymp
depends on SRDF associated with URDF to remove self-collision.
The logging level can be specified by the environment variable PYMP_LOG
.
# Set the logging level to DEBUG for pymp
export PYMP_LOG=DEBUG
pymp
supports specifying the pose of the base link during the initialization of the planner. We support many formats of pose (e.g., [x, y, z] for position, [w, i, j, k] for quaternion, [x, y, z, w, i, j, k] for SE(3), or a 4x4 rigid transformation matrix)
from pymp import Planner
planner = Planner(
...
base_pose=[0, 0, 0],
)
ImportError: libboost_python38.so
: try to force reinstall pinocchio, e.g.,pip install pin --no-cache-dir --force-reinstall --upgrade
.