ChirikjianLab/primp-python
[T-RO] Python implementation of PRobabilistically-Informed Motion Primitives (PRIMP)
PRobabilistically-Informed Motion Primitives (PRIMP)
Python implementation of PRobabilistically-Informed Motion Primitives, a learning-from-demonstration method on Lie group. This work is published in IEEE Transactions on Robotics (T-RO).
- Publication: T-RO
- Project page: https://chirikjianlab.github.io/primp-page/
- MATLAB version (includes more demos): https://github.com/ChirikjianLab/primp-matlab.
Authors
Sipu Ruan, Weixiao Liu, Xiaoli Wang, Xin Meng and Gregory S. Chirikjian
Dependencies
See requirements.txt
- numpy
- scipy
- finitediff: Compute finite difference
- movement_primitives: Python library for movement primitives
- dtw-python: Dynamic Time Warping for evaluating distance between learned and demonstrated trajectories
- roboticstoolbox-python: Robotics toolbox for different operations and visualizations
Features
PRIMP
Class for the proposed PRIMP method, working on Lie groups. The full 6D pose is considered.
Probabilistic Movement Primitives (ProMP)
Wrapper class that calls the library movement_primitives. The learning spaces include:
- Only 3D position of the end effector
Installation
We recommend using pip to install the package:
pip install .
Usage
Data preparation for LfD methods
All test files are located in /test folder. To run scripts for LfD methods:
- Download the data from Google Drive. All the demonstrated datasets are locataed in
/demonstrationsfolder. - Generate
/datafolder that stores all demonstration data - Copy all the demonstration sets into the
/datafolder - Run scripts in /test folder
Using PRIMP for end effector 6D poses
python main_lfd_primp.pyUsing ProMP for end effector 3D positions
- Main script for ProMP encoding and conditioning
python main_lfd_promp.py- Benchmark script for evaluations
python benchmark_lfd_promp.pyGenerated files
After running, 3 files will be generated (stored in /result/${method}_${planning_group}/):
reference_density_${object}_${demo_type}.json: Full information of the learned workspace trajectory distributionreference_density_${object}_${demo_type}_mean.csv: Stores only the mean, for seeding the STOMP plannersamples_${object}_${demo_type}.json: Random samples from the learned trajectory distribution
Citation
S. Ruan, W. Liu, X. Wang, X. Meng and G. S. Chirikjian, "PRIMP: PRobabilistically-Informed Motion Primitives for Efficient Affordance Learning from Demonstration," in IEEE Transactions on Robotics, doi: 10.1109/TRO.2024.3390052.
BibTex
@ARTICLE{10502164,
author={Ruan, Sipu and Liu, Weixiao and Wang, Xiaoli and Meng, Xin and Chirikjian, Gregory S.},
journal={IEEE Transactions on Robotics},
title={PRIMP: PRobabilistically-Informed Motion Primitives for Efficient Affordance Learning from Demonstration},
year={2024},
volume={},
number={},
pages={1-20},
keywords={Trajectory;Robots;Probabilistic logic;Planning;Affordances;Task analysis;Manifolds;Learning from Demonstration;Probability and Statistical Methods;Motion and Path Planning;Service Robots},
doi={10.1109/TRO.2024.3390052}}