# PRobabilistically-Informed Motion Primitives (PRIMP)
MATLAB implementation of PRobabilistically-Informed Motion Primitives, a learning-from-demonstration method on Lie group. It is published in _IEEE Transactions on Robotics (T-RO)_.
- Publication: [T-RO](https://ieeexplore.ieee.org/document/10502164)
- Project page: [https://chirikjianlab.github.io/primp-page/](https://chirikjianlab.github.io/primp-page/)
- Python implementation is available [here](https://github.com/ChirikjianLab/primp-python).
## Authors
Sipu Ruan, Weixiao Liu, Xiaoli Wang, Xin Meng and Gregory S. Chirikjian
## Dependency
- [Robotics Toolbox (RVC 2nd edition: RTB10+MVTB4 (2017))](https://petercorke.com/toolboxes/robotics-toolbox/)
- [PbD Library](https://gitlab.idiap.ch/rli/pbdlib-matlab/)
- [Orientation-KMP](https://github.com/yanlongtu/robInfLib-matlab)
## Running instructions
### Data preparation for LfD methods
All test files are located in [`/test`](/test/) folder. To run scripts for LfD methods:
- Download the data from [Google Drive](https://drive.google.com/drive/folders/1sgfAjBgO3PWO2nCqerXjVHsovpNF4MgS?usp=sharing). All the demonstrated datasets are locataed in `/demonstrations` folder.
- Generate `/data` folder that stores all demonstration data
- Copy all the demonstration sets into the `/data` folder (Only put folders inside `/demonstrations` into `/data`)
- (Optional) To generate data trials for real-world experiments, please also download datasets from `/experiments` folder (Put the whole folder).
- Run scripts in `/test` folder
After data preparation, the structure of `/data` folder should look like
```
.
└───data
│ └───panda_arm
| | └───real
| | | └───trajectory
| | | | └───...
| | └───simulation
| | | └───...
│ └───lasa_handwriting
| | | └───pose_data
| | | | └───...
│ └───experiments
| | └───...
```
### Source code for Orientation-KMP method
To run Orientation-KMP method,
- Clone from [Orientation-KMP Repository](https://github.com/yanlongtu/robInfLib-matlab)
- Add correct paths of functions
```
addpath path-prefix/pbdlib-matlab/demos/m_fcts/
addpath path-prefix/robInfLib-matlab/fcts/
```
### Mex DTW C-code
DTW is required to evaluate method performance. The source C code is [`/src/util/dtw_c.c`](/src/util/dtw_c.c), which needs to be generated as a `.mex` file.
- Go to `/src/util`
- Mex the C code for DTW
```
mex dtw_c.c
```
## Demonstration scripts
### Dataset
- Plot LfD dataset [`/test/demo_lfd_dataset.m`](/test/demo_lfd_dataset.m): Plots all demonstration trajectories and store .png files in `/test` folder.
### PRIMP
- Encode demonstrations and condition on via poses [`/test/demo_primp_lfd.m`](/test/demo_primp_lfd.m)
- LfD for scooping task [`/test/demo_primp_lfd_scooping.m`](/test/demo_primp_lfd_scooping.m)
- Encode demonstrations with and without GORA [`/test/demo_primp_lfd_gora.m`](/test/demo_primp_lfd_gora.m)
- Adaptation: Pass through via poses with uncertainties [`/test/demo_primp_condition_via_poses.m`](/test/demo_primp_condition_via_poses.m)
- Adaptation: Equivariance on the change of viewing frame [`/test/demo_primp_change_view.m`](/test/demo_primp_change_view.m)
- Adaptation: Fusion with workspace density [`/test/demo_primp_lfd_fusion_wd.m`](/test/demo_primp_lfd_fusion_wd.m)
### Orientation-KMP
- Encode demonstrations and condition on via poses [`/test/demo_kmp_lfd.m`](/test/demo_kmp_lfd.m)
## Benchmark scripts
- Generate random via-point poses data for benchmarks (Required before running benchmark scripts) [`/test/generate_benchmark_trials.m`](/test/generate_benchmark_trials.m)
- Benchmark LfD for PRIMP [`/test/benchmark_lfd_primp.m`](/test/benchmark_lfd_primp.m)
- Benchmark LfD for PRIMP with storage of learned trajectory distribution [`/test/benchmark_lfd_primp_trajectory.m`](/test/benchmark_lfd_primp_trajectory.m)
- Benchmark LfD for Orientation-KMP [`/test/benchmark_lfd_kmp.m`](/test/benchmark_lfd_kmp.m)
- Benchmark for PRIMP on synthetic data between SE(3) and PCG(3) formulation [`/test/benchmark_primp_se_pcg.m`](/test/benchmark_primp_se_pcg.m)
- Benchmark for PRIMP on single demonstration [`/test/benchmark_lfd_primp_single_demo.m`](/test/benchmark_lfd_primp_single_demo.m)
- Benchmark for PRIMP on equivariant change of view [`/test/benchmark_lfd_primp_change_view.m`](/test/benchmark_lfd_primp_change_view.m)
- Qualitative comparisons among LfD methods for extrapolation cases [`/test/comparison_lfd_extrapolation.m`](/test/comparison_lfd_extrapolation.m)
## Ablation studies
- Ablation study for GORA as pre-process [`/test/ablation_primp_gora.m`](/test/ablation_primp_gora.m)
- Ablation study for fusion with robot-specific workspace density [`/test/ablation_primp_wd.m`](/test/ablation_primp_wd.m)
## Real-world experiments
- Generate reference trajectory using PRIMP for real-world experiments [`/test/generate_real_task_trials.m`](/test/generate_real_task_trials.m)
## 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}}
```
没有合适的资源?快使用搜索试试~ 我知道了~
Probabilistically-Informed Motion Primitives 的 MATLAB 实现.zip
共68个文件
m:66个
md:1个
c:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 13 浏览量
2024-04-26
22:43:30
上传
评论
收藏 98KB ZIP 举报
温馨提示
1.版本:matlab2014/2019a/2021a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
资源推荐
资源详情
资源评论
收起资源包目录
Probabilistically-Informed Motion Primitives (PRIMP) 的 MATLAB 实现.zip (68个子文件)
Probabilistically-Informed Motion Primitives (PRIMP) 的 MATLAB 实现
src
kmp.m 6KB
gora.m 3KB
evaluate_desired_pose.m 1KB
evaluate_traj_distribution.m 2KB
util
get_pdf_from_pose.m 792B
Adjoint.m 862B
compute_mahalanobis_distance.m 618B
get_pdf_from_demo.m 2KB
get_mean_cov.m 2KB
expm_SO.m 391B
dtw_lie_group.m 3KB
dtw_legacy.m 2KB
logm_SO.m 487B
jacobian_SO_l.m 452B
interp_SE3_traj.m 2KB
get_exp_mapping.m 973B
compute_manipulability_from_ee_pose.m 1KB
get_exp_coord.m 1KB
df_vect.m 1KB
homo2pose_quat.m 257B
critical_difference.m 6KB
cov_SE_1_2.m 373B
dtw_c.c 4KB
get_pdf_conv_SE.m 806B
plot_gaussian_pdf.m 479B
fdcoeffF.m 3KB
get_rel_pose.m 450B
jacobian_inv_SO_l.m 497B
get_conjugation.m 790B
generate_random_pose.m 1KB
get_dist_traj.m 1KB
logm_SE.m 446B
homo2pose_axang.m 333B
expm_SE.m 708B
data_parser
generate_robot_pose.m 2KB
generate_trajectory.m 1KB
parse_demo_trajectory.m 2KB
load_random_trials.m 481B
convert_pose_to_pbdlib_data.m 1KB
generate_robot_ee_pose.m 1KB
generate_pose_struct.m 901B
generate_random_trials.m 1KB
load_robot_model.m 1015B
PRIMP.m 8KB
test
benchmark_primp_change_view.m 5KB
demo_primp_change_view.m 7KB
ablation_primp_wd.m 5KB
demo_kmp_lfd.m 8KB
demo_primp_lfd_gora.m 7KB
load_dataset_param.m 1KB
demo_primp_condition_via_poses.m 5KB
demo_primp_real_task.m 4KB
generate_real_task_trials.m 7KB
demo_primp_lfd.m 9KB
generate_benchmark_trials.m 2KB
comparison_lfd_extrapolation.m 6KB
evaluate_primp_planning_real_task.m 6KB
benchmark_lfd_primp.m 5KB
ablation_primp_gora.m 7KB
demo_primp_lfd_fusion_wd.m 4KB
benchmark_lfd_primp_trajectory.m 4KB
benchmark_primp_se_pcg.m 4KB
demo_lfd_dataset.m 2KB
benchmark_lfd_kmp.m 6KB
add_paths.m 86B
benchmark_lfd_primp_single_demo.m 5KB
demo_primp_lfd_scooping.m 4KB
README.md 6KB
共 68 条
- 1
资源评论
Matlab科研辅导帮
- 粉丝: 3w+
- 资源: 7785
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功