├── .gitignore ├── CMakeLists.txt ├── Examples ├── 2Dletters │ ├── A.mat │ ├── B.mat │ ├── C.mat │ ├── D.mat │ ├── E.mat │ ├── F.mat │ ├── G.mat │ ├── H.mat │ ├── I.mat │ ├── J.mat │ ├── K.mat │ ├── L.mat │ ├── M.mat │ ├── N.mat │ ├── O.mat │ ├── P.mat │ ├── Q.mat │ ├── R.mat │ ├── S.mat │ ├── T.mat │ ├── U.mat │ ├── V.mat │ ├── W.mat │ ├── X.mat │ ├── X_2.mat │ ├── Y.mat │ └── Z.mat ├── DataSet │ ├── Angle.mat │ ├── BendedLine.mat │ ├── CShape.mat │ ├── DoubleBendedLine.mat │ ├── GShape.mat │ ├── JShape.mat │ ├── JShape_2.mat │ ├── Khamesh.mat │ ├── LShape.mat │ ├── Leaf_1.mat │ ├── Leaf_2.mat │ ├── Line.mat │ ├── Multi_Models_1.mat │ ├── Multi_Models_2.mat │ ├── Multi_Models_3.mat │ ├── Multi_Models_4.mat │ ├── NShape.mat │ ├── PShape.mat │ ├── RShape.mat │ ├── Saeghe.mat │ ├── Sharpc.mat │ ├── Sine.mat │ ├── Snake.mat │ ├── Spoon.mat │ ├── Sshape.mat │ ├── Trapezoid.mat │ ├── WShape.mat │ ├── Worm.mat │ ├── Zshape.mat │ └── heee.mat ├── SIMPLe.ipynb ├── SIMPLe_continous.ipynb ├── Statistical_test.ipynb ├── figures │ ├── B_discrete.png │ ├── figure.png │ ├── time_dep │ │ ├── figure_x.png │ │ └── figure_y.png │ └── time_ind │ │ ├── figure_x.png │ │ └── figure_y.png ├── load_data.py └── utilities.py ├── LICENSE ├── README.md ├── SIMPLe ├── SIMPLe.py ├── __init__.py ├── data │ └── last.npz ├── panda.py └── utils.py ├── SIMPLe_bimanual ├── __init__.py ├── data │ └── dual_last.npz ├── dual_panda.py ├── ggp.py ├── panda.py └── utils.py ├── data ├── dual_last.npz ├── panda_left_last.npz └── panda_right_last.npz ├── data_analysis ├── experiments_data │ ├── data_analysis.py │ ├── folding_clothes_1 │ │ ├── 23_16_32_57.npz │ │ ├── 23_16_34_07.npz │ │ └── 23_16_35_01.npz │ ├── pick_place_1 │ │ ├── 23_12_30_55.npz │ │ ├── 23_12_31_48.npz │ │ ├── 23_12_32_55.npz │ │ └── 23_12_36_12.npz │ ├── pick_place_official │ │ ├── 23_14_09_09.npz │ │ ├── 23_14_10_09.npz │ │ ├── 23_14_11_09.npz │ │ ├── 23_14_14_20.npz │ │ ├── dual_last.npz │ │ ├── panda_left_last.npz │ │ └── panda_right_last.npz │ ├── recording_correction │ │ ├── 19_17_33_23.npz │ │ ├── 19_17_34_42.npz │ │ ├── 19_17_36_07.npz │ │ ├── 19_17_37_18.npz │ │ ├── 19_17_41_00.npz │ │ ├── 19_17_42_19.npz │ │ ├── 19_17_43_14.npz │ │ └── 19_17_44_23.npz │ ├── recording_small_box │ │ ├── 24_18_06_52.npz │ │ ├── 24_18_07_54.npz │ │ ├── 24_18_08_45.npz │ │ ├── 24_18_10_17.npz │ │ ├── 24_18_11_19.npz │ │ ├── 24_18_12_27.npz │ │ └── 24_18_16_34.npz │ └── recording_syncro │ │ ├── 19_16_33_45.npz │ │ ├── 19_16_34_33.npz │ │ ├── 19_16_36_39.npz │ │ ├── 19_16_39_22.npz │ │ ├── 19_16_41_43.npz │ │ ├── 19_16_42_56.npz │ │ ├── 19_16_43_42.npz │ │ ├── 19_16_44_17.npz │ │ ├── dual_last.npz │ │ ├── panda_left_last.npz │ │ └── panda_right_last.npz └── recordings │ ├── box_correction_experiment │ ├── Box_correction_1 │ │ ├── 10_16_08_03.npz │ │ ├── 10_16_08_36.npz │ │ ├── 10_16_09_15.npz │ │ ├── 10_16_10_25.npz │ │ ├── 10_16_11_13.npz │ │ ├── 10_16_11_47.npz │ │ ├── 10_16_12_18.npz │ │ ├── 10_16_13_12.npz │ │ ├── 10_16_13_50.npz │ │ └── 10_16_14_53.npz │ ├── Box_correction_2 │ │ ├── 10_16_17_11.npz │ │ ├── 10_16_18_27.npz │ │ ├── 10_16_19_19.npz │ │ ├── 10_16_20_36.npz │ │ ├── 10_16_21_22.npz │ │ ├── 10_16_22_37.npz │ │ ├── 10_16_23_46.npz │ │ ├── 10_16_24_46.npz │ │ ├── 10_16_25_14.npz │ │ └── 10_16_26_15.npz │ ├── Box_correction_3 │ │ ├── 10_16_27_51.npz │ │ ├── 10_16_28_57.npz │ │ ├── 10_16_29_44.npz │ │ ├── 10_16_30_05.npz │ │ ├── 10_16_31_59.npz │ │ ├── 10_16_32_39.npz │ │ ├── 10_16_33_36.npz │ │ └── 10_16_34_11.npz │ ├── Box_correction_4 │ │ ├── 10_16_36_03.npz │ │ ├── 10_16_36_31.npz │ │ ├── 10_16_37_22.npz │ │ ├── 10_16_38_00.npz │ │ ├── 10_16_38_28.npz │ │ ├── 10_16_39_15.npz │ │ ├── 10_16_39_42.npz │ │ └── 10_16_40_22.npz │ ├── Box_correction_5 │ │ ├── 10_16_42_11.npz │ │ ├── 10_16_42_32.npz │ │ ├── 10_16_43_18.npz │ │ ├── 10_16_43_55.npz │ │ ├── 10_16_44_30.npz │ │ ├── 10_16_45_04.npz │ │ ├── 10_16_45_54.npz │ │ └── 10_16_46_27.npz │ ├── plot copy.py │ └── plot.py │ ├── p_n_p_experiments │ ├── p_n_p_1 │ │ ├── 15_11_49_32.npz │ │ ├── 15_11_59_51.npz │ │ ├── 15_12_06_24.npz │ │ ├── 15_12_07_14.npz │ │ ├── 15_12_09_06.npz │ │ ├── 15_12_10_32.npz │ │ ├── 15_12_11_22.npz │ │ ├── 15_12_14_52.npz │ │ └── 15_12_16_06.npz │ ├── p_n_p_2 │ │ ├── 15_12_21_35.npz │ │ ├── 15_12_22_14.npz │ │ ├── 15_12_28_08.npz │ │ ├── 15_12_29_44.npz │ │ ├── 15_12_31_15.npz │ │ ├── 15_12_32_44.npz │ │ ├── 15_12_33_42.npz │ │ ├── 15_12_35_15.npz │ │ └── 15_12_37_13.npz │ ├── p_n_p_3 │ │ ├── 15_12_38_53.npz │ │ ├── 15_12_39_26.npz │ │ ├── 15_12_43_05.npz │ │ ├── 15_12_44_11.npz │ │ ├── 15_12_44_52.npz │ │ ├── 15_12_46_23.npz │ │ ├── 15_12_49_01.npz │ │ └── 15_12_49_59.npz │ ├── p_n_p_4 │ │ ├── 15_12_51_40.npz │ │ ├── 15_12_52_07.npz │ │ ├── 15_12_52_43.npz │ │ ├── 15_12_53_49.npz │ │ ├── 15_12_55_59.npz │ │ ├── 15_12_56_45.npz │ │ ├── 15_12_57_54.npz │ │ └── 15_12_59_06.npz │ ├── p_n_p_5 │ │ ├── 15_13_01_17.npz │ │ ├── 15_13_01_50.npz │ │ ├── 15_13_02_23.npz │ │ ├── 15_13_04_31.npz │ │ ├── 15_13_05_43.npz │ │ ├── 15_13_06_53.npz │ │ ├── 15_13_07_36.npz │ │ └── 15_13_08_48.npz │ ├── plot copy.py │ └── plot.py │ └── syncronization_experiments │ ├── 10_may_sync_1 │ ├── 10_11_46_30.npz │ ├── 10_11_50_41.npz │ ├── 10_11_51_49.npz │ ├── 10_11_53_00.npz │ ├── 10_11_53_40.npz │ ├── 10_11_55_00.npz │ ├── 10_11_56_25.npz │ ├── 10_11_57_24.npz │ ├── 10_11_58_04.npz │ ├── 10_11_59_07.npz │ ├── 10_11_59_42.npz │ ├── 10_12_00_07.npz │ └── 10_12_01_08.npz │ ├── 10_may_sync_2 │ ├── 10_12_04_22.npz │ ├── 10_12_04_55.npz │ ├── 10_12_05_17.npz │ ├── 10_12_06_27.npz │ ├── 10_12_07_21.npz │ ├── 10_12_08_46.npz │ ├── 10_12_09_10.npz │ ├── 10_12_09_51.npz │ └── 10_12_11_03.npz │ ├── 10_may_sync_3 │ ├── 10_12_12_42.npz │ ├── 10_12_13_03.npz │ ├── 10_12_13_53.npz │ ├── 10_12_14_37.npz │ ├── 10_12_16_03.npz │ ├── 10_12_16_57.npz │ ├── 10_12_17_37.npz │ ├── 10_12_19_01.npz │ ├── 10_12_19_47.npz │ ├── 10_12_20_18.npz │ ├── 10_12_21_22.npz │ ├── 10_12_22_39.npz │ └── 10_12_23_15.npz │ ├── 10_may_sync_4 │ ├── 10_12_25_50.npz │ ├── 10_12_26_16.npz │ ├── 10_12_26_50.npz │ ├── 10_12_37_35.npz │ ├── 10_12_39_15.npz │ ├── 10_12_40_14.npz │ ├── 10_12_40_44.npz │ ├── 10_12_41_30.npz │ ├── 10_12_41_58.npz │ ├── 10_12_42_45.npz │ └── 10_12_43_21.npz │ ├── 10_may_sync_5 │ ├── 10_12_46_51.npz │ ├── 10_12_47_21.npz │ ├── 10_12_47_41.npz │ ├── 10_12_48_15.npz │ ├── 10_12_49_48.npz │ ├── 10_12_50_54.npz │ ├── 10_12_51_40.npz │ ├── 10_12_52_20.npz │ └── 10_12_52_45.npz │ └── plot.py ├── franka_gripper ├── __init__.py ├── __init__.pyc ├── __pycache__ │ ├── __init__.cpython-36.pyc │ └── __init__.cpython-38.pyc └── msg │ ├── _GraspAction.py │ ├── _GraspAction.pyc │ ├── _GraspActionFeedback.py │ ├── _GraspActionFeedback.pyc │ ├── _GraspActionGoal.py │ ├── _GraspActionGoal.pyc │ ├── _GraspActionResult.py │ ├── _GraspActionResult.pyc │ ├── _GraspEpsilon.py │ ├── _GraspEpsilon.pyc │ ├── _GraspFeedback.py │ ├── _GraspFeedback.pyc │ ├── _GraspGoal.py │ ├── _GraspGoal.pyc │ ├── _GraspResult.py │ ├── _GraspResult.pyc │ ├── _HomingAction.py │ ├── _HomingAction.pyc │ ├── _HomingActionFeedback.py │ ├── _HomingActionFeedback.pyc │ ├── _HomingActionGoal.py │ ├── _HomingActionGoal.pyc │ ├── _HomingActionResult.py │ ├── _HomingActionResult.pyc │ ├── _HomingFeedback.py │ ├── _HomingFeedback.pyc │ ├── _HomingGoal.py │ ├── _HomingGoal.pyc │ ├── _HomingResult.py │ ├── _HomingResult.pyc │ ├── _MoveAction.py │ ├── _MoveAction.pyc │ ├── _MoveActionFeedback.py │ ├── _MoveActionFeedback.pyc │ ├── _MoveActionGoal.py │ ├── _MoveActionGoal.pyc │ ├── _MoveActionResult.py │ ├── _MoveActionResult.pyc │ ├── _MoveFeedback.py │ ├── _MoveFeedback.pyc │ ├── _MoveGoal.py │ ├── _MoveGoal.pyc │ ├── _MoveResult.py │ ├── _MoveResult.pyc │ ├── _StopAction.py │ ├── _StopAction.pyc │ ├── _StopActionFeedback.py │ ├── _StopActionFeedback.pyc │ ├── _StopActionGoal.py │ ├── _StopActionGoal.pyc │ ├── _StopActionResult.py │ ├── _StopActionResult.pyc │ ├── _StopFeedback.py │ ├── _StopFeedback.pyc │ ├── _StopGoal.py │ ├── _StopGoal.pyc │ ├── _StopResult.py │ ├── _StopResult.pyc │ ├── __init__.py │ ├── __init__.pyc │ └── __pycache__ │ ├── _GraspAction.cpython-36.pyc │ ├── _GraspAction.cpython-38.pyc │ ├── _GraspActionFeedback.cpython-36.pyc │ ├── _GraspActionFeedback.cpython-38.pyc │ ├── _GraspActionGoal.cpython-36.pyc │ ├── _GraspActionGoal.cpython-38.pyc │ ├── _GraspActionResult.cpython-36.pyc │ ├── _GraspActionResult.cpython-38.pyc │ ├── _GraspEpsilon.cpython-36.pyc │ ├── _GraspEpsilon.cpython-38.pyc │ ├── _GraspFeedback.cpython-36.pyc │ ├── _GraspFeedback.cpython-38.pyc │ ├── _GraspGoal.cpython-36.pyc │ ├── _GraspGoal.cpython-38.pyc │ ├── _GraspResult.cpython-36.pyc │ ├── _GraspResult.cpython-38.pyc │ ├── _HomingAction.cpython-36.pyc │ ├── _HomingAction.cpython-38.pyc │ ├── _HomingActionFeedback.cpython-36.pyc │ ├── _HomingActionFeedback.cpython-38.pyc │ ├── _HomingActionGoal.cpython-36.pyc │ ├── _HomingActionGoal.cpython-38.pyc │ ├── _HomingActionResult.cpython-36.pyc │ ├── _HomingActionResult.cpython-38.pyc │ ├── _HomingFeedback.cpython-36.pyc │ ├── _HomingFeedback.cpython-38.pyc │ ├── _HomingGoal.cpython-36.pyc │ ├── _HomingGoal.cpython-38.pyc │ ├── _HomingResult.cpython-36.pyc │ ├── _HomingResult.cpython-38.pyc │ ├── _MoveAction.cpython-36.pyc │ ├── _MoveAction.cpython-38.pyc │ ├── _MoveActionFeedback.cpython-36.pyc │ ├── _MoveActionFeedback.cpython-38.pyc │ ├── _MoveActionGoal.cpython-36.pyc │ ├── _MoveActionGoal.cpython-38.pyc │ ├── _MoveActionResult.cpython-36.pyc │ ├── _MoveActionResult.cpython-38.pyc │ ├── _MoveFeedback.cpython-36.pyc │ ├── _MoveFeedback.cpython-38.pyc │ ├── _MoveGoal.cpython-36.pyc │ ├── _MoveGoal.cpython-38.pyc │ ├── _MoveResult.cpython-36.pyc │ ├── _MoveResult.cpython-38.pyc │ ├── _StopAction.cpython-36.pyc │ ├── _StopAction.cpython-38.pyc │ ├── _StopActionFeedback.cpython-36.pyc │ ├── _StopActionFeedback.cpython-38.pyc │ ├── _StopActionGoal.cpython-36.pyc │ ├── _StopActionGoal.cpython-38.pyc │ ├── _StopActionResult.cpython-36.pyc │ ├── _StopActionResult.cpython-38.pyc │ ├── _StopFeedback.cpython-36.pyc │ ├── _StopFeedback.cpython-38.pyc │ ├── _StopGoal.cpython-36.pyc │ ├── _StopGoal.cpython-38.pyc │ ├── _StopResult.cpython-36.pyc │ ├── _StopResult.cpython-38.pyc │ ├── __init__.cpython-36.pyc │ └── __init__.cpython-38.pyc ├── main_single_arm.py ├── package.xml ├── scripts ├── bimanual_teleoperation.py ├── data │ ├── dual_collaboration.npz │ ├── dual_conducting.npz │ ├── dual_last.npz │ └── panda_right_last.npz ├── main_collaboration.py ├── main_conductor.py ├── main_coordination_keyboard.py ├── main_crates_correction.py ├── main_crates_correction_statistics.py ├── main_crates_syncronization.py ├── main_crates_syncronization_statistics.py ├── main_demo.py ├── main_demo_TERI.py ├── main_demo_schipol.py ├── main_folding_clothes.py ├── main_pick_place_syncronization.py ├── main_plot.py ├── main_plot_correction.py ├── main_plot_multiple_traj_assembly.py ├── main_plot_syncro.py ├── main_record.py ├── main_schipol.py ├── main_small_box.py ├── main_user_study.py └── recording_node.py └── setup.py /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0.2) 2 | project(SIMPLe) 3 | 4 | find_package(catkin REQUIRED COMPONENTS 5 | roscpp 6 | rospy 7 | ) 8 | 9 | catkin_package() 10 | 11 | # Make sure that your Python modules are available for import within your package 12 | catkin_python_setup() 13 | -------------------------------------------------------------------------------- /Examples/2Dletters/A.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/A.mat -------------------------------------------------------------------------------- /Examples/2Dletters/B.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/B.mat -------------------------------------------------------------------------------- /Examples/2Dletters/C.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/C.mat -------------------------------------------------------------------------------- /Examples/2Dletters/D.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/D.mat -------------------------------------------------------------------------------- /Examples/2Dletters/E.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/E.mat -------------------------------------------------------------------------------- /Examples/2Dletters/F.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/F.mat -------------------------------------------------------------------------------- /Examples/2Dletters/G.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/G.mat -------------------------------------------------------------------------------- /Examples/2Dletters/H.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/H.mat -------------------------------------------------------------------------------- /Examples/2Dletters/I.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/I.mat -------------------------------------------------------------------------------- /Examples/2Dletters/J.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/J.mat -------------------------------------------------------------------------------- /Examples/2Dletters/K.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/K.mat -------------------------------------------------------------------------------- /Examples/2Dletters/L.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/L.mat -------------------------------------------------------------------------------- /Examples/2Dletters/M.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/M.mat -------------------------------------------------------------------------------- /Examples/2Dletters/N.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/N.mat -------------------------------------------------------------------------------- /Examples/2Dletters/O.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/O.mat -------------------------------------------------------------------------------- /Examples/2Dletters/P.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/P.mat -------------------------------------------------------------------------------- /Examples/2Dletters/Q.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/Q.mat -------------------------------------------------------------------------------- /Examples/2Dletters/R.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/R.mat -------------------------------------------------------------------------------- /Examples/2Dletters/S.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/S.mat -------------------------------------------------------------------------------- /Examples/2Dletters/T.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/T.mat -------------------------------------------------------------------------------- /Examples/2Dletters/U.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/U.mat -------------------------------------------------------------------------------- /Examples/2Dletters/V.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/V.mat -------------------------------------------------------------------------------- /Examples/2Dletters/W.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/W.mat -------------------------------------------------------------------------------- /Examples/2Dletters/X.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/X.mat -------------------------------------------------------------------------------- /Examples/2Dletters/X_2.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/X_2.mat -------------------------------------------------------------------------------- /Examples/2Dletters/Y.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/Y.mat -------------------------------------------------------------------------------- /Examples/2Dletters/Z.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/2Dletters/Z.mat -------------------------------------------------------------------------------- /Examples/DataSet/Angle.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/Angle.mat -------------------------------------------------------------------------------- /Examples/DataSet/BendedLine.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/BendedLine.mat -------------------------------------------------------------------------------- /Examples/DataSet/CShape.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/CShape.mat -------------------------------------------------------------------------------- /Examples/DataSet/DoubleBendedLine.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/DoubleBendedLine.mat -------------------------------------------------------------------------------- /Examples/DataSet/GShape.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/GShape.mat -------------------------------------------------------------------------------- /Examples/DataSet/JShape.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/JShape.mat -------------------------------------------------------------------------------- /Examples/DataSet/JShape_2.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/JShape_2.mat -------------------------------------------------------------------------------- /Examples/DataSet/Khamesh.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/Khamesh.mat -------------------------------------------------------------------------------- /Examples/DataSet/LShape.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/LShape.mat -------------------------------------------------------------------------------- /Examples/DataSet/Leaf_1.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/Leaf_1.mat -------------------------------------------------------------------------------- /Examples/DataSet/Leaf_2.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/Leaf_2.mat -------------------------------------------------------------------------------- /Examples/DataSet/Line.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/Line.mat -------------------------------------------------------------------------------- /Examples/DataSet/Multi_Models_1.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/Multi_Models_1.mat -------------------------------------------------------------------------------- /Examples/DataSet/Multi_Models_2.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/Multi_Models_2.mat -------------------------------------------------------------------------------- /Examples/DataSet/Multi_Models_3.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/Multi_Models_3.mat -------------------------------------------------------------------------------- /Examples/DataSet/Multi_Models_4.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/Multi_Models_4.mat -------------------------------------------------------------------------------- /Examples/DataSet/NShape.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/NShape.mat -------------------------------------------------------------------------------- /Examples/DataSet/PShape.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/PShape.mat -------------------------------------------------------------------------------- /Examples/DataSet/RShape.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/RShape.mat -------------------------------------------------------------------------------- /Examples/DataSet/Saeghe.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/Saeghe.mat -------------------------------------------------------------------------------- /Examples/DataSet/Sharpc.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/Sharpc.mat -------------------------------------------------------------------------------- /Examples/DataSet/Sine.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/Sine.mat -------------------------------------------------------------------------------- /Examples/DataSet/Snake.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/Snake.mat -------------------------------------------------------------------------------- /Examples/DataSet/Spoon.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/Spoon.mat -------------------------------------------------------------------------------- /Examples/DataSet/Sshape.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/Sshape.mat -------------------------------------------------------------------------------- /Examples/DataSet/Trapezoid.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/Trapezoid.mat -------------------------------------------------------------------------------- /Examples/DataSet/WShape.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/WShape.mat -------------------------------------------------------------------------------- /Examples/DataSet/Worm.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/Worm.mat -------------------------------------------------------------------------------- /Examples/DataSet/Zshape.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/Zshape.mat -------------------------------------------------------------------------------- /Examples/DataSet/heee.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/DataSet/heee.mat -------------------------------------------------------------------------------- /Examples/Statistical_test.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 16, 6 | "id": "designed-poker", 7 | "metadata": { 8 | "scrolled": true 9 | }, 10 | "outputs": [], 11 | "source": [ 12 | "import numpy as np\n", 13 | "import scipy.stats as st\n", 14 | "a=[1116, 965, 1188, 827,1795, 1180 , 1205]\n", 15 | "a=np.array(a)/50\n", 16 | "b=[9430, 8028, 9430, 9430, 4730, 5294, 9430]\n", 17 | "b=np.array(b)/50\n", 18 | "(stat, p) = st.ttest_rel(a,b)" 19 | ] 20 | }, 21 | { 22 | "cell_type": "code", 23 | "execution_count": 17, 24 | "id": "chemical-astronomy", 25 | "metadata": {}, 26 | "outputs": [ 27 | { 28 | "data": { 29 | "text/plain": [ 30 | "0.00023596186991269562" 31 | ] 32 | }, 33 | "execution_count": 17, 34 | "metadata": {}, 35 | "output_type": "execute_result" 36 | } 37 | ], 38 | "source": [ 39 | "p" 40 | ] 41 | }, 42 | { 43 | "cell_type": "code", 44 | "execution_count": 18, 45 | "id": "becoming-calculator", 46 | "metadata": {}, 47 | "outputs": [ 48 | { 49 | "data": { 50 | "text/plain": [ 51 | "-7.788775387894685" 52 | ] 53 | }, 54 | "execution_count": 18, 55 | "metadata": {}, 56 | "output_type": "execute_result" 57 | } 58 | ], 59 | "source": [ 60 | "stat" 61 | ] 62 | }, 63 | { 64 | "cell_type": "code", 65 | "execution_count": 19, 66 | "id": "yellow-methodology", 67 | "metadata": {}, 68 | "outputs": [ 69 | { 70 | "data": { 71 | "text/plain": [ 72 | "23.645714285714288" 73 | ] 74 | }, 75 | "execution_count": 19, 76 | "metadata": {}, 77 | "output_type": "execute_result" 78 | } 79 | ], 80 | "source": [ 81 | "np.mean(a)" 82 | ] 83 | }, 84 | { 85 | "cell_type": "code", 86 | "execution_count": 20, 87 | "id": "current-infrastructure", 88 | "metadata": {}, 89 | "outputs": [ 90 | { 91 | "data": { 92 | "text/plain": [ 93 | "5.6254900920284445" 94 | ] 95 | }, 96 | "execution_count": 20, 97 | "metadata": {}, 98 | "output_type": "execute_result" 99 | } 100 | ], 101 | "source": [ 102 | "np.std(a)" 103 | ] 104 | }, 105 | { 106 | "cell_type": "code", 107 | "execution_count": 21, 108 | "id": "spare-scale", 109 | "metadata": {}, 110 | "outputs": [ 111 | { 112 | "data": { 113 | "text/plain": [ 114 | "159.34857142857143" 115 | ] 116 | }, 117 | "execution_count": 21, 118 | "metadata": {}, 119 | "output_type": "execute_result" 120 | } 121 | ], 122 | "source": [ 123 | "np.mean(b)" 124 | ] 125 | }, 126 | { 127 | "cell_type": "code", 128 | "execution_count": 22, 129 | "id": "internal-curve", 130 | "metadata": {}, 131 | "outputs": [ 132 | { 133 | "data": { 134 | "text/plain": [ 135 | "38.684285265862314" 136 | ] 137 | }, 138 | "execution_count": 22, 139 | "metadata": {}, 140 | "output_type": "execute_result" 141 | } 142 | ], 143 | "source": [ 144 | "np.std(b)" 145 | ] 146 | }, 147 | { 148 | "cell_type": "code", 149 | "execution_count": null, 150 | "id": "romance-marble", 151 | "metadata": {}, 152 | "outputs": [], 153 | "source": [] 154 | } 155 | ], 156 | "metadata": { 157 | "kernelspec": { 158 | "display_name": "Python 3", 159 | "language": "python", 160 | "name": "python3" 161 | }, 162 | "language_info": { 163 | "codemirror_mode": { 164 | "name": "ipython", 165 | "version": 3 166 | }, 167 | "file_extension": ".py", 168 | "mimetype": "text/x-python", 169 | "name": "python", 170 | "nbconvert_exporter": "python", 171 | "pygments_lexer": "ipython3", 172 | "version": "3.8.10" 173 | } 174 | }, 175 | "nbformat": 4, 176 | "nbformat_minor": 5 177 | } 178 | -------------------------------------------------------------------------------- /Examples/figures/B_discrete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/figures/B_discrete.png -------------------------------------------------------------------------------- /Examples/figures/figure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/figures/figure.png -------------------------------------------------------------------------------- /Examples/figures/time_dep/figure_x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/figures/time_dep/figure_x.png -------------------------------------------------------------------------------- /Examples/figures/time_dep/figure_y.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/figures/time_dep/figure_y.png -------------------------------------------------------------------------------- /Examples/figures/time_ind/figure_x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/figures/time_ind/figure_x.png -------------------------------------------------------------------------------- /Examples/figures/time_ind/figure_y.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/Examples/figures/time_ind/figure_y.png -------------------------------------------------------------------------------- /Examples/load_data.py: -------------------------------------------------------------------------------- 1 | import os 2 | import numpy as np 3 | from scipy.io import loadmat 4 | from utilities import plot_model 5 | DATASET_PATH_ = os.getcwd() + "/DataSet" 6 | 7 | NAMES_ = [f[:-4] for f in os.listdir(DATASET_PATH_) if f[-4:] == ".mat"] 8 | 9 | if os.path.isdir(DATASET_PATH_): 10 | print ("Using LASA DataSet from {}".format(DATASET_PATH_)) 11 | else: 12 | raise IOError("Could not find LASA Dataset in path: {}".format(DATASET_PATH_)) 13 | 14 | class _Demo(object): 15 | """ 16 | Each demo object has attributes: 17 | 18 | pos : 2D cartesian position data. shape: (2,1000) 19 | t : corresponding time for each data point. shape: (1,1000) 20 | vel : 2D cartesian velocity data for motion. shape: (2,1000) 21 | acc : 2D cartesian acceleration data for motion. shape: (2,1000) 22 | 23 | """ 24 | def __init__(self, demo): 25 | 26 | 27 | typelist = str(np.asarray(demo[0][0].dtype)) 28 | typelist = typelist[1:-2].split(', ') 29 | idx = 0 30 | for att in typelist: 31 | if "'O'" in att: 32 | continue 33 | else: 34 | setattr(self, att[2:-1], demo[0][0][idx]) 35 | idx+=1 36 | 37 | assert idx == 5, "Reading data for demo failed" 38 | 39 | class _Data(object): 40 | """ 41 | Data object for each pattern has the following two attributes: 42 | 43 | dt : the average time steps across all demonstrations for this pattern 44 | demos : array of _Demo objects (len: 7) corresponding the trials for this pattern 45 | 46 | """ 47 | def __init__(self, matdata, name): 48 | self.name = name 49 | self.dt = matdata['dt'][0][0] 50 | self.demos = [_Demo(d) for d in matdata['demos'][0]] 51 | 52 | assert len(self.demos) == 7, "ERROR: Data for matdata could not be read properly." 53 | 54 | def __repr__(self): 55 | return str({'dt':self.dt, 'demos':self.demos}) 56 | 57 | @classmethod 58 | def get_data(cls, name): 59 | return cls(loadmat("{}/{}.mat".format(DATASET_PATH_,name)), name) 60 | 61 | 62 | class _PyLasaDataSet(object): 63 | 64 | def __getattr__(self, name): 65 | if name in NAMES_: 66 | return _Data.get_data(name) 67 | else: 68 | raise AttributeError("DataSet has no data named '{}'".format(name)) 69 | -------------------------------------------------------------------------------- /Examples/utilities.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | def plot_model(data): 4 | 5 | import matplotlib.pyplot as plt 6 | 7 | pos_data = [d.pos for d in data.demos] 8 | speed_data = [np.sqrt(np.sum(d.vel**2,0)) for d in data.demos] 9 | 10 | # plt.plot(speed_data[0]) 11 | # plt.show() 12 | # plt.figure() 13 | fig = plt.figure() 14 | 15 | fig.suptitle(data.name, fontsize=16) 16 | 17 | f1_ax1 = plt.subplot(2,1,1) 18 | f1_ax1.set_title("Position Trajectory") 19 | 20 | f1_ax2 = plt.subplot(2,1,2) 21 | f1_ax2.set_title("Speed Profile") 22 | 23 | for i, vals in enumerate(pos_data): 24 | lines = f1_ax1.plot(vals[0,:], vals[1,:],'b') 25 | start = f1_ax1.scatter(vals[0,0], vals[1,0], c = 'k', marker = 'x') 26 | target = f1_ax1.scatter(vals[0,-1], vals[1,-1], c = 'k', marker = '*') 27 | f1_ax2.plot(speed_data[i],'b') 28 | 29 | start.set_label("Starting Points") 30 | target.set_label("Target") 31 | 32 | f1_ax1.set_xlabel("x (mm)") 33 | f1_ax1.set_ylabel("y (mm)") 34 | 35 | f1_ax2.set_xlabel("time (s)") 36 | f1_ax2.set_ylabel("speed (mm/s)") 37 | f1_ax1.legend() 38 | plt.axis('tight') 39 | plt.show() 40 | 41 | 42 | 43 | if __name__ == '__main__': 44 | import pyLasaDataset as lasa 45 | 46 | plot_model(lasa.Angle) 47 | 48 | 49 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Giovanni Franzese 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SIMPLe: Safe, Interactive Movement Primitives Learning 2 | 3 | This is the code used for the experiments done for the paper: 4 | ### Interactive Imitation Learning of Bimanual Movement Primitives 5 | 6 | published in Transaction of Mechatronics (T-MECH). 7 | 8 | - [The official repository](https://github.com/franzesegiovanni/SIMPLe.git) 9 | 10 | - [The paper](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=10215052) 11 | 12 | ### What is SIMPLe? 13 | 14 | SIMPLe stands for Safe, Interactive Movement Primitives Learning. It is a framework that allows a robot to learn a movement primitive from a human demonstration. The motion is represensted as a trajectory or a graph of nodes. The encoding uses both the position and the time of each node of the trajectory. The algorithm uses both the information of the time and the currect position of the robot to attract the robot to most correlated nodes in the trajectory. 15 | 16 | ### Installation 17 | 18 | This is a ROS package. So you need to add it to your ROS workspace and catkin build it. 19 | 20 | Clone the repository in your ROS workspace. 21 | 22 | ```bash 23 | git clone https://github.com/franzesegiovanni/SIMPLe.git 24 | ``` 25 | 26 | Build your workspace. 27 | 28 | ```bash 29 | catkin build 30 | ``` 31 | 32 | ### How to run SIMPLe on a single robot 33 | 34 | Install the human friently impedance controller 35 | - [The human-friendly impedance controller](https://github.com/franzesegiovanni/franka_human_friendly_controllers.git) 36 | 37 | You can use the SIMPLE/main as example to start recording and executing motion using the SIMPLe trajectory representation. 38 | 39 | To run an example directly on the robot, you can use the the script main_single_arm.py. 40 | 41 | I suggest to open it in vscode and after installing the jupyter extension, you can run it cell by cell. 42 | 43 | If you want to run it in simulation, please follow the instructions in human friendly controller on how to run the controller in simulation. 44 | ### How to run SIMPLe bimanual 45 | 46 | Install the bimanual controller in the your workspace. Follow the instruction in the link 47 | - [The bimanual impedance controller](https://github.com/franzesegiovanni/franka_bimanual_controllers) 48 | 49 | Add this repo to your workspace and install it. 50 | 51 | In the directory scripts there are many examples that where used in the development of the paper for interactive learning of bimanual manipulation. 52 | 53 | 54 | ### Cite us 55 | 56 | If you find this repository useful, please cite: 57 | 58 | ``` 59 | Franzese, G., de Souza Rosa, L., Verburg, T., Peternel, L. and Kober, J., 2023. Interactive imitation learning of bimanual movement primitives. IEEE/ASME Transactions on Mechatronics. 60 | ``` 61 | -------------------------------------------------------------------------------- /SIMPLe/__init__.py: -------------------------------------------------------------------------------- 1 | from SIMPLe.SIMPLe import SIMPLe 2 | 3 | __all__ = ['SIMPLe'] 4 | -------------------------------------------------------------------------------- /SIMPLe/data/last.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/SIMPLe/data/last.npz -------------------------------------------------------------------------------- /SIMPLe/utils.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | def slerp_sat(q1, q2, theta_max_perc): 3 | ''' 4 | This function goes to q2 from q1 but with set maximum theta 5 | ''' 6 | theta_max=theta_max_perc*np.pi/2 7 | # if np.shape(q1)!=(1,4) or np.shape(q2)!=(1,4): 8 | # print("Wrong dimensions of q1 or q2") 9 | q1=q1.reshape(4) 10 | q2=q2.reshape(4) 11 | q1=q1/np.sqrt(np.sum(q1**2)) 12 | q2=q2/np.sqrt(np.sum(q2**2)) 13 | inner=np.inner(q1,q2) 14 | if inner<0: 15 | q2=-q2 16 | theta= np.arccos(np.abs(inner)) 17 | q_slerp=np.copy(q2) 18 | if theta>theta_max: 19 | q_slerp[0]=(np.sin(theta-theta_max)*q1[0]+np.sin(theta_max)*q2[0])/np.sin(theta) 20 | q_slerp[1]=(np.sin(theta-theta_max)*q1[1]+np.sin(theta_max)*q2[1])/np.sin(theta) 21 | q_slerp[2]=(np.sin(theta-theta_max)*q1[2]+np.sin(theta_max)*q2[2])/np.sin(theta) 22 | q_slerp[3]=(np.sin(theta-theta_max)*q1[3]+np.sin(theta_max)*q2[3])/np.sin(theta) 23 | return q_slerp -------------------------------------------------------------------------------- /SIMPLe_bimanual/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/SIMPLe_bimanual/__init__.py -------------------------------------------------------------------------------- /SIMPLe_bimanual/data/dual_last.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/SIMPLe_bimanual/data/dual_last.npz -------------------------------------------------------------------------------- /SIMPLe_bimanual/ggp.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | class GGP(): 4 | def __init__(self, execution_traj, control_frequancy=30, labda_position=0.05, lamda_time=0.05, look_ahead=3): 5 | self.look_ahead=look_ahead # how many steps forward is the attractor for any element of the graph 6 | 7 | self.labda_position=labda_position 8 | self.lambda_index=control_frequancy*lamda_time 9 | 10 | self.mu_index=0 11 | 12 | self.execution_traj=execution_traj 13 | 14 | self.n_samples= self.execution_traj.shape[1] 15 | 16 | def step(self, cart_pos): 17 | 18 | 19 | sigma_treshold= 1 - np.exp(-2) 20 | #calcolation of correlation in space 21 | position_error= np.linalg.norm(self.execution_traj.T - np.array(cart_pos), axis=1)/self.labda_position 22 | 23 | #calcolation of correlation in time 24 | index=np.min([self.mu_index+self.look_ahead, self.n_samples-1]) 25 | index_error= np.abs(np.arange(self.n_samples)-index)/self.lambda_index 26 | index_error_clip= np.clip(index_error, 0, 1) 27 | 28 | # Calculate the product of the two correlation vectors 29 | k_start_time_position=np.exp(-position_error-index_error_clip) 30 | 31 | # Compute the uncertainty only as a function of the correlation in space and time 32 | sigma_position_time= 1- np.max(k_start_time_position) 33 | 34 | # Compute the scaling factor for the stiffness Eq 15 35 | if sigma_position_time > sigma_treshold: 36 | beta= (1-sigma_position_time)/(1-sigma_treshold) 37 | self.mu_index = int(np.argmax(k_start_time_position)) 38 | else: 39 | beta=1 40 | self.mu_index = int(self.mu_index+ 1.0*np.sign((int(np.argmax(k_start_time_position))- self.mu_index))) 41 | 42 | i = np.min([self.mu_index+int(self.look_ahead), self.n_samples-1]) 43 | 44 | return i, beta 45 | 46 | 47 | -------------------------------------------------------------------------------- /SIMPLe_bimanual/utils.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | def get_quaternion_from_euler(roll, pitch, yaw): 3 | """ 4 | Convert an Euler angle to a quaternion. 5 | 6 | Input 7 | :param roll: The roll (rotation around x-axis) angle in radians. 8 | :param pitch: The pitch (rotation around y-axis) angle in radians. 9 | :param yaw: The yaw (rotation around z-axis) angle in radians. 10 | 11 | Output 12 | :return qx, qy, qz, qw: The orientation in quaternion [x,y,z,w] format 13 | """ 14 | qx = np.sin(roll/2) * np.cos(pitch/2) * np.cos(yaw/2) - np.cos(roll/2) * np.sin(pitch/2) * np.sin(yaw/2) 15 | qy = np.cos(roll/2) * np.sin(pitch/2) * np.cos(yaw/2) + np.sin(roll/2) * np.cos(pitch/2) * np.sin(yaw/2) 16 | qz = np.cos(roll/2) * np.cos(pitch/2) * np.sin(yaw/2) - np.sin(roll/2) * np.sin(pitch/2) * np.cos(yaw/2) 17 | qw = np.cos(roll/2) * np.cos(pitch/2) * np.cos(yaw/2) + np.sin(roll/2) * np.sin(pitch/2) * np.sin(yaw/2) 18 | 19 | return [ qw ,qx, qy, qz] -------------------------------------------------------------------------------- /data/dual_last.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data/dual_last.npz -------------------------------------------------------------------------------- /data/panda_left_last.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data/panda_left_last.npz -------------------------------------------------------------------------------- /data/panda_right_last.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data/panda_right_last.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/data_analysis.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Sun Aug 28 18:05:18 2022 4 | 5 | @author: timve 6 | """ 7 | 8 | import numpy as np 9 | from datetime import datetime 10 | import pathlib 11 | import matplotlib.pyplot as plt 12 | 13 | def load(filename): 14 | data = np.load(str(pathlib.Path().resolve()) + '/data/' + str(filename) + '.npz') 15 | return data 16 | 17 | n = 7 18 | data_kin = [] 19 | data_tel = [] 20 | 21 | 22 | for i in range(1,n+1): 23 | try: 24 | data_kin.append(load(f"dual_{i}_kin_dem")) 25 | except: 26 | data_kin.append(0) 27 | 28 | try: 29 | data_tel.append(load(f"dual_{i}_tel_dem")) 30 | except: 31 | data_tel.append(0) 32 | 33 | plt.figure(0) 34 | print('d') 35 | for i ,d in enumerate(data_kin): 36 | plt.plot(d['recorded_traj_dual'][0], label=i) 37 | print(len(d['recorded_traj_dual'][0])) 38 | plt.legend() 39 | 40 | plt.figure(1) 41 | print('t') 42 | for i, t in enumerate(data_tel): 43 | if t != 0: 44 | plt.plot(t['recorded_traj_dual'][0], label=i) 45 | print(len(t['recorded_traj_dual'][0])) 46 | else: 47 | print(0) 48 | pass 49 | plt.legend() 50 | 51 | #%% 52 | import scipy.stats as st 53 | a=[965, 1795, 1180, 1205]#1795, 1180 , 1205] 54 | b=[8028,4730, 5294, 9430] #my idea is to put 10000 for the example that failed 55 | (stat, p) = st.ttest_rel(a,b) 56 | 57 | #%% 58 | import scipy.stats as st 59 | a=[1116, 965, 1188, 827, 1795, 1180, 1205]#1795, 1180 , 1205] 60 | b=[1.5*9430, 8028, 1.5*9430, 1.5*9430, 4730, 5294, 9430] #my idea is to put 10000 for the example that failed 61 | (stat, p) = st.ttest_rel(a,b) 62 | 63 | #%% 64 | 65 | import plotly.graph_objects as go 66 | 67 | categories = ['Mental Demand', 'Physical Demand', 'Temporal Demand', 'Effort', 'Frustration'] 68 | 69 | fig = go.Figure() 70 | 71 | fig.add_trace(go.Scatterpolar( 72 | r=[3.57, 9, 6.86, 4.29, 2.86], 73 | theta=categories, 74 | fill='toself', 75 | name='Kinesthetic Teaching' 76 | )) 77 | fig.add_trace(go.Scatterpolar( 78 | r=[16.43, 3.86, 10.57, 16.57, 11.71], 79 | theta=categories, 80 | fill='toself', 81 | name='Teleoperated Teaching' 82 | )) 83 | 84 | fig.update_layout( 85 | polar=dict( 86 | radialaxis=dict( 87 | visible=True, 88 | range=[0, 20] 89 | )), 90 | showlegend=False 91 | ) 92 | 93 | fig.show() 94 | # %% 95 | -------------------------------------------------------------------------------- /data_analysis/experiments_data/folding_clothes_1/23_16_32_57.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/folding_clothes_1/23_16_32_57.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/folding_clothes_1/23_16_34_07.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/folding_clothes_1/23_16_34_07.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/folding_clothes_1/23_16_35_01.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/folding_clothes_1/23_16_35_01.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/pick_place_1/23_12_30_55.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/pick_place_1/23_12_30_55.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/pick_place_1/23_12_31_48.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/pick_place_1/23_12_31_48.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/pick_place_1/23_12_32_55.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/pick_place_1/23_12_32_55.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/pick_place_1/23_12_36_12.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/pick_place_1/23_12_36_12.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/pick_place_official/23_14_09_09.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/pick_place_official/23_14_09_09.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/pick_place_official/23_14_10_09.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/pick_place_official/23_14_10_09.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/pick_place_official/23_14_11_09.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/pick_place_official/23_14_11_09.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/pick_place_official/23_14_14_20.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/pick_place_official/23_14_14_20.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/pick_place_official/dual_last.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/pick_place_official/dual_last.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/pick_place_official/panda_left_last.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/pick_place_official/panda_left_last.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/pick_place_official/panda_right_last.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/pick_place_official/panda_right_last.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_correction/19_17_33_23.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_correction/19_17_33_23.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_correction/19_17_34_42.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_correction/19_17_34_42.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_correction/19_17_36_07.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_correction/19_17_36_07.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_correction/19_17_37_18.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_correction/19_17_37_18.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_correction/19_17_41_00.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_correction/19_17_41_00.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_correction/19_17_42_19.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_correction/19_17_42_19.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_correction/19_17_43_14.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_correction/19_17_43_14.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_correction/19_17_44_23.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_correction/19_17_44_23.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_small_box/24_18_06_52.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_small_box/24_18_06_52.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_small_box/24_18_07_54.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_small_box/24_18_07_54.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_small_box/24_18_08_45.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_small_box/24_18_08_45.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_small_box/24_18_10_17.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_small_box/24_18_10_17.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_small_box/24_18_11_19.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_small_box/24_18_11_19.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_small_box/24_18_12_27.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_small_box/24_18_12_27.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_small_box/24_18_16_34.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_small_box/24_18_16_34.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_syncro/19_16_33_45.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_syncro/19_16_33_45.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_syncro/19_16_34_33.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_syncro/19_16_34_33.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_syncro/19_16_36_39.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_syncro/19_16_36_39.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_syncro/19_16_39_22.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_syncro/19_16_39_22.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_syncro/19_16_41_43.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_syncro/19_16_41_43.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_syncro/19_16_42_56.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_syncro/19_16_42_56.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_syncro/19_16_43_42.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_syncro/19_16_43_42.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_syncro/19_16_44_17.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_syncro/19_16_44_17.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_syncro/dual_last.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_syncro/dual_last.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_syncro/panda_left_last.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_syncro/panda_left_last.npz -------------------------------------------------------------------------------- /data_analysis/experiments_data/recording_syncro/panda_right_last.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/experiments_data/recording_syncro/panda_right_last.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_08_03.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_08_03.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_08_36.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_08_36.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_09_15.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_09_15.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_10_25.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_10_25.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_11_13.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_11_13.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_11_47.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_11_47.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_12_18.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_12_18.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_13_12.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_13_12.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_13_50.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_13_50.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_14_53.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_1/10_16_14_53.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_17_11.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_17_11.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_18_27.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_18_27.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_19_19.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_19_19.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_20_36.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_20_36.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_21_22.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_21_22.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_22_37.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_22_37.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_23_46.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_23_46.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_24_46.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_24_46.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_25_14.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_25_14.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_26_15.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_2/10_16_26_15.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_3/10_16_27_51.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_3/10_16_27_51.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_3/10_16_28_57.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_3/10_16_28_57.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_3/10_16_29_44.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_3/10_16_29_44.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_3/10_16_30_05.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_3/10_16_30_05.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_3/10_16_31_59.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_3/10_16_31_59.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_3/10_16_32_39.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_3/10_16_32_39.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_3/10_16_33_36.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_3/10_16_33_36.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_3/10_16_34_11.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_3/10_16_34_11.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_4/10_16_36_03.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_4/10_16_36_03.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_4/10_16_36_31.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_4/10_16_36_31.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_4/10_16_37_22.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_4/10_16_37_22.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_4/10_16_38_00.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_4/10_16_38_00.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_4/10_16_38_28.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_4/10_16_38_28.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_4/10_16_39_15.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_4/10_16_39_15.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_4/10_16_39_42.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_4/10_16_39_42.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_4/10_16_40_22.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_4/10_16_40_22.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_5/10_16_42_11.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_5/10_16_42_11.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_5/10_16_42_32.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_5/10_16_42_32.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_5/10_16_43_18.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_5/10_16_43_18.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_5/10_16_43_55.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_5/10_16_43_55.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_5/10_16_44_30.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_5/10_16_44_30.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_5/10_16_45_04.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_5/10_16_45_04.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_5/10_16_45_54.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_5/10_16_45_54.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/Box_correction_5/10_16_46_27.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/box_correction_experiment/Box_correction_5/10_16_46_27.npz -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/plot copy.py: -------------------------------------------------------------------------------- 1 | # %% 2 | import matplotlib.pyplot as plt 3 | import numpy as np 4 | import pathlib 5 | import os 6 | 7 | data = { 8 | 'Trajectory': [], 9 | 'Error': [] 10 | } 11 | error_complete=[] 12 | for trial in range(5): 13 | data['Trajectory'].append(trial+1) 14 | directory = str(pathlib.Path().resolve()) + '/Box_correction_' + str(trial+1) + '/' 15 | 16 | files = os.listdir(directory) 17 | files.sort() 18 | print(files) 19 | loaded_files = [] 20 | for file_name in files: 21 | file_path = os.path.join(directory, file_name) 22 | loaded_file = np.load(file_path) 23 | loaded_files.append(loaded_file) 24 | 25 | recording_freq = 20 26 | fig, ax = plt.subplots(3, 1, sharex='col', sharey='row') 27 | error=[] 28 | for index, trajectory in enumerate(loaded_files[-5:]): 29 | time= np.linspace(0, trajectory['recorded_cart_pose'].shape[1],trajectory['recorded_cart_pose'].shape[1])/recording_freq 30 | for i in range (3): 31 | ax[i].plot(time, trajectory['recorded_tag_position'][i]) 32 | error.append(np.linalg.norm(loaded_files[-6]['recorded_tag_position'][:,-1]-trajectory['recorded_tag_position'][:,-1])) 33 | mean=np.mean(error) 34 | std=np.std(error) 35 | error.append(mean) 36 | error.append(std) 37 | error_complete.append(error) 38 | ax[0].axhline(y=loaded_files[-6]['recorded_tag_position'][0][-1], color='red', linestyle='--') 39 | ax[1].axhline(y=loaded_files[-6]['recorded_tag_position'][1][-1], color='red', linestyle='--') 40 | ax[2].axhline(y=loaded_files[-6]['recorded_tag_position'][2][-1], color='red', linestyle='--') 41 | ax[0].set_ylabel('X') 42 | ax[1].set_ylabel('Y') 43 | ax[2].set_ylabel('Z') 44 | 45 | 46 | fig, ax = plt.subplots() 47 | ax.axis('off') # Hide axes 48 | 49 | plt.title("Error in execution") 50 | # Add an extra row and column labels 51 | row_labels = ['Trial 1', 'Trial 2', 'Trial 3', 'Trial 4', 'Trial 5'] 52 | col_labels = ['Execution 1', 'Execution 2', 'Execution 3', 'Execution 4', 'Execution 5', 'Mean', 'Std'] 53 | 54 | table = plt.table(cellText=error_complete, 55 | loc='center', 56 | cellLoc='center', 57 | rowLabels=row_labels, 58 | colLabels=col_labels) 59 | 60 | table.auto_set_font_size(False) 61 | table.set_fontsize(12) 62 | table.scale(1.2, 1.2) 63 | 64 | for trial in range(5): 65 | data['Trajectory'].append(trial+1) 66 | directory = str(pathlib.Path().resolve()) + '/Box_correction_' + str(trial+1) + '/' 67 | 68 | files = os.listdir(directory) 69 | files.sort() 70 | print(files) 71 | loaded_files = [] 72 | for file_name in files: 73 | file_path = os.path.join(directory, file_name) 74 | loaded_file = np.load(file_path) 75 | loaded_files.append(loaded_file) 76 | 77 | recording_freq = 20 78 | fig, ax = plt.subplots(2, 1, sharex='col', sharey='row') 79 | error=[] 80 | for index, trajectory in enumerate(loaded_files[:-5]): 81 | time= np.linspace(0, trajectory['recorded_force_torque'].shape[1],trajectory['recorded_force_torque'].shape[1])/recording_freq 82 | ax[0].plot(time, np.linalg.norm(trajectory['recorded_force_torque'][:6], axis=0), label=str(index)) 83 | ax[1].plot(time, np.linalg.norm(trajectory['recorded_force_torque'][6:], axis=0), label=str(index)) 84 | ax[0].legend() 85 | ax[1].legend() 86 | plt.show() 87 | -------------------------------------------------------------------------------- /data_analysis/recordings/box_correction_experiment/plot.py: -------------------------------------------------------------------------------- 1 | # %% 2 | # %% 3 | import matplotlib.pyplot as plt 4 | import numpy as np 5 | import pathlib 6 | import os 7 | 8 | data = { 9 | 'Trajectory': [], 10 | 'Error': [] 11 | } 12 | error_complete=[] 13 | for trial in range(5): 14 | data['Trajectory'].append(trial+1) 15 | directory = str(pathlib.Path().resolve()) + '/Box_correction_' + str(trial+1) + '/' 16 | 17 | files = os.listdir(directory) 18 | files.sort() 19 | print(files) 20 | loaded_files = [] 21 | for file_name in files: 22 | file_path = os.path.join(directory, file_name) 23 | loaded_file = np.load(file_path) 24 | loaded_files.append(loaded_file) 25 | 26 | recording_freq = 20 27 | fig, ax = plt.subplots(3, 1, sharex='col', sharey='row') 28 | error=[] 29 | for index, trajectory in enumerate(loaded_files[-5:]): 30 | time= np.linspace(0, trajectory['recorded_cart_pose'].shape[1],trajectory['recorded_cart_pose'].shape[1])/recording_freq 31 | for i in range (3): 32 | ax[i].plot(time, trajectory['recorded_tag_position'][i]) 33 | error.append(np.linalg.norm(loaded_files[-6]['recorded_tag_position'][:,-1]-trajectory['recorded_tag_position'][:,-1])) 34 | mean=np.mean(error) 35 | std=np.std(error) 36 | error.append(mean) 37 | error.append(std) 38 | error_complete.append(error) 39 | ax[0].axhline(y=loaded_files[-6]['recorded_tag_position'][0][-1], color='red', linestyle='--') 40 | ax[1].axhline(y=loaded_files[-6]['recorded_tag_position'][1][-1], color='red', linestyle='--') 41 | ax[2].axhline(y=loaded_files[-6]['recorded_tag_position'][2][-1], color='red', linestyle='--') 42 | ax[0].set_ylabel('X') 43 | ax[1].set_ylabel('Y') 44 | ax[2].set_ylabel('Z') 45 | 46 | 47 | fig, ax = plt.subplots() 48 | ax.axis('off') # Hide axes 49 | 50 | plt.title("Error in execution") 51 | # Add an extra row and column labels 52 | row_labels = ['Trial 1', 'Trial 2', 'Trial 3', 'Trial 4', 'Trial 5'] 53 | col_labels = ['Execution 1', 'Execution 2', 'Execution 3', 'Execution 4', 'Execution 5', 'Mean', 'Std'] 54 | 55 | table = plt.table(cellText=error_complete, 56 | loc='center', 57 | cellLoc='center', 58 | rowLabels=row_labels, 59 | colLabels=col_labels) 60 | 61 | table.auto_set_font_size(False) 62 | table.set_fontsize(12) 63 | table.scale(1.2, 1.2) 64 | 65 | error_flat= np.array(error_complete).flatten() 66 | print("Average error:",np.mean(error_flat)) 67 | print("Standard deviation of the error", np.std(error_flat)) 68 | 69 | plt.show() 70 | 71 | # print(std) 72 | # sum(std**2) 73 | 74 | -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_1/15_11_49_32.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_1/15_11_49_32.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_1/15_11_59_51.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_1/15_11_59_51.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_1/15_12_06_24.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_1/15_12_06_24.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_1/15_12_07_14.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_1/15_12_07_14.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_1/15_12_09_06.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_1/15_12_09_06.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_1/15_12_10_32.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_1/15_12_10_32.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_1/15_12_11_22.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_1/15_12_11_22.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_1/15_12_14_52.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_1/15_12_14_52.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_1/15_12_16_06.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_1/15_12_16_06.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_2/15_12_21_35.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_2/15_12_21_35.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_2/15_12_22_14.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_2/15_12_22_14.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_2/15_12_28_08.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_2/15_12_28_08.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_2/15_12_29_44.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_2/15_12_29_44.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_2/15_12_31_15.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_2/15_12_31_15.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_2/15_12_32_44.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_2/15_12_32_44.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_2/15_12_33_42.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_2/15_12_33_42.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_2/15_12_35_15.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_2/15_12_35_15.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_2/15_12_37_13.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_2/15_12_37_13.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_3/15_12_38_53.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_3/15_12_38_53.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_3/15_12_39_26.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_3/15_12_39_26.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_3/15_12_43_05.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_3/15_12_43_05.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_3/15_12_44_11.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_3/15_12_44_11.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_3/15_12_44_52.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_3/15_12_44_52.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_3/15_12_46_23.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_3/15_12_46_23.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_3/15_12_49_01.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_3/15_12_49_01.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_3/15_12_49_59.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_3/15_12_49_59.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_4/15_12_51_40.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_4/15_12_51_40.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_4/15_12_52_07.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_4/15_12_52_07.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_4/15_12_52_43.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_4/15_12_52_43.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_4/15_12_53_49.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_4/15_12_53_49.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_4/15_12_55_59.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_4/15_12_55_59.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_4/15_12_56_45.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_4/15_12_56_45.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_4/15_12_57_54.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_4/15_12_57_54.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_4/15_12_59_06.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_4/15_12_59_06.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_5/15_13_01_17.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_5/15_13_01_17.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_5/15_13_01_50.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_5/15_13_01_50.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_5/15_13_02_23.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_5/15_13_02_23.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_5/15_13_04_31.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_5/15_13_04_31.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_5/15_13_05_43.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_5/15_13_05_43.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_5/15_13_06_53.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_5/15_13_06_53.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_5/15_13_07_36.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_5/15_13_07_36.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/p_n_p_5/15_13_08_48.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/p_n_p_experiments/p_n_p_5/15_13_08_48.npz -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/plot copy.py: -------------------------------------------------------------------------------- 1 | # %% 2 | import matplotlib.pyplot as plt 3 | import numpy as np 4 | import pathlib 5 | import os 6 | 7 | data = { 8 | 'Trajectory': [], 9 | 'Error': [] 10 | } 11 | error_complete=[] 12 | for trial in range(5): 13 | data['Trajectory'].append(trial+1) 14 | directory = str(pathlib.Path().resolve()) + '/p_n_p_' + str(trial+1) + '/' 15 | 16 | files = os.listdir(directory) 17 | files.sort() 18 | print(files) 19 | loaded_files = [] 20 | for file_name in files: 21 | file_path = os.path.join(directory, file_name) 22 | loaded_file = np.load(file_path) 23 | loaded_files.append(loaded_file) 24 | 25 | recording_freq = 20 26 | fig, ax = plt.subplots(3, 1, sharex='col', sharey='row') 27 | error=[] 28 | for index, trajectory in enumerate(loaded_files[-5:]): 29 | time= np.linspace(0, trajectory['recorded_cart_pose'].shape[1],trajectory['recorded_cart_pose'].shape[1])/recording_freq 30 | for i in range (3): 31 | ax[i].plot(time, trajectory['recorded_tag_position_0'][i]) 32 | error.append(np.linalg.norm(loaded_files[-6]['recorded_tag_position_0'][:,-1]-trajectory['recorded_tag_position_0'][:,-1])) 33 | mean=np.mean(error) 34 | std=np.std(error) 35 | error.append(mean) 36 | error.append(std) 37 | error_complete.append(error) 38 | ax[0].axhline(y=loaded_files[-6]['recorded_tag_position_0'][0][-1], color='red', linestyle='--') 39 | ax[1].axhline(y=loaded_files[-6]['recorded_tag_position_0'][1][-1], color='red', linestyle='--') 40 | ax[2].axhline(y=loaded_files[-6]['recorded_tag_position_0'][2][-1], color='red', linestyle='--') 41 | ax[0].set_ylabel('X') 42 | ax[1].set_ylabel('Y') 43 | ax[2].set_ylabel('Z') 44 | 45 | 46 | fig, ax = plt.subplots() 47 | ax.axis('off') # Hide axes 48 | 49 | plt.title("Error in execution") 50 | # Add an extra row and column labels 51 | row_labels = ['Trial 1', 'Trial 2', 'Trial 3', 'Trial 4', 'Trial 5'] 52 | col_labels = ['Execution 1', 'Execution 2', 'Execution 3', 'Execution 4', 'Execution 5', 'Mean', 'Std'] 53 | 54 | table = plt.table(cellText=error_complete, 55 | loc='center', 56 | cellLoc='center', 57 | rowLabels=row_labels, 58 | colLabels=col_labels) 59 | 60 | table.auto_set_font_size(False) 61 | table.set_fontsize(12) 62 | table.scale(1.2, 1.2) 63 | 64 | for trial in range(5): 65 | data['Trajectory'].append(trial+1) 66 | directory = str(pathlib.Path().resolve()) + '/p_n_p_' + str(trial+1) + '/' 67 | 68 | files = os.listdir(directory) 69 | files.sort() 70 | print(files) 71 | loaded_files = [] 72 | for file_name in files: 73 | file_path = os.path.join(directory, file_name) 74 | loaded_file = np.load(file_path) 75 | loaded_files.append(loaded_file) 76 | 77 | recording_freq = 20 78 | fig, ax = plt.subplots(3, 1, sharex='col', sharey='row') 79 | error=[] 80 | for index, trajectory in enumerate(loaded_files[:-5]): 81 | time= np.linspace(0, trajectory['recorded_force_torque'].shape[1],trajectory['recorded_force_torque'].shape[1])/recording_freq 82 | for i in range (3): 83 | ax[i].plot(time, trajectory['recorded_force_torque'][i]) 84 | mean=np.mean(error) 85 | std=np.std(error) 86 | error.append(mean) 87 | error.append(std) 88 | error_complete.append(error) 89 | ax[0].axhline(y=loaded_files[-6]['recorded_tag_position_0'][0][-1], color='red', linestyle='--') 90 | ax[1].axhline(y=loaded_files[-6]['recorded_tag_position_0'][1][-1], color='red', linestyle='--') 91 | ax[2].axhline(y=loaded_files[-6]['recorded_tag_position_0'][2][-1], color='red', linestyle='--') 92 | ax[0].set_ylabel('X') 93 | ax[1].set_ylabel('Y') 94 | ax[2].set_ylabel('Z') 95 | 96 | plt.show() 97 | -------------------------------------------------------------------------------- /data_analysis/recordings/p_n_p_experiments/plot.py: -------------------------------------------------------------------------------- 1 | # %% 2 | import matplotlib.pyplot as plt 3 | import numpy as np 4 | import pathlib 5 | import os 6 | 7 | data = { 8 | 'Trajectory': [], 9 | 'Error': [] 10 | } 11 | error_complete=[] 12 | for trial in range(5): 13 | data['Trajectory'].append(trial+1) 14 | directory = str(pathlib.Path().resolve()) + '/p_n_p_' + str(trial+1) + '/' 15 | 16 | files = os.listdir(directory) 17 | files.sort() 18 | print(files) 19 | loaded_files = [] 20 | for file_name in files: 21 | file_path = os.path.join(directory, file_name) 22 | loaded_file = np.load(file_path) 23 | loaded_files.append(loaded_file) 24 | 25 | recording_freq = 20 26 | fig, ax = plt.subplots(3, 1, sharex='col', sharey='row') 27 | error=[] 28 | for index, trajectory in enumerate(loaded_files[-5:]): 29 | time= np.linspace(0, trajectory['recorded_cart_pose'].shape[1],trajectory['recorded_cart_pose'].shape[1])/recording_freq 30 | for i in range (3): 31 | ax[i].plot(time, trajectory['recorded_tag_position_0'][i]) 32 | error.append(np.linalg.norm(loaded_files[-6]['recorded_tag_position_0'][:,-1]-trajectory['recorded_tag_position_0'][:,-1])) 33 | mean=np.mean(error) 34 | std=np.std(error) 35 | error.append(mean) 36 | error.append(std) 37 | error_complete.append(error) 38 | ax[0].axhline(y=loaded_files[-6]['recorded_tag_position_0'][0][-1], color='red', linestyle='--') 39 | ax[1].axhline(y=loaded_files[-6]['recorded_tag_position_0'][1][-1], color='red', linestyle='--') 40 | ax[2].axhline(y=loaded_files[-6]['recorded_tag_position_0'][2][-1], color='red', linestyle='--') 41 | ax[0].set_ylabel('X') 42 | ax[1].set_ylabel('Y') 43 | ax[2].set_ylabel('Z') 44 | 45 | 46 | fig, ax = plt.subplots() 47 | ax.axis('off') # Hide axes 48 | 49 | plt.title("Error in execution") 50 | # Add an extra row and column labels 51 | row_labels = ['Trial 1', 'Trial 2', 'Trial 3', 'Trial 4', 'Trial 5'] 52 | col_labels = ['Execution 1', 'Execution 2', 'Execution 3', 'Execution 4', 'Execution 5', 'Mean', 'Std'] 53 | 54 | table = plt.table(cellText=error_complete, 55 | loc='center', 56 | cellLoc='center', 57 | rowLabels=row_labels, 58 | colLabels=col_labels) 59 | 60 | table.auto_set_font_size(False) 61 | table.set_fontsize(12) 62 | table.scale(1.2, 1.2) 63 | 64 | error_flat= np.array(error_complete).flatten() 65 | print("Average error:",np.mean(error_flat)) 66 | print("Standard deviation of the error", np.std(error_flat)) 67 | 68 | plt.show() 69 | -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_46_30.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_46_30.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_50_41.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_50_41.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_51_49.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_51_49.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_53_00.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_53_00.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_53_40.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_53_40.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_55_00.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_55_00.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_56_25.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_56_25.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_57_24.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_57_24.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_58_04.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_58_04.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_59_07.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_59_07.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_59_42.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_11_59_42.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_12_00_07.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_12_00_07.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_12_01_08.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_1/10_12_01_08.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_2/10_12_04_22.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_2/10_12_04_22.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_2/10_12_04_55.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_2/10_12_04_55.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_2/10_12_05_17.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_2/10_12_05_17.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_2/10_12_06_27.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_2/10_12_06_27.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_2/10_12_07_21.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_2/10_12_07_21.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_2/10_12_08_46.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_2/10_12_08_46.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_2/10_12_09_10.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_2/10_12_09_10.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_2/10_12_09_51.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_2/10_12_09_51.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_2/10_12_11_03.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_2/10_12_11_03.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_12_42.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_12_42.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_13_03.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_13_03.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_13_53.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_13_53.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_14_37.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_14_37.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_16_03.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_16_03.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_16_57.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_16_57.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_17_37.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_17_37.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_19_01.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_19_01.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_19_47.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_19_47.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_20_18.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_20_18.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_21_22.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_21_22.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_22_39.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_22_39.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_23_15.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_3/10_12_23_15.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_25_50.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_25_50.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_26_16.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_26_16.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_26_50.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_26_50.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_37_35.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_37_35.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_39_15.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_39_15.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_40_14.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_40_14.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_40_44.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_40_44.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_41_30.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_41_30.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_41_58.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_41_58.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_42_45.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_42_45.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_43_21.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_4/10_12_43_21.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_5/10_12_46_51.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_5/10_12_46_51.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_5/10_12_47_21.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_5/10_12_47_21.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_5/10_12_47_41.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_5/10_12_47_41.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_5/10_12_48_15.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_5/10_12_48_15.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_5/10_12_49_48.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_5/10_12_49_48.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_5/10_12_50_54.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_5/10_12_50_54.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_5/10_12_51_40.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_5/10_12_51_40.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_5/10_12_52_20.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_5/10_12_52_20.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/10_may_sync_5/10_12_52_45.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/data_analysis/recordings/syncronization_experiments/10_may_sync_5/10_12_52_45.npz -------------------------------------------------------------------------------- /data_analysis/recordings/syncronization_experiments/plot.py: -------------------------------------------------------------------------------- 1 | # %% 2 | import matplotlib.pyplot as plt 3 | import numpy as np 4 | import pathlib 5 | import os 6 | 7 | data = { 8 | 'Trajectory': [], 9 | 'Error': [] 10 | } 11 | error_complete=[] 12 | for trial in range(5): 13 | data['Trajectory'].append(trial+1) 14 | directory = str(pathlib.Path().resolve()) + '/10_may_sync_' + str(trial+1) + '/' 15 | 16 | files = os.listdir(directory) 17 | files.sort() 18 | print(files) 19 | loaded_files = [] 20 | for file_name in files: 21 | file_path = os.path.join(directory, file_name) 22 | loaded_file = np.load(file_path) 23 | loaded_files.append(loaded_file) 24 | 25 | recording_freq = 20 26 | fig, ax = plt.subplots(3, 1, sharex='col', sharey='row') 27 | error=[] 28 | for index, trajectory in enumerate(loaded_files[-5:]): 29 | time= np.linspace(0, trajectory['recorded_cart_pose'].shape[1],trajectory['recorded_cart_pose'].shape[1])/recording_freq 30 | for i in range (3): 31 | ax[i].plot(time, trajectory['recorded_tag_position'][i]) 32 | error.append(np.linalg.norm(loaded_files[-6]['recorded_tag_position'][:,-1]-trajectory['recorded_tag_position'][:,-1])) 33 | mean=np.mean(error) 34 | std=np.std(error) 35 | error.append(mean) 36 | error.append(std) 37 | error_complete.append(error) 38 | ax[0].axhline(y=loaded_files[-6]['recorded_tag_position'][0][-1], color='red', linestyle='--') 39 | ax[1].axhline(y=loaded_files[-6]['recorded_tag_position'][1][-1], color='red', linestyle='--') 40 | ax[2].axhline(y=loaded_files[-6]['recorded_tag_position'][2][-1], color='red', linestyle='--') 41 | ax[0].set_ylabel('X') 42 | ax[1].set_ylabel('Y') 43 | ax[2].set_ylabel('Z') 44 | 45 | 46 | fig, ax = plt.subplots() 47 | ax.axis('off') # Hide axes 48 | 49 | plt.title("Error in execution") 50 | # Add an extra row and column labels 51 | row_labels = ['Trial 1', 'Trial 2', 'Trial 3', 'Trial 4', 'Trial 5'] 52 | col_labels = ['Execution 1', 'Execution 2', 'Execution 3', 'Execution 4', 'Execution 5', 'Mean', 'Std'] 53 | 54 | table = plt.table(cellText=error_complete, 55 | loc='center', 56 | cellLoc='center', 57 | rowLabels=row_labels, 58 | colLabels=col_labels) 59 | 60 | table.auto_set_font_size(False) 61 | table.set_fontsize(12) 62 | table.scale(1.2, 1.2) 63 | 64 | error_flat= np.array(error_complete).flatten() 65 | print("Average error:",np.mean(error_flat)) 66 | print("Standard deviation of the error", np.std(error_flat)) 67 | 68 | plt.show() 69 | -------------------------------------------------------------------------------- /franka_gripper/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/__init__.py -------------------------------------------------------------------------------- /franka_gripper/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/__init__.pyc -------------------------------------------------------------------------------- /franka_gripper/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_GraspAction.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_GraspAction.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_GraspActionFeedback.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_GraspActionFeedback.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_GraspActionGoal.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_GraspActionGoal.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_GraspActionResult.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_GraspActionResult.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_GraspEpsilon.py: -------------------------------------------------------------------------------- 1 | # This Python file uses the following encoding: utf-8 2 | """autogenerated by genpy from franka_gripper/GraspEpsilon.msg. Do not edit.""" 3 | import codecs 4 | import sys 5 | python3 = True if sys.hexversion > 0x03000000 else False 6 | import genpy 7 | import struct 8 | 9 | 10 | class GraspEpsilon(genpy.Message): 11 | _md5sum = "95b2c5464a6f679bd1dacaf86414f095" 12 | _type = "franka_gripper/GraspEpsilon" 13 | _has_header = False # flag to mark the presence of a Header object 14 | _full_text = """float64 inner # [m] 15 | float64 outer # [m] 16 | """ 17 | __slots__ = ['inner','outer'] 18 | _slot_types = ['float64','float64'] 19 | 20 | def __init__(self, *args, **kwds): 21 | """ 22 | Constructor. Any message fields that are implicitly/explicitly 23 | set to None will be assigned a default value. The recommend 24 | use is keyword arguments as this is more robust to future message 25 | changes. You cannot mix in-order arguments and keyword arguments. 26 | 27 | The available fields are: 28 | inner,outer 29 | 30 | :param args: complete set of field values, in .msg order 31 | :param kwds: use keyword arguments corresponding to message field names 32 | to set specific fields. 33 | """ 34 | if args or kwds: 35 | super(GraspEpsilon, self).__init__(*args, **kwds) 36 | # message fields cannot be None, assign default values for those that are 37 | if self.inner is None: 38 | self.inner = 0. 39 | if self.outer is None: 40 | self.outer = 0. 41 | else: 42 | self.inner = 0. 43 | self.outer = 0. 44 | 45 | def _get_types(self): 46 | """ 47 | internal API method 48 | """ 49 | return self._slot_types 50 | 51 | def serialize(self, buff): 52 | """ 53 | serialize message into buffer 54 | :param buff: buffer, ``StringIO`` 55 | """ 56 | try: 57 | _x = self 58 | buff.write(_get_struct_2d().pack(_x.inner, _x.outer)) 59 | except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) 60 | except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) 61 | 62 | def deserialize(self, str): 63 | """ 64 | unpack serialized message in str into this message instance 65 | :param str: byte array of serialized message, ``str`` 66 | """ 67 | if python3: 68 | codecs.lookup_error("rosmsg").msg_type = self._type 69 | try: 70 | end = 0 71 | _x = self 72 | start = end 73 | end += 16 74 | (_x.inner, _x.outer,) = _get_struct_2d().unpack(str[start:end]) 75 | return self 76 | except struct.error as e: 77 | raise genpy.DeserializationError(e) # most likely buffer underfill 78 | 79 | 80 | def serialize_numpy(self, buff, numpy): 81 | """ 82 | serialize message with numpy array types into buffer 83 | :param buff: buffer, ``StringIO`` 84 | :param numpy: numpy python module 85 | """ 86 | try: 87 | _x = self 88 | buff.write(_get_struct_2d().pack(_x.inner, _x.outer)) 89 | except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) 90 | except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) 91 | 92 | def deserialize_numpy(self, str, numpy): 93 | """ 94 | unpack serialized message in str into this message instance using numpy for array types 95 | :param str: byte array of serialized message, ``str`` 96 | :param numpy: numpy python module 97 | """ 98 | if python3: 99 | codecs.lookup_error("rosmsg").msg_type = self._type 100 | try: 101 | end = 0 102 | _x = self 103 | start = end 104 | end += 16 105 | (_x.inner, _x.outer,) = _get_struct_2d().unpack(str[start:end]) 106 | return self 107 | except struct.error as e: 108 | raise genpy.DeserializationError(e) # most likely buffer underfill 109 | 110 | _struct_I = genpy.struct_I 111 | def _get_struct_I(): 112 | global _struct_I 113 | return _struct_I 114 | _struct_2d = None 115 | def _get_struct_2d(): 116 | global _struct_2d 117 | if _struct_2d is None: 118 | _struct_2d = struct.Struct("<2d") 119 | return _struct_2d 120 | -------------------------------------------------------------------------------- /franka_gripper/msg/_GraspEpsilon.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_GraspEpsilon.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_GraspFeedback.py: -------------------------------------------------------------------------------- 1 | # This Python file uses the following encoding: utf-8 2 | """autogenerated by genpy from franka_gripper/GraspFeedback.msg. Do not edit.""" 3 | import codecs 4 | import sys 5 | python3 = True if sys.hexversion > 0x03000000 else False 6 | import genpy 7 | import struct 8 | 9 | 10 | class GraspFeedback(genpy.Message): 11 | _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 12 | _type = "franka_gripper/GraspFeedback" 13 | _has_header = False # flag to mark the presence of a Header object 14 | _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 15 | 16 | """ 17 | __slots__ = [] 18 | _slot_types = [] 19 | 20 | def __init__(self, *args, **kwds): 21 | """ 22 | Constructor. Any message fields that are implicitly/explicitly 23 | set to None will be assigned a default value. The recommend 24 | use is keyword arguments as this is more robust to future message 25 | changes. You cannot mix in-order arguments and keyword arguments. 26 | 27 | The available fields are: 28 | 29 | 30 | :param args: complete set of field values, in .msg order 31 | :param kwds: use keyword arguments corresponding to message field names 32 | to set specific fields. 33 | """ 34 | if args or kwds: 35 | super(GraspFeedback, self).__init__(*args, **kwds) 36 | 37 | def _get_types(self): 38 | """ 39 | internal API method 40 | """ 41 | return self._slot_types 42 | 43 | def serialize(self, buff): 44 | """ 45 | serialize message into buffer 46 | :param buff: buffer, ``StringIO`` 47 | """ 48 | try: 49 | pass 50 | except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) 51 | except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) 52 | 53 | def deserialize(self, str): 54 | """ 55 | unpack serialized message in str into this message instance 56 | :param str: byte array of serialized message, ``str`` 57 | """ 58 | if python3: 59 | codecs.lookup_error("rosmsg").msg_type = self._type 60 | try: 61 | end = 0 62 | return self 63 | except struct.error as e: 64 | raise genpy.DeserializationError(e) # most likely buffer underfill 65 | 66 | 67 | def serialize_numpy(self, buff, numpy): 68 | """ 69 | serialize message with numpy array types into buffer 70 | :param buff: buffer, ``StringIO`` 71 | :param numpy: numpy python module 72 | """ 73 | try: 74 | pass 75 | except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) 76 | except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) 77 | 78 | def deserialize_numpy(self, str, numpy): 79 | """ 80 | unpack serialized message in str into this message instance using numpy for array types 81 | :param str: byte array of serialized message, ``str`` 82 | :param numpy: numpy python module 83 | """ 84 | if python3: 85 | codecs.lookup_error("rosmsg").msg_type = self._type 86 | try: 87 | end = 0 88 | return self 89 | except struct.error as e: 90 | raise genpy.DeserializationError(e) # most likely buffer underfill 91 | 92 | _struct_I = genpy.struct_I 93 | def _get_struct_I(): 94 | global _struct_I 95 | return _struct_I 96 | -------------------------------------------------------------------------------- /franka_gripper/msg/_GraspFeedback.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_GraspFeedback.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_GraspGoal.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_GraspGoal.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_GraspResult.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_GraspResult.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_HomingAction.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_HomingAction.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_HomingActionFeedback.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_HomingActionFeedback.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_HomingActionGoal.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_HomingActionGoal.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_HomingActionResult.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_HomingActionResult.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_HomingFeedback.py: -------------------------------------------------------------------------------- 1 | # This Python file uses the following encoding: utf-8 2 | """autogenerated by genpy from franka_gripper/HomingFeedback.msg. Do not edit.""" 3 | import codecs 4 | import sys 5 | python3 = True if sys.hexversion > 0x03000000 else False 6 | import genpy 7 | import struct 8 | 9 | 10 | class HomingFeedback(genpy.Message): 11 | _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 12 | _type = "franka_gripper/HomingFeedback" 13 | _has_header = False # flag to mark the presence of a Header object 14 | _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 15 | 16 | """ 17 | __slots__ = [] 18 | _slot_types = [] 19 | 20 | def __init__(self, *args, **kwds): 21 | """ 22 | Constructor. Any message fields that are implicitly/explicitly 23 | set to None will be assigned a default value. The recommend 24 | use is keyword arguments as this is more robust to future message 25 | changes. You cannot mix in-order arguments and keyword arguments. 26 | 27 | The available fields are: 28 | 29 | 30 | :param args: complete set of field values, in .msg order 31 | :param kwds: use keyword arguments corresponding to message field names 32 | to set specific fields. 33 | """ 34 | if args or kwds: 35 | super(HomingFeedback, self).__init__(*args, **kwds) 36 | 37 | def _get_types(self): 38 | """ 39 | internal API method 40 | """ 41 | return self._slot_types 42 | 43 | def serialize(self, buff): 44 | """ 45 | serialize message into buffer 46 | :param buff: buffer, ``StringIO`` 47 | """ 48 | try: 49 | pass 50 | except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) 51 | except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) 52 | 53 | def deserialize(self, str): 54 | """ 55 | unpack serialized message in str into this message instance 56 | :param str: byte array of serialized message, ``str`` 57 | """ 58 | if python3: 59 | codecs.lookup_error("rosmsg").msg_type = self._type 60 | try: 61 | end = 0 62 | return self 63 | except struct.error as e: 64 | raise genpy.DeserializationError(e) # most likely buffer underfill 65 | 66 | 67 | def serialize_numpy(self, buff, numpy): 68 | """ 69 | serialize message with numpy array types into buffer 70 | :param buff: buffer, ``StringIO`` 71 | :param numpy: numpy python module 72 | """ 73 | try: 74 | pass 75 | except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) 76 | except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) 77 | 78 | def deserialize_numpy(self, str, numpy): 79 | """ 80 | unpack serialized message in str into this message instance using numpy for array types 81 | :param str: byte array of serialized message, ``str`` 82 | :param numpy: numpy python module 83 | """ 84 | if python3: 85 | codecs.lookup_error("rosmsg").msg_type = self._type 86 | try: 87 | end = 0 88 | return self 89 | except struct.error as e: 90 | raise genpy.DeserializationError(e) # most likely buffer underfill 91 | 92 | _struct_I = genpy.struct_I 93 | def _get_struct_I(): 94 | global _struct_I 95 | return _struct_I 96 | -------------------------------------------------------------------------------- /franka_gripper/msg/_HomingFeedback.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_HomingFeedback.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_HomingGoal.py: -------------------------------------------------------------------------------- 1 | # This Python file uses the following encoding: utf-8 2 | """autogenerated by genpy from franka_gripper/HomingGoal.msg. Do not edit.""" 3 | import codecs 4 | import sys 5 | python3 = True if sys.hexversion > 0x03000000 else False 6 | import genpy 7 | import struct 8 | 9 | 10 | class HomingGoal(genpy.Message): 11 | _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 12 | _type = "franka_gripper/HomingGoal" 13 | _has_header = False # flag to mark the presence of a Header object 14 | _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 15 | """ 16 | __slots__ = [] 17 | _slot_types = [] 18 | 19 | def __init__(self, *args, **kwds): 20 | """ 21 | Constructor. Any message fields that are implicitly/explicitly 22 | set to None will be assigned a default value. The recommend 23 | use is keyword arguments as this is more robust to future message 24 | changes. You cannot mix in-order arguments and keyword arguments. 25 | 26 | The available fields are: 27 | 28 | 29 | :param args: complete set of field values, in .msg order 30 | :param kwds: use keyword arguments corresponding to message field names 31 | to set specific fields. 32 | """ 33 | if args or kwds: 34 | super(HomingGoal, self).__init__(*args, **kwds) 35 | 36 | def _get_types(self): 37 | """ 38 | internal API method 39 | """ 40 | return self._slot_types 41 | 42 | def serialize(self, buff): 43 | """ 44 | serialize message into buffer 45 | :param buff: buffer, ``StringIO`` 46 | """ 47 | try: 48 | pass 49 | except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) 50 | except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) 51 | 52 | def deserialize(self, str): 53 | """ 54 | unpack serialized message in str into this message instance 55 | :param str: byte array of serialized message, ``str`` 56 | """ 57 | if python3: 58 | codecs.lookup_error("rosmsg").msg_type = self._type 59 | try: 60 | end = 0 61 | return self 62 | except struct.error as e: 63 | raise genpy.DeserializationError(e) # most likely buffer underfill 64 | 65 | 66 | def serialize_numpy(self, buff, numpy): 67 | """ 68 | serialize message with numpy array types into buffer 69 | :param buff: buffer, ``StringIO`` 70 | :param numpy: numpy python module 71 | """ 72 | try: 73 | pass 74 | except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) 75 | except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) 76 | 77 | def deserialize_numpy(self, str, numpy): 78 | """ 79 | unpack serialized message in str into this message instance using numpy for array types 80 | :param str: byte array of serialized message, ``str`` 81 | :param numpy: numpy python module 82 | """ 83 | if python3: 84 | codecs.lookup_error("rosmsg").msg_type = self._type 85 | try: 86 | end = 0 87 | return self 88 | except struct.error as e: 89 | raise genpy.DeserializationError(e) # most likely buffer underfill 90 | 91 | _struct_I = genpy.struct_I 92 | def _get_struct_I(): 93 | global _struct_I 94 | return _struct_I 95 | -------------------------------------------------------------------------------- /franka_gripper/msg/_HomingGoal.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_HomingGoal.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_HomingResult.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_HomingResult.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_MoveAction.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_MoveAction.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_MoveActionFeedback.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_MoveActionFeedback.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_MoveActionGoal.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_MoveActionGoal.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_MoveActionResult.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_MoveActionResult.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_MoveFeedback.py: -------------------------------------------------------------------------------- 1 | # This Python file uses the following encoding: utf-8 2 | """autogenerated by genpy from franka_gripper/MoveFeedback.msg. Do not edit.""" 3 | import codecs 4 | import sys 5 | python3 = True if sys.hexversion > 0x03000000 else False 6 | import genpy 7 | import struct 8 | 9 | 10 | class MoveFeedback(genpy.Message): 11 | _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 12 | _type = "franka_gripper/MoveFeedback" 13 | _has_header = False # flag to mark the presence of a Header object 14 | _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 15 | 16 | """ 17 | __slots__ = [] 18 | _slot_types = [] 19 | 20 | def __init__(self, *args, **kwds): 21 | """ 22 | Constructor. Any message fields that are implicitly/explicitly 23 | set to None will be assigned a default value. The recommend 24 | use is keyword arguments as this is more robust to future message 25 | changes. You cannot mix in-order arguments and keyword arguments. 26 | 27 | The available fields are: 28 | 29 | 30 | :param args: complete set of field values, in .msg order 31 | :param kwds: use keyword arguments corresponding to message field names 32 | to set specific fields. 33 | """ 34 | if args or kwds: 35 | super(MoveFeedback, self).__init__(*args, **kwds) 36 | 37 | def _get_types(self): 38 | """ 39 | internal API method 40 | """ 41 | return self._slot_types 42 | 43 | def serialize(self, buff): 44 | """ 45 | serialize message into buffer 46 | :param buff: buffer, ``StringIO`` 47 | """ 48 | try: 49 | pass 50 | except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) 51 | except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) 52 | 53 | def deserialize(self, str): 54 | """ 55 | unpack serialized message in str into this message instance 56 | :param str: byte array of serialized message, ``str`` 57 | """ 58 | if python3: 59 | codecs.lookup_error("rosmsg").msg_type = self._type 60 | try: 61 | end = 0 62 | return self 63 | except struct.error as e: 64 | raise genpy.DeserializationError(e) # most likely buffer underfill 65 | 66 | 67 | def serialize_numpy(self, buff, numpy): 68 | """ 69 | serialize message with numpy array types into buffer 70 | :param buff: buffer, ``StringIO`` 71 | :param numpy: numpy python module 72 | """ 73 | try: 74 | pass 75 | except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) 76 | except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) 77 | 78 | def deserialize_numpy(self, str, numpy): 79 | """ 80 | unpack serialized message in str into this message instance using numpy for array types 81 | :param str: byte array of serialized message, ``str`` 82 | :param numpy: numpy python module 83 | """ 84 | if python3: 85 | codecs.lookup_error("rosmsg").msg_type = self._type 86 | try: 87 | end = 0 88 | return self 89 | except struct.error as e: 90 | raise genpy.DeserializationError(e) # most likely buffer underfill 91 | 92 | _struct_I = genpy.struct_I 93 | def _get_struct_I(): 94 | global _struct_I 95 | return _struct_I 96 | -------------------------------------------------------------------------------- /franka_gripper/msg/_MoveFeedback.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_MoveFeedback.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_MoveGoal.py: -------------------------------------------------------------------------------- 1 | # This Python file uses the following encoding: utf-8 2 | """autogenerated by genpy from franka_gripper/MoveGoal.msg. Do not edit.""" 3 | import codecs 4 | import sys 5 | python3 = True if sys.hexversion > 0x03000000 else False 6 | import genpy 7 | import struct 8 | 9 | 10 | class MoveGoal(genpy.Message): 11 | _md5sum = "d16050a0fe85f1c2cb8347c99678362e" 12 | _type = "franka_gripper/MoveGoal" 13 | _has_header = False # flag to mark the presence of a Header object 14 | _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 15 | float64 width # [m] 16 | float64 speed # [m/s] 17 | """ 18 | __slots__ = ['width','speed'] 19 | _slot_types = ['float64','float64'] 20 | 21 | def __init__(self, *args, **kwds): 22 | """ 23 | Constructor. Any message fields that are implicitly/explicitly 24 | set to None will be assigned a default value. The recommend 25 | use is keyword arguments as this is more robust to future message 26 | changes. You cannot mix in-order arguments and keyword arguments. 27 | 28 | The available fields are: 29 | width,speed 30 | 31 | :param args: complete set of field values, in .msg order 32 | :param kwds: use keyword arguments corresponding to message field names 33 | to set specific fields. 34 | """ 35 | if args or kwds: 36 | super(MoveGoal, self).__init__(*args, **kwds) 37 | # message fields cannot be None, assign default values for those that are 38 | if self.width is None: 39 | self.width = 0. 40 | if self.speed is None: 41 | self.speed = 0. 42 | else: 43 | self.width = 0. 44 | self.speed = 0. 45 | 46 | def _get_types(self): 47 | """ 48 | internal API method 49 | """ 50 | return self._slot_types 51 | 52 | def serialize(self, buff): 53 | """ 54 | serialize message into buffer 55 | :param buff: buffer, ``StringIO`` 56 | """ 57 | try: 58 | _x = self 59 | buff.write(_get_struct_2d().pack(_x.width, _x.speed)) 60 | except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) 61 | except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) 62 | 63 | def deserialize(self, str): 64 | """ 65 | unpack serialized message in str into this message instance 66 | :param str: byte array of serialized message, ``str`` 67 | """ 68 | if python3: 69 | codecs.lookup_error("rosmsg").msg_type = self._type 70 | try: 71 | end = 0 72 | _x = self 73 | start = end 74 | end += 16 75 | (_x.width, _x.speed,) = _get_struct_2d().unpack(str[start:end]) 76 | return self 77 | except struct.error as e: 78 | raise genpy.DeserializationError(e) # most likely buffer underfill 79 | 80 | 81 | def serialize_numpy(self, buff, numpy): 82 | """ 83 | serialize message with numpy array types into buffer 84 | :param buff: buffer, ``StringIO`` 85 | :param numpy: numpy python module 86 | """ 87 | try: 88 | _x = self 89 | buff.write(_get_struct_2d().pack(_x.width, _x.speed)) 90 | except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) 91 | except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) 92 | 93 | def deserialize_numpy(self, str, numpy): 94 | """ 95 | unpack serialized message in str into this message instance using numpy for array types 96 | :param str: byte array of serialized message, ``str`` 97 | :param numpy: numpy python module 98 | """ 99 | if python3: 100 | codecs.lookup_error("rosmsg").msg_type = self._type 101 | try: 102 | end = 0 103 | _x = self 104 | start = end 105 | end += 16 106 | (_x.width, _x.speed,) = _get_struct_2d().unpack(str[start:end]) 107 | return self 108 | except struct.error as e: 109 | raise genpy.DeserializationError(e) # most likely buffer underfill 110 | 111 | _struct_I = genpy.struct_I 112 | def _get_struct_I(): 113 | global _struct_I 114 | return _struct_I 115 | _struct_2d = None 116 | def _get_struct_2d(): 117 | global _struct_2d 118 | if _struct_2d is None: 119 | _struct_2d = struct.Struct("<2d") 120 | return _struct_2d 121 | -------------------------------------------------------------------------------- /franka_gripper/msg/_MoveGoal.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_MoveGoal.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_MoveResult.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_MoveResult.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_StopAction.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_StopAction.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_StopActionFeedback.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_StopActionFeedback.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_StopActionGoal.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_StopActionGoal.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_StopActionResult.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_StopActionResult.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_StopFeedback.py: -------------------------------------------------------------------------------- 1 | # This Python file uses the following encoding: utf-8 2 | """autogenerated by genpy from franka_gripper/StopFeedback.msg. Do not edit.""" 3 | import codecs 4 | import sys 5 | python3 = True if sys.hexversion > 0x03000000 else False 6 | import genpy 7 | import struct 8 | 9 | 10 | class StopFeedback(genpy.Message): 11 | _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 12 | _type = "franka_gripper/StopFeedback" 13 | _has_header = False # flag to mark the presence of a Header object 14 | _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 15 | 16 | """ 17 | __slots__ = [] 18 | _slot_types = [] 19 | 20 | def __init__(self, *args, **kwds): 21 | """ 22 | Constructor. Any message fields that are implicitly/explicitly 23 | set to None will be assigned a default value. The recommend 24 | use is keyword arguments as this is more robust to future message 25 | changes. You cannot mix in-order arguments and keyword arguments. 26 | 27 | The available fields are: 28 | 29 | 30 | :param args: complete set of field values, in .msg order 31 | :param kwds: use keyword arguments corresponding to message field names 32 | to set specific fields. 33 | """ 34 | if args or kwds: 35 | super(StopFeedback, self).__init__(*args, **kwds) 36 | 37 | def _get_types(self): 38 | """ 39 | internal API method 40 | """ 41 | return self._slot_types 42 | 43 | def serialize(self, buff): 44 | """ 45 | serialize message into buffer 46 | :param buff: buffer, ``StringIO`` 47 | """ 48 | try: 49 | pass 50 | except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) 51 | except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) 52 | 53 | def deserialize(self, str): 54 | """ 55 | unpack serialized message in str into this message instance 56 | :param str: byte array of serialized message, ``str`` 57 | """ 58 | if python3: 59 | codecs.lookup_error("rosmsg").msg_type = self._type 60 | try: 61 | end = 0 62 | return self 63 | except struct.error as e: 64 | raise genpy.DeserializationError(e) # most likely buffer underfill 65 | 66 | 67 | def serialize_numpy(self, buff, numpy): 68 | """ 69 | serialize message with numpy array types into buffer 70 | :param buff: buffer, ``StringIO`` 71 | :param numpy: numpy python module 72 | """ 73 | try: 74 | pass 75 | except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) 76 | except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) 77 | 78 | def deserialize_numpy(self, str, numpy): 79 | """ 80 | unpack serialized message in str into this message instance using numpy for array types 81 | :param str: byte array of serialized message, ``str`` 82 | :param numpy: numpy python module 83 | """ 84 | if python3: 85 | codecs.lookup_error("rosmsg").msg_type = self._type 86 | try: 87 | end = 0 88 | return self 89 | except struct.error as e: 90 | raise genpy.DeserializationError(e) # most likely buffer underfill 91 | 92 | _struct_I = genpy.struct_I 93 | def _get_struct_I(): 94 | global _struct_I 95 | return _struct_I 96 | -------------------------------------------------------------------------------- /franka_gripper/msg/_StopFeedback.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_StopFeedback.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_StopGoal.py: -------------------------------------------------------------------------------- 1 | # This Python file uses the following encoding: utf-8 2 | """autogenerated by genpy from franka_gripper/StopGoal.msg. Do not edit.""" 3 | import codecs 4 | import sys 5 | python3 = True if sys.hexversion > 0x03000000 else False 6 | import genpy 7 | import struct 8 | 9 | 10 | class StopGoal(genpy.Message): 11 | _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 12 | _type = "franka_gripper/StopGoal" 13 | _has_header = False # flag to mark the presence of a Header object 14 | _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 15 | """ 16 | __slots__ = [] 17 | _slot_types = [] 18 | 19 | def __init__(self, *args, **kwds): 20 | """ 21 | Constructor. Any message fields that are implicitly/explicitly 22 | set to None will be assigned a default value. The recommend 23 | use is keyword arguments as this is more robust to future message 24 | changes. You cannot mix in-order arguments and keyword arguments. 25 | 26 | The available fields are: 27 | 28 | 29 | :param args: complete set of field values, in .msg order 30 | :param kwds: use keyword arguments corresponding to message field names 31 | to set specific fields. 32 | """ 33 | if args or kwds: 34 | super(StopGoal, self).__init__(*args, **kwds) 35 | 36 | def _get_types(self): 37 | """ 38 | internal API method 39 | """ 40 | return self._slot_types 41 | 42 | def serialize(self, buff): 43 | """ 44 | serialize message into buffer 45 | :param buff: buffer, ``StringIO`` 46 | """ 47 | try: 48 | pass 49 | except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) 50 | except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) 51 | 52 | def deserialize(self, str): 53 | """ 54 | unpack serialized message in str into this message instance 55 | :param str: byte array of serialized message, ``str`` 56 | """ 57 | if python3: 58 | codecs.lookup_error("rosmsg").msg_type = self._type 59 | try: 60 | end = 0 61 | return self 62 | except struct.error as e: 63 | raise genpy.DeserializationError(e) # most likely buffer underfill 64 | 65 | 66 | def serialize_numpy(self, buff, numpy): 67 | """ 68 | serialize message with numpy array types into buffer 69 | :param buff: buffer, ``StringIO`` 70 | :param numpy: numpy python module 71 | """ 72 | try: 73 | pass 74 | except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) 75 | except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) 76 | 77 | def deserialize_numpy(self, str, numpy): 78 | """ 79 | unpack serialized message in str into this message instance using numpy for array types 80 | :param str: byte array of serialized message, ``str`` 81 | :param numpy: numpy python module 82 | """ 83 | if python3: 84 | codecs.lookup_error("rosmsg").msg_type = self._type 85 | try: 86 | end = 0 87 | return self 88 | except struct.error as e: 89 | raise genpy.DeserializationError(e) # most likely buffer underfill 90 | 91 | _struct_I = genpy.struct_I 92 | def _get_struct_I(): 93 | global _struct_I 94 | return _struct_I 95 | -------------------------------------------------------------------------------- /franka_gripper/msg/_StopGoal.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_StopGoal.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/_StopResult.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/_StopResult.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__init__.py: -------------------------------------------------------------------------------- 1 | from ._GraspAction import * 2 | from ._GraspActionFeedback import * 3 | from ._GraspActionGoal import * 4 | from ._GraspActionResult import * 5 | from ._GraspEpsilon import * 6 | from ._GraspFeedback import * 7 | from ._GraspGoal import * 8 | from ._GraspResult import * 9 | from ._HomingAction import * 10 | from ._HomingActionFeedback import * 11 | from ._HomingActionGoal import * 12 | from ._HomingActionResult import * 13 | from ._HomingFeedback import * 14 | from ._HomingGoal import * 15 | from ._HomingResult import * 16 | from ._MoveAction import * 17 | from ._MoveActionFeedback import * 18 | from ._MoveActionGoal import * 19 | from ._MoveActionResult import * 20 | from ._MoveFeedback import * 21 | from ._MoveGoal import * 22 | from ._MoveResult import * 23 | from ._StopAction import * 24 | from ._StopActionFeedback import * 25 | from ._StopActionGoal import * 26 | from ._StopActionResult import * 27 | from ._StopFeedback import * 28 | from ._StopGoal import * 29 | from ._StopResult import * 30 | -------------------------------------------------------------------------------- /franka_gripper/msg/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__init__.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_GraspAction.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_GraspAction.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_GraspAction.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_GraspAction.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_GraspActionFeedback.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_GraspActionFeedback.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_GraspActionFeedback.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_GraspActionFeedback.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_GraspActionGoal.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_GraspActionGoal.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_GraspActionGoal.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_GraspActionGoal.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_GraspActionResult.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_GraspActionResult.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_GraspActionResult.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_GraspActionResult.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_GraspEpsilon.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_GraspEpsilon.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_GraspEpsilon.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_GraspEpsilon.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_GraspFeedback.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_GraspFeedback.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_GraspFeedback.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_GraspFeedback.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_GraspGoal.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_GraspGoal.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_GraspGoal.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_GraspGoal.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_GraspResult.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_GraspResult.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_GraspResult.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_GraspResult.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_HomingAction.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_HomingAction.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_HomingAction.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_HomingAction.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_HomingActionFeedback.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_HomingActionFeedback.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_HomingActionFeedback.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_HomingActionFeedback.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_HomingActionGoal.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_HomingActionGoal.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_HomingActionGoal.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_HomingActionGoal.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_HomingActionResult.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_HomingActionResult.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_HomingActionResult.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_HomingActionResult.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_HomingFeedback.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_HomingFeedback.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_HomingFeedback.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_HomingFeedback.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_HomingGoal.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_HomingGoal.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_HomingGoal.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_HomingGoal.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_HomingResult.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_HomingResult.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_HomingResult.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_HomingResult.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_MoveAction.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_MoveAction.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_MoveAction.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_MoveAction.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_MoveActionFeedback.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_MoveActionFeedback.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_MoveActionFeedback.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_MoveActionFeedback.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_MoveActionGoal.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_MoveActionGoal.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_MoveActionGoal.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_MoveActionGoal.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_MoveActionResult.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_MoveActionResult.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_MoveActionResult.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_MoveActionResult.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_MoveFeedback.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_MoveFeedback.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_MoveFeedback.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_MoveFeedback.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_MoveGoal.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_MoveGoal.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_MoveGoal.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_MoveGoal.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_MoveResult.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_MoveResult.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_MoveResult.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_MoveResult.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_StopAction.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_StopAction.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_StopAction.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_StopAction.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_StopActionFeedback.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_StopActionFeedback.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_StopActionFeedback.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_StopActionFeedback.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_StopActionGoal.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_StopActionGoal.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_StopActionGoal.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_StopActionGoal.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_StopActionResult.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_StopActionResult.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_StopActionResult.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_StopActionResult.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_StopFeedback.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_StopFeedback.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_StopFeedback.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_StopFeedback.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_StopGoal.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_StopGoal.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_StopGoal.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_StopGoal.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_StopResult.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_StopResult.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/_StopResult.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/_StopResult.cpython-38.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /franka_gripper/msg/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/franka_gripper/msg/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /main_single_arm.py: -------------------------------------------------------------------------------- 1 | """ 2 | Authors: Giovanni Franzese 3 | Email: g.franzese@tudelft.nl 4 | Cognitive Robotics, TU Delft 5 | This code is part of TERI (TEaching Robots Interactively) project 6 | """ 7 | #%% 8 | from SIMPLe import SIMPLe 9 | import time 10 | import rospy 11 | #%% 12 | if __name__ == '__main__': 13 | rospy.init_node('SIMPLe', anonymous=True) 14 | SIMPLe=SIMPLe() 15 | SIMPLe.connect_ROS() 16 | time.sleep(1) 17 | # SIMPLe.home_gripper() 18 | #%% 19 | time.sleep(1) 20 | print("Record of the cartesian trajectory") 21 | SIMPLe.Record_Demonstration() 22 | #%% 23 | SIMPLe.go_to_start() 24 | #%% 25 | time.sleep(1) 26 | print("Save the data") 27 | SIMPLe.save() 28 | #%% 29 | time.sleep(1) 30 | print("Load the data") 31 | SIMPLe.load() 32 | #%% 33 | time.sleep(1) 34 | print("Interactive Control Starting") 35 | SIMPLe.control() 36 | 37 | # %% 38 | -------------------------------------------------------------------------------- /package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | SIMPLe 4 | 0.1.0 5 | Safe Interactive Movement Primitives Learning 6 | 7 | Giovanni Franzese 8 | 9 | MIT License 10 | 11 | catkin 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /scripts/data/dual_collaboration.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/scripts/data/dual_collaboration.npz -------------------------------------------------------------------------------- /scripts/data/dual_conducting.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/scripts/data/dual_conducting.npz -------------------------------------------------------------------------------- /scripts/data/dual_last.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/scripts/data/dual_last.npz -------------------------------------------------------------------------------- /scripts/data/panda_right_last.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franzesegiovanni/SIMPLe/ccc74a9360032fe021d8accc8c1e2bd928c1abb5/scripts/data/panda_right_last.npz -------------------------------------------------------------------------------- /scripts/main_collaboration.py: -------------------------------------------------------------------------------- 1 | """ 2 | Authors: Giovanni Franzese 3 | Email: g.franzese@tudelft.nl 4 | Cognitive Robotics, TU Delft 5 | This code is part of TERI (TEaching Robots Interactively) project 6 | """ 7 | #%% 8 | from SIMPLe_bimanual.dual_panda import DualPanda 9 | import time 10 | #%% 11 | if __name__ == '__main__': 12 | BiManualTeaching=DualPanda() 13 | time.sleep(1) 14 | # BiManualTeaching.Panda_left.home_gripper() 15 | # BiManualTeaching.Panda_right.home_gripper() 16 | #%% 17 | BiManualTeaching.Kinesthetic_Demonstration_BiManual() 18 | #%% 19 | BiManualTeaching.save(data='collaboration2') 20 | #%% 21 | BiManualTeaching.load(data='collaboration2') 22 | # %% 23 | BiManualTeaching.go_to_start() 24 | #%% 25 | BiManualTeaching.execute_dual() 26 | # %% 27 | BiManualTeaching.Panda_left.set_stiffness(0.0, 0.0, 0.0, 30.0, 30.0, 30.0) 28 | BiManualTeaching.Panda_right.set_stiffness(0.0, 0.0, 0.0, 30.0, 30.0, 30.0) 29 | BiManualTeaching.Panda_left.set_K.update_configuration({"coupling_translational_stiffness": 400}) 30 | # %% Close 31 | BiManualTeaching.Panda_left.move_gripper(0.0) 32 | BiManualTeaching.Panda_right.move_gripper(0.0) 33 | #%% 34 | # %% Open 35 | BiManualTeaching.Panda_left.move_gripper(1.0) 36 | BiManualTeaching.Panda_right.move_gripper(1.0) 37 | 38 | # %% 39 | BiManualTeaching.Panda_left.home_gripper() 40 | BiManualTeaching.Panda_right.home_gripper() 41 | # %% 42 | -------------------------------------------------------------------------------- /scripts/main_conductor.py: -------------------------------------------------------------------------------- 1 | """ 2 | Authors: Giovanni Franzese 3 | Email: g.franzese@tudelft.nl 4 | Cognitive Robotics, TU Delft 5 | This code is part of TERI (TEaching Robots Interactively) project 6 | """ 7 | #%% 8 | from SIMPLe_bimanual.dual_panda import DualPanda 9 | import time 10 | #%% 11 | if __name__ == '__main__': 12 | BiManualTeaching=DualPanda() 13 | time.sleep(1) 14 | # BiManualTeaching.Panda_left.home_gripper() 15 | # BiManualTeaching.Panda_right.home_gripper() 16 | #%% 17 | BiManualTeaching.Kinesthetic_Demonstration_BiManual() 18 | #%% 19 | BiManualTeaching.save(data='conducting') 20 | #%% 21 | BiManualTeaching.load(data='conducting') 22 | # %% 23 | BiManualTeaching.go_to_start() 24 | # %% Close 25 | BiManualTeaching.Panda_left.move_gripper(0.0) 26 | BiManualTeaching.Panda_right.move_gripper(0.0) 27 | 28 | # %% Open 29 | BiManualTeaching.Panda_left.move_gripper(1.0) 30 | BiManualTeaching.Panda_right.move_gripper(1.0) 31 | #%% 32 | BiManualTeaching.Panda_left.set_K.update_configuration({"coupling_translational_stiffness": 0}) 33 | 34 | BiManualTeaching.Kinesthetic_Demonstration_BiManual() 35 | # %% 36 | BiManualTeaching.go_to_start() 37 | #%% 38 | BiManualTeaching.execute_dual() 39 | # %% 40 | BiManualTeaching.save(data='conductor_linda') 41 | #%% 42 | BiManualTeaching.load(data='conductor_linda') 43 | # %% 44 | BiManualTeaching.Panda_left.home_gripper() 45 | BiManualTeaching.Panda_right.home_gripper() 46 | # %% 47 | -------------------------------------------------------------------------------- /scripts/main_coordination_keyboard.py: -------------------------------------------------------------------------------- 1 | """ 2 | Authors: Giovanni Franzese 3 | Email: g.franzese@tudelft.nl 4 | Cognitive Robotics, TU Delft 5 | This code is part of TERI (TEaching Robots Interactively) project 6 | """ 7 | #%% 8 | from SIMPLe_bimanual.dual_panda import DualPanda 9 | from pynput.keyboard import Listener, Key 10 | import time 11 | import rospy 12 | import numpy as np 13 | 14 | class Coordination(DualPanda): 15 | def __init__(self): 16 | super().__init__() 17 | 18 | self.listener_arrow = Listener(on_press=self._on_press_arrow, interval=1/self.control_freq) 19 | 20 | self.listener_arrow.start() 21 | 22 | self.look_ahead=30 # this how many steps in the future the robot is going to move after one input on the keyboard 23 | def _on_press_arrow(self, key): 24 | # This function runs on the background and checks if a keyboard key was pressed 25 | if key == Key.right: 26 | self.right = True 27 | self.index_right=int(self.index_right+self.look_ahead) 28 | if key == Key.left: 29 | self.right = True 30 | self.index_left=int(self.index_left+self.look_ahead) 31 | 32 | 33 | def syncronize(self): 34 | 35 | self.index_right=int(0) 36 | self.index_left=int(0) 37 | 38 | ind_left=0 39 | ind_right=0 40 | self.end=False 41 | r = rospy.Rate(self.control_freq) 42 | 43 | print("Press Esc to stop controlling the robot") 44 | 45 | 46 | attractor_pos_right = [self.Panda_right.recorded_traj[0][self.index_right], self.Panda_right.recorded_traj[1][self.index_right], self.Panda_right.recorded_traj[2][self.index_right]] 47 | attractor_pos_left = [self.Panda_left.recorded_traj[0][self.index_left], self.Panda_left.recorded_traj[1][self.index_left], self.Panda_left.recorded_traj[2][self.index_left]] 48 | 49 | if np.linalg.norm(np.array(attractor_pos_right)-self.Panda_right.cart_pos) > 0.05 or np.linalg.norm(np.array(attractor_pos_left)-self.Panda_left.cart_pos) > 0.05: 50 | print("Robots are too far away from the starting position, send them to start first") 51 | self.end=True 52 | return 53 | 54 | while not self.end: 55 | ind_right=np.min([ind_right+np.clip(self.index_right-ind_right,0,1), self.Panda_right.recorded_traj.shape[1]-1]) 56 | ind_left=np.min([ind_left+np.clip(self.index_left-ind_left,0,1), self.Panda_left.recorded_traj.shape[1]-1]) 57 | attractor_pos_right = [self.Panda_right.recorded_traj[0][ind_right], self.Panda_right.recorded_traj[1][ind_right], self.Panda_right.recorded_traj[2][ind_right]] 58 | attractor_ori_right = [ self.Panda_right.recorded_ori[0][ind_right], self.Panda_right.recorded_ori[1][ind_right], self.Panda_right.recorded_ori[2][ind_right], self.Panda_right.recorded_ori[3][ind_right]] 59 | 60 | attractor_pos_left = [self.Panda_left.recorded_traj[0][ind_left], self.Panda_left.recorded_traj[1][ind_left], self.Panda_left.recorded_traj[2][ind_left]] 61 | attractor_ori_left = [ self.Panda_left.recorded_ori[0][ind_left], self.Panda_left.recorded_ori[1][ind_left], self.Panda_left.recorded_ori[2][ind_left], self.Panda_left.recorded_ori[3][ind_left]] 62 | 63 | self.Panda_right.set_attractor(attractor_pos_right, attractor_ori_right) 64 | self.Panda_right.move_gripper(self.Panda_right.recorded_gripper[0, ind_right]) 65 | 66 | self.Panda_left.set_attractor(attractor_pos_left, attractor_ori_left) 67 | self.Panda_left.move_gripper(self.Panda_left.recorded_gripper[0, ind_left]) 68 | 69 | 70 | r.sleep() 71 | 72 | 73 | 74 | #%% 75 | if __name__ == '__main__': 76 | BiManualTeaching=Coordination() 77 | time.sleep(1) 78 | #%% 79 | BiManualTeaching.Panda_right.load() 80 | BiManualTeaching.Panda_left.load() 81 | #%% 82 | BiManualTeaching.Panda_right.go_to_start() 83 | BiManualTeaching.Panda_left.go_to_start() 84 | #%% 85 | BiManualTeaching.Panda_left.home() 86 | BiManualTeaching.Panda_right.home() 87 | #%% 88 | BiManualTeaching.Panda_left.home_gripper() 89 | BiManualTeaching.Panda_right.home_gripper() 90 | #%% 91 | BiManualTeaching.Panda_left.Kinesthetic_Demonstration() 92 | 93 | # %% 94 | BiManualTeaching.Panda_left.home() 95 | #%% 96 | BiManualTeaching.Panda_right.Kinesthetic_Demonstration() 97 | #%% 98 | BiManualTeaching.Panda_right.home() 99 | # %% 100 | BiManualTeaching.Panda_left.save() 101 | BiManualTeaching.Panda_right.save() 102 | 103 | #%% 104 | BiManualTeaching.syncronize() 105 | # %% 106 | -------------------------------------------------------------------------------- /scripts/main_crates_correction.py: -------------------------------------------------------------------------------- 1 | """ 2 | Authors: Giovanni Franzese 3 | Email: g.franzese@tudelft.nl 4 | Cognitive Robotics, TU Delft 5 | This code is part of TERI (TEaching Robots Interactively) project 6 | """ 7 | #%% 8 | import matplotlib 9 | from SIMPLe_bimanual.dual_panda import DualPanda 10 | import time 11 | 12 | from mpl_toolkits import mplot3d 13 | import matplotlib.pyplot as plt 14 | #%% 15 | if __name__ == '__main__': 16 | BiManualTeaching=DualPanda() 17 | #time.sleep(1) 18 | # BiManualTeaching.Panda_left.home_gripper() 19 | # BiManualTeaching.Panda_right.home_gripper() 20 | time.sleep(1) 21 | #%% 22 | BiManualTeaching.Panda_right.load() 23 | BiManualTeaching.Panda_left.load() 24 | # %% 25 | BiManualTeaching.Panda_left.home() 26 | BiManualTeaching.Panda_right.home() 27 | #%% 28 | BiManualTeaching.Kinesthetic_Demonstration_BiManual() 29 | # %% 30 | BiManualTeaching.Panda_left.home() 31 | BiManualTeaching.Panda_right.home() 32 | # EXECUTE DEMONSTRATION AT THE SAME TIME BUT GIVE CORRECTIONS 33 | #%% 34 | BiManualTeaching.execute_dual() 35 | # %% 36 | BiManualTeaching.Panda_left.home() 37 | BiManualTeaching.Panda_right.home() 38 | # %% HERE WE MOVE THE BOX 39 | BiManualTeaching.correction_execute_dual() 40 | # %% 41 | BiManualTeaching.Panda_left.home() 42 | BiManualTeaching.Panda_right.home() 43 | #%% 44 | BiManualTeaching.execute_dual() 45 | 46 | # %% 47 | -------------------------------------------------------------------------------- /scripts/main_crates_correction_statistics.py: -------------------------------------------------------------------------------- 1 | """ 2 | Authors: Giovanni Franzese 3 | Email: g.franzese@tudelft.nl 4 | Cognitive Robotics, TU Delft 5 | This code is part of TERI (TEaching Robots Interactively) project 6 | """ 7 | #%% 8 | import matplotlib 9 | from dual_panda import DualPanda 10 | import time 11 | 12 | from mpl_toolkits import mplot3d 13 | import matplotlib.pyplot as plt 14 | #%% 15 | if __name__ == '__main__': 16 | BiManualTeaching=DualPanda() 17 | #time.sleep(1) 18 | # BiManualTeaching.Panda_left.home_gripper() 19 | # BiManualTeaching.Panda_right.home_gripper() 20 | time.sleep(1) 21 | #%% 22 | BiManualTeaching.load() 23 | # %% 24 | BiManualTeaching.Panda_left.home() 25 | BiManualTeaching.Panda_right.home() 26 | #%% 27 | BiManualTeaching.Kinesthetic_Demonstration_BiManual() 28 | #%% 29 | BiManualTeaching.save() 30 | # %% 31 | BiManualTeaching.Panda_left.home() 32 | BiManualTeaching.Panda_right.home() 33 | # EXECUTE DEMONSTRATION AT THE SAME TIME BUT GIVE CORRECTIONS 34 | #%% 35 | BiManualTeaching.execute_dual() 36 | # %% 37 | BiManualTeaching.Panda_left.home() 38 | BiManualTeaching.Panda_right.home() 39 | # %% HERE WE MOVE THE BOX 40 | BiManualTeaching.correction_execute_dual() 41 | # %% 42 | BiManualTeaching.Panda_left.home() 43 | BiManualTeaching.Panda_right.home() 44 | #%% 45 | BiManualTeaching.execute_dual() 46 | # %% 47 | BiManualTeaching.Panda_left.home() 48 | BiManualTeaching.Panda_right.home() 49 | #%% 50 | BiManualTeaching.execute_dual() 51 | # %% 52 | BiManualTeaching.Panda_left.home() 53 | BiManualTeaching.Panda_right.home() 54 | #%% 55 | BiManualTeaching.execute_dual() 56 | # %% 57 | BiManualTeaching.Panda_left.home() 58 | BiManualTeaching.Panda_right.home() 59 | #%% 60 | BiManualTeaching.execute_dual() 61 | # %% 62 | BiManualTeaching.Panda_left.home() 63 | BiManualTeaching.Panda_right.home() 64 | #%% 65 | BiManualTeaching.execute_dual() 66 | # %% 67 | BiManualTeaching.Panda_left.home() 68 | BiManualTeaching.Panda_right.home() 69 | #%% 70 | BiManualTeaching.execute_dual() 71 | # %% 72 | BiManualTeaching.Panda_left.home() 73 | BiManualTeaching.Panda_right.home() 74 | #%% 75 | BiManualTeaching.execute_dual() 76 | -------------------------------------------------------------------------------- /scripts/main_crates_syncronization.py: -------------------------------------------------------------------------------- 1 | """ 2 | Authors: Giovanni Franzese 3 | Email: g.franzese@tudelft.nl 4 | Cognitive Robotics, TU Delft 5 | This code is part of TERI (TEaching Robots Interactively) project 6 | """ 7 | #%% 8 | from SIMPLe_bimanual.dual_panda import DualPanda 9 | import time 10 | import rospy 11 | #%% 12 | if __name__ == '__main__': 13 | BiManualTeaching=DualPanda() 14 | time.sleep(1) 15 | #%% 16 | BiManualTeaching.Panda_right.load() 17 | BiManualTeaching.Panda_left.load() 18 | #%% 19 | BiManualTeaching.Panda_left.Kinesthetic_Demonstration() 20 | 21 | # %% 22 | BiManualTeaching.Panda_left.home() 23 | #%% 24 | BiManualTeaching.Panda_right.Kinesthetic_Demonstration() 25 | #%% 26 | BiManualTeaching.Panda_right.home() 27 | # %% 28 | BiManualTeaching.Panda_left.save() 29 | BiManualTeaching.Panda_right.save() 30 | # %% EXECUTE DEMONSTRATION AT THE SAME TIME 31 | BiManualTeaching.Panda_right.execute_traj() 32 | BiManualTeaching.Panda_left.execute_traj() 33 | # %% 34 | BiManualTeaching.Panda_left.home() 35 | BiManualTeaching.Panda_right.home() 36 | # EXECUTE DEMONSTRATION AT THE SAME TIME BUT GIVE CORRECTIONS 37 | # %% 38 | BiManualTeaching.Panda_right.execute_traj() 39 | BiManualTeaching.Panda_left.execute_traj() 40 | BiManualTeaching.Kinesthetic_Demonstration_BiManual(active=True) 41 | # %% 42 | BiManualTeaching.Panda_left.home() 43 | BiManualTeaching.Panda_right.home() 44 | #%% TEST HOW IT PERFORMS IN THE BIMANUAL TASK 45 | BiManualTeaching.execute_dual() 46 | #%% 47 | BiManualTeaching.Panda_left.home() 48 | BiManualTeaching.Panda_right.home() 49 | #%% TEST HOW IT PERFORMS IN THE BIMANUAL TASK 50 | rospy.set_param("/dual_teaching/execution_factor", 2) 51 | BiManualTeaching.execute_dual() 52 | #%% 53 | BiManualTeaching.Panda_left.home() 54 | BiManualTeaching.Panda_right.home() 55 | #%% TEST HOW IT PERFORMS IN THE BIMANUAL TASK 56 | rospy.set_param("/dual_teaching/execution_factor", 3) 57 | BiManualTeaching.execute_dual() 58 | #%% 59 | BiManualTeaching.Panda_left.home() 60 | BiManualTeaching.Panda_right.home() 61 | #%% TEST HOW IT PERFORMS IN THE BIMANUAL TASK 62 | rospy.set_param("/dual_teaching/execution_factor", 4) 63 | BiManualTeaching.execute_dual() 64 | #%% 65 | BiManualTeaching.save() -------------------------------------------------------------------------------- /scripts/main_crates_syncronization_statistics.py: -------------------------------------------------------------------------------- 1 | """ 2 | Authors: Giovanni Franzese 3 | Email: g.franzese@tudelft.nl 4 | Cognitive Robotics, TU Delft 5 | This code is part of TERI (TEaching Robots Interactively) project 6 | """ 7 | #%% 8 | import matplotlib 9 | from dual_panda import DualPanda 10 | import time 11 | import rospy 12 | from mpl_toolkits import mplot3d 13 | import matplotlib.pyplot as plt 14 | #%% 15 | if __name__ == '__main__': 16 | BiManualTeaching=DualPanda() 17 | #time.sleep(1) 18 | # BiManualTeaching.Panda_left.home_gripper() 19 | # BiManualTeaching.Panda_right.home_gripper() 20 | time.sleep(1) 21 | #%% 22 | BiManualTeaching.Panda_right.load() 23 | BiManualTeaching.Panda_left.load() 24 | #%% 25 | BiManualTeaching.Panda_left.Kinesthetic_Demonstration() 26 | 27 | # %% 28 | BiManualTeaching.Panda_left.home() 29 | #%% 30 | BiManualTeaching.Panda_right.Kinesthetic_Demonstration() 31 | #%% 32 | BiManualTeaching.Panda_right.home() 33 | # %% 34 | BiManualTeaching.Panda_left.save() 35 | BiManualTeaching.Panda_right.save() 36 | # %% Test 37 | # BiManualTeaching.Panda_right.execute_test() 38 | # %% EXECUTE DEMONSTRATION AT THE SAME TIME 39 | BiManualTeaching.Panda_right.execute_traj() 40 | BiManualTeaching.Panda_left.execute_traj() 41 | # %% 42 | BiManualTeaching.Panda_left.home() 43 | BiManualTeaching.Panda_right.home() 44 | # EXECUTE DEMONSTRATION AT THE SAME TIME BUT GIVE CORRECTIONS 45 | # %% 46 | BiManualTeaching.Panda_right.execute_traj() 47 | BiManualTeaching.Panda_left.execute_traj() 48 | BiManualTeaching.Kinesthetic_Demonstration_BiManual(active=True) 49 | #%% 50 | 51 | BiManualTeaching.Panda_left.home() 52 | BiManualTeaching.Panda_right.home() 53 | # %% EXECUTE DEMONSTRATION AGAIN And eventually GIVE CORRECTIONS 54 | BiManualTeaching.correction_execute_dual() 55 | 56 | # %% 57 | BiManualTeaching.Panda_left.home() 58 | BiManualTeaching.Panda_right.home() 59 | # %% TEST HOW IT PERFORMS IN THE BIMANUAL TASK 1 60 | BiManualTeaching.execute_dual() 61 | 62 | #%% 63 | BiManualTeaching.Panda_left.home() 64 | BiManualTeaching.Panda_right.home() 65 | #%% TEST HOW IT PERFORMS IN THE BIMANUAL TASK 2 66 | BiManualTeaching.execute_dual() 67 | #%% 68 | BiManualTeaching.Panda_left.home() 69 | BiManualTeaching.Panda_right.home() 70 | 71 | #%% TEST HOW IT PERFORMS IN THE BIMANUAL TASK 3 72 | BiManualTeaching.execute_dual() 73 | #%% 74 | BiManualTeaching.Panda_left.home() 75 | BiManualTeaching.Panda_right.home() 76 | 77 | #%% TEST HOW IT PERFORMS IN THE BIMANUAL TASK 4 78 | BiManualTeaching.execute_dual() 79 | #%% 80 | BiManualTeaching.Panda_left.home() 81 | BiManualTeaching.Panda_right.home() 82 | 83 | #%% TEST HOW IT PERFORMS IN THE BIMANUAL TASK 5 84 | BiManualTeaching.execute_dual() 85 | #%% 86 | BiManualTeaching.Panda_left.home() 87 | BiManualTeaching.Panda_right.home() 88 | # %% 89 | -------------------------------------------------------------------------------- /scripts/main_demo.py: -------------------------------------------------------------------------------- 1 | """ 2 | Authors: Giovanni Franzese 3 | Email: g.franzese@tudelft.nl 4 | Cognitive Robotics, TU Delft 5 | This code is part of TERI (TEaching Robots Interactively) project 6 | """ 7 | #%% 8 | import matplotlib 9 | from SIMPLe_bimanual.dual_panda import DualPanda 10 | import time 11 | import rospy 12 | from mpl_toolkits import mplot3d 13 | import matplotlib.pyplot as plt 14 | #%% 15 | if __name__ == '__main__': 16 | BiManualTeaching=DualPanda() 17 | time.sleep(1) 18 | BiManualTeaching.Panda_left.home() 19 | BiManualTeaching.Panda_right.home() 20 | 21 | #%% 22 | BiManualTeaching.Panda_left.Kinesthetic_Demonstration() 23 | 24 | # %% 25 | BiManualTeaching.Panda_left.home() 26 | #%% 27 | BiManualTeaching.Panda_right.Kinesthetic_Demonstration() 28 | #%% 29 | BiManualTeaching.Panda_right.home() 30 | # %% EXECUTE DEMONSTRATION AT THE SAME TIME 31 | BiManualTeaching.Panda_right.execute_traj() 32 | BiManualTeaching.Panda_left.execute_traj() 33 | # %% 34 | BiManualTeaching.Panda_left.home() 35 | BiManualTeaching.Panda_right.home() 36 | # EXECUTE DEMONSTRATION AT THE SAME TIME BUT GIVE CORRECTIONS 37 | # %% 38 | BiManualTeaching.Panda_right.execute_traj() 39 | BiManualTeaching.Panda_left.execute_traj() 40 | BiManualTeaching.Kinesthetic_Demonstration_BiManual(active=True) 41 | # %% 42 | BiManualTeaching.Panda_left.home() 43 | BiManualTeaching.Panda_right.home() 44 | # %% 45 | BiManualTeaching.correction_execute_dual() 46 | # %% 47 | BiManualTeaching.Panda_left.home() 48 | BiManualTeaching.Panda_right.home() 49 | #%% TEST HOW IT PERFORMS IN THE BIMANUAL TASK 50 | BiManualTeaching.execute_dual() 51 | # %% 52 | BiManualTeaching.Panda_left.home() 53 | BiManualTeaching.Panda_right.home() 54 | #%% ASK TWO STUDENDTS TO GIVE A DEMO TOGETHER 55 | BiManualTeaching.Panda_left.home() 56 | BiManualTeaching.Panda_right.home() 57 | #%% 58 | BiManualTeaching.execute_dual() 59 | 60 | #%% ASK A STUDENT TO GIVE DEMONSTRATIONS ALONE ONE ARM AT THE TIME 61 | BiManualTeaching.Panda_left.Kinesthetic_Demonstration() 62 | # %% 63 | BiManualTeaching.Panda_left.home() 64 | #%% 65 | BiManualTeaching.Panda_right.Kinesthetic_Demonstration() 66 | #%% 67 | BiManualTeaching.Panda_right.home() 68 | #%% Syncronization 69 | BiManualTeaching.Panda_right.execute_traj() 70 | BiManualTeaching.Panda_left.execute_traj() 71 | BiManualTeaching.Kinesthetic_Demonstration_BiManual(active=True) 72 | # %% 73 | BiManualTeaching.Panda_left.home() 74 | BiManualTeaching.Panda_right.home() 75 | #%% 76 | BiManualTeaching.execute_dual() 77 | 78 | 79 | #%% ASK A STUDENT TO GIVE DEMONSTRATIONS ALONE ONE ARM AT THE TIME 80 | BiManualTeaching.Panda_left.home() 81 | BiManualTeaching.Panda_right.home() 82 | 83 | #%% 84 | BiManualTeaching.Kinesthetic_Demonstration_BiManual() 85 | #%% 86 | BiManualTeaching.Panda_left.home() 87 | BiManualTeaching.Panda_right.home() 88 | #%% 89 | BiManualTeaching.execute_dual() 90 | 91 | 92 | #%% ASK A STUDENT TO GIVE DEMONSTRATIONS ONE FOR EACH ARM 93 | BiManualTeaching.Panda_left.home() 94 | BiManualTeaching.Panda_right.home() 95 | 96 | #%% 97 | BiManualTeaching.Kinesthetic_Demonstration_BiManual() 98 | #%% 99 | BiManualTeaching.Panda_left.home() 100 | BiManualTeaching.Panda_right.home() 101 | #%% 102 | BiManualTeaching.execute_dual() 103 | 104 | #%% 105 | BiManualTeaching.correction_execute_dual() 106 | #%% 107 | BiManualTeaching.Panda_left.home() 108 | BiManualTeaching.Panda_right.home() 109 | 110 | # %% 111 | -------------------------------------------------------------------------------- /scripts/main_demo_TERI.py: -------------------------------------------------------------------------------- 1 | """ 2 | Authors: Giovanni Franzese 3 | Email: g.franzese@tudelft.nl 4 | Cognitive Robotics, TU Delft 5 | This code is part of TERI (TEaching Robots Interactively) project 6 | """ 7 | #%% 8 | import matplotlib 9 | from SIMPLe_bimanual.dual_panda import DualPanda 10 | import time 11 | import rospy 12 | from mpl_toolkits import mplot3d 13 | import matplotlib.pyplot as plt 14 | import numpy as np 15 | #%% 16 | if __name__ == '__main__': 17 | BiManualTeaching=DualPanda() 18 | BiManualTeaching.Panda_right.enable_corr=True 19 | BiManualTeaching.Panda_left.enable_corr=True 20 | time.sleep(1) 21 | BiManualTeaching.Panda_right.home() 22 | #%% 23 | BiManualTeaching.Panda_right.Kinesthetic_Demonstration() 24 | #%% 25 | BiManualTeaching.Panda_right.home() 26 | # %% Execute the Motion and see what it learned 27 | BiManualTeaching.Panda_right.execute_traj() 28 | # %% 29 | BiManualTeaching.Panda_right.end=True 30 | BiManualTeaching.Panda_right.home() 31 | #%% HERE YOU CAN GIVE KINESTHETIC CORRECTIONS 32 | BiManualTeaching.Panda_right.Kinesthetic_Demonstration(active=True) 33 | BiManualTeaching.Panda_right.execute_traj() 34 | #%% 35 | BiManualTeaching.Panda_right.end=True 36 | BiManualTeaching.Panda_right.home() 37 | #%% FORGET ABOUT THE CORRECTIONS 38 | BiManualTeaching.Panda_right.execution_traj = np.asarray(BiManualTeaching.Panda_right.recorded_traj) 39 | BiManualTeaching.Panda_right.execution_ori = np.asarray(BiManualTeaching.Panda_right.recorded_ori) 40 | #%% HERE YOU GIVE CORRECTIONS SPREADING THE FEEDBACK ON THE DATABASE LIKE ILOSA 41 | BiManualTeaching.Panda_right.correction_mode=0 42 | BiManualTeaching.Panda_right.execute_traj() 43 | BiManualTeaching.Panda_right.Kinesthetic_Demonstration(active=True) 44 | #%% FORGET ABOUT THE CORRECTIONS 45 | BiManualTeaching.Panda_right.execution_traj = np.asarray(BiManualTeaching.Panda_right.recorded_traj) 46 | BiManualTeaching.Panda_right.execution_ori = np.asarray(BiManualTeaching.Panda_right.recorded_ori) 47 | #%% HERE YOU GIVE CORRECTIONS TAKING CONTROL LIKE HG DAGGER 48 | BiManualTeaching.Panda_right.correction_mode=1 49 | BiManualTeaching.Panda_right.execute_traj() 50 | BiManualTeaching.Panda_right.Kinesthetic_Demonstration(active=True) -------------------------------------------------------------------------------- /scripts/main_demo_schipol.py: -------------------------------------------------------------------------------- 1 | """ 2 | Authors: Giovanni Franzese 3 | Email: g.franzese@tudelft.nl 4 | Cognitive Robotics, TU Delft 5 | This code is part of TERI (TEaching Robots Interactively) project 6 | """ 7 | #%% 8 | import matplotlib 9 | from SIMPLe_bimanual.dual_panda import DualPanda 10 | import time 11 | 12 | from mpl_toolkits import mplot3d 13 | import matplotlib.pyplot as plt 14 | #%% 15 | if __name__ == '__main__': 16 | BiManualTeaching=DualPanda() 17 | time.sleep(1) 18 | 19 | #%% 20 | BiManualTeaching.Panda_right.load() 21 | #%% 22 | BiManualTeaching.Panda_right.home() 23 | # %% 24 | BiManualTeaching.Panda_right.Kinesthetic_Demonstration() 25 | #%% 26 | BiManualTeaching.Panda_right.save() 27 | #%% 28 | BiManualTeaching.Panda_right.home() 29 | # %% 30 | BiManualTeaching.Panda_right.execute_traj() 31 | 32 | 33 | #%% 34 | BiManualTeaching.load() 35 | #%% Start Bi-Manual demo 36 | BiManualTeaching.Panda_left.home() 37 | BiManualTeaching.Panda_right.home() 38 | #%% 39 | BiManualTeaching.Kinesthetic_Demonstration_BiManual() 40 | #%% 41 | BiManualTeaching.save() 42 | #%% 43 | BiManualTeaching.Panda_left.home() 44 | BiManualTeaching.Panda_right.home() 45 | # EXECUTE DEMONSTRATION AT THE SAME TIME BUT GIVE CORRECTIONS 46 | #%% 47 | BiManualTeaching.execute_dual() 48 | #%% 49 | BiManualTeaching.Panda_left.home() 50 | BiManualTeaching.Panda_right.home() 51 | #%% HERE WE MOVE THE BOX 52 | BiManualTeaching.correction_execute_dual() 53 | 54 | #%% 55 | BiManualTeaching.Panda_left.home() 56 | BiManualTeaching.Panda_right.home() 57 | #%% 58 | BiManualTeaching.execute_dual() 59 | # %% 60 | -------------------------------------------------------------------------------- /scripts/main_folding_clothes.py: -------------------------------------------------------------------------------- 1 | """ 2 | Authors: Giovanni Franzese 3 | Email: g.franzese@tudelft.nl 4 | Cognitive Robotics, TU Delft 5 | This code is part of TERI (TEaching Robots Interactively) project 6 | """ 7 | #%% 8 | import matplotlib 9 | from SIMPLe_bimanual.dual_panda import DualPanda 10 | import time 11 | 12 | from mpl_toolkits import mplot3d 13 | import matplotlib.pyplot as plt 14 | #%% 15 | if __name__ == '__main__': 16 | BiManualTeaching=DualPanda() 17 | # #time.sleep(1) 18 | BiManualTeaching.Panda_left.home_gripper() 19 | BiManualTeaching.Panda_right.home_gripper() 20 | time.sleep(1) 21 | #%% 22 | BiManualTeaching.Panda_left.move_gripper(0.0) 23 | BiManualTeaching.Panda_right.move_gripper(0.0) 24 | #%% 25 | BiManualTeaching.Kinesthetic_Demonstration_BiManual() 26 | # %% 27 | BiManualTeaching.go_to_start() 28 | # EXECUTE DEMONSTRATION AT THE SAME TIME BUT GIVE CORRECTIONS 29 | #%% 30 | BiManualTeaching.execute_dual() 31 | #%% 32 | BiManualTeaching.go_to_start() 33 | #%% Give perturbations 34 | BiManualTeaching.execute_dual() 35 | #%% 36 | BiManualTeaching.go_to_start() 37 | 38 | # %% 39 | -------------------------------------------------------------------------------- /scripts/main_pick_place_syncronization.py: -------------------------------------------------------------------------------- 1 | """ 2 | Authors: Giovanni Franzese 3 | Email: g.franzese@tudelft.nl 4 | Cognitive Robotics, TU Delft 5 | This code is part of TERI (TEaching Robots Interactively) project 6 | """ 7 | #%% 8 | import matplotlib 9 | from SIMPLe_bimanual.dual_panda import DualPanda 10 | import time 11 | 12 | from mpl_toolkits import mplot3d 13 | import matplotlib.pyplot as plt 14 | #%% 15 | if __name__ == '__main__': 16 | BiManualTeaching=DualPanda() 17 | time.sleep(1) 18 | BiManualTeaching.Panda_left.home_gripper() 19 | time.sleep(1) 20 | BiManualTeaching.Panda_right.home_gripper() 21 | time.sleep(1) 22 | # %% 23 | BiManualTeaching.Panda_left.home() 24 | BiManualTeaching.Panda_right.home() 25 | # %% 26 | BiManualTeaching.Panda_left.load() 27 | BiManualTeaching.Panda_right.load() 28 | #%% 29 | BiManualTeaching.Panda_right.Kinesthetic_Demonstration() 30 | # %% 31 | BiManualTeaching.Panda_right.home() 32 | BiManualTeaching.Panda_right.home_gripper() 33 | #%% 34 | BiManualTeaching.Panda_left.Kinesthetic_Demonstration() 35 | # %% 36 | BiManualTeaching.Panda_left.home() 37 | BiManualTeaching.Panda_left.home_gripper() 38 | #%% 39 | # %% 40 | BiManualTeaching.Panda_right.execute_traj() 41 | BiManualTeaching.Panda_left.execute_traj() 42 | BiManualTeaching.Kinesthetic_Demonstration_BiManual(active=True) 43 | #%% 44 | BiManualTeaching.Panda_left.home() 45 | BiManualTeaching.Panda_left.home_gripper() 46 | BiManualTeaching.Panda_right.home() 47 | BiManualTeaching.Panda_right.home_gripper() 48 | # %% 49 | BiManualTeaching.execute_dual() 50 | # %% 51 | 52 | BiManualTeaching.Panda_right.execute_traj() 53 | #%% 54 | BiManualTeaching.Panda_left.execute_traj() 55 | # %% 56 | -------------------------------------------------------------------------------- /scripts/main_plot.py: -------------------------------------------------------------------------------- 1 | # %% 2 | import matplotlib.pyplot as plt 3 | import numpy as np 4 | import pathlib 5 | 6 | from recording_node import Recorder 7 | def load(filename): 8 | data = np.load(str(pathlib.Path().resolve()) + '/recordings_final/' + str(filename) + '.npz') 9 | return data 10 | 11 | 12 | # %% 13 | filename = "19_12_36_58" 14 | data = load(filename=filename) 15 | time = np.linspace(0, data['recorded_cart_pose'].shape[1], data['recorded_cart_pose'].shape[1])/100 16 | 17 | 'cart_pose: x, y, z, qz, qy, qz, qw' 18 | right_cart_pose = data["recorded_cart_pose"][:7] 19 | left_cart_pose = data['recorded_cart_pose'][7:] 20 | 21 | right_attractor_pose = data['recorded_attractor_pose'][:7] 22 | left_attractor_pose = data['recorded_attractor_pose'][7:] 23 | 24 | right_attractor_stiffness = data['recorded_stiffness'][:7] 25 | left_attractor_stiffness = data['recorded_stiffness'][7:] 26 | # %% 27 | plt.figure(1) 28 | plt.ylabel('x') 29 | plt.plot(time, left_cart_pose[0], label='data1') 30 | # plt.legend('') 31 | plt.title('Left cartesian position') 32 | 33 | plt.figure(2) 34 | plt.ylabel('y') 35 | plt.plot(time, left_cart_pose[1], label='data1') 36 | # plt.legend() 37 | plt.title('Left cartesian position') 38 | 39 | plt.figure(3) 40 | plt.ylabel('z') 41 | plt.plot(time, left_cart_pose[2], label='data1') 42 | # plt.legend() 43 | plt.title('Left cartesian position') 44 | 45 | plt.figure(4) 46 | plt.ylabel('x') 47 | plt.plot(time, right_cart_pose[0], label='data1') 48 | # plt.legend() 49 | plt.title('right cartesian position') 50 | 51 | plt.figure(5) 52 | plt.ylabel('y') 53 | plt.plot(time, right_cart_pose[1], label='data1') 54 | # plt.legend() 55 | plt.title('right cartesian position') 56 | 57 | plt.figure(6) 58 | plt.ylabel('z') 59 | plt.plot(time, right_cart_pose[2], label='data1') 60 | # plt.legend() 61 | plt.title('right cartesian position') 62 | 63 | # %% 64 | right_err = (right_cart_pose1[:3] - right_attractor_pose1[:3]) 65 | left_err = (left_cart_pose1[:3] - left_attractor_pose1[:3]) 66 | 67 | plt.figure(4) 68 | plt.ylabel('x') 69 | plt.plot(right_err[0]-left_err[0]) 70 | plt.legend() 71 | 72 | plt.figure(5) 73 | plt.ylabel('y') 74 | plt.plot(right_err[1]-left_err[1]) 75 | plt.legend() 76 | 77 | plt.figure(6) 78 | plt.ylabel('z') 79 | plt.plot(right_err[2]-left_err[2]) 80 | plt.legend() 81 | 82 | plt.figure(7) 83 | 84 | # %% 85 | 86 | plt.figure(1) 87 | plt.ylabel('x') 88 | plt.plot(time, left_cart_pose1[0], label='data1', color='r') 89 | plt.plot(data2_t, left_cart_pose2[0], label='data2') 90 | plt.legend() 91 | 92 | plt.figure(2) 93 | plt.ylabel('y') 94 | plt.plot(time, left_cart_pose1[1], label='data1', color='r') 95 | plt.plot(data2_t, left_cart_pose2[1], label='data2') 96 | plt.legend() 97 | 98 | plt.figure(3) 99 | plt.ylabel('z') 100 | plt.plot(time, left_cart_pose1[3], label='data1', color='r') 101 | plt.plot(data2_t, left_cart_pose2[3], label='data2') 102 | plt.legend() 103 | # %% 104 | plt.figure(1) 105 | plt.plot(time, left_cart_pose1[0], color='red', label='With perturbation') 106 | plt.plot(data2_t, left_cart_pose2[0], label='Without perturbation') 107 | plt.legend() 108 | # %% 109 | 110 | error_based_force_right = data1['recorded_stiffness'][:3]*(data1['recorded_cart_pose'][:3]-data1['recorded_attractor_pose'][:3]) 111 | error_based_force_left = data1['recorded_stiffness'][7:10]*(data1['recorded_cart_pose'][7:10]-data1['recorded_attractor_pose'][7:10]) 112 | 113 | plt.figure(1) 114 | plt.plot(error_based_force_left[0]) 115 | 116 | plt.figure(2) 117 | plt.plot(data1['recorded_force_torque'][6]) 118 | # %% 119 | 120 | plt.figure(1) 121 | plt.plot(time, data1["recorded_stiffness"][7]) 122 | plt.plot(data2_t, data2["recorded_stiffness"][7]) 123 | 124 | plt.figure(2) 125 | plt.plot(time, data1["recorded_stiffness"][8]) 126 | plt.plot(data2_t, data2["recorded_stiffness"][8]) 127 | 128 | plt.figure(3) 129 | plt.plot(time, data1["recorded_stiffness"][9]) 130 | plt.plot(data2_t, data2["recorded_stiffness"][9]) 131 | 132 | # %% 133 | fig, (ax1, ax2, ax3, ax4) = plt.subplots(4, sharex=True, figsize=(10,10)) 134 | 135 | ax1.plot(time, data1["recorded_stiffness"][8], label='recorded stiffness no correction', color='r') 136 | ax1.plot(data2_t, data2["recorded_stiffness"][8], label='recorded stiffness with correction', color='b') 137 | ax2.plot(data2_t, data2["recorded_feedback"][4], label='correction input', color='k') 138 | ax3.plot(data2_t, data2["recorded_cart_pose"][8]-data2["recorded_attractor_pose"][8], label='distance to attractor', color='k') 139 | ax4.plot(data2_t, data2['recorded_force_torque'][7], label='externally applied force', color='k') 140 | 141 | ax1.set_ylabel('Stiffness (N/m)') 142 | ax2.set_ylabel('Magnitude') 143 | ax3.set_ylabel('Distance (m)') 144 | ax4.set_ylabel('Force (N)') 145 | 146 | ax1.set_ylim(550,900) 147 | ax2.set_ylim(-1, 0.6) 148 | ax1.legend() 149 | ax2.legend() 150 | ax3.legend() 151 | ax4.legend() 152 | 153 | # %% 154 | -------------------------------------------------------------------------------- /scripts/main_record.py: -------------------------------------------------------------------------------- 1 | # %% 2 | import matplotlib.pyplot as plt 3 | import numpy as np 4 | 5 | from recording_node import Recorder 6 | rec = Recorder() 7 | 8 | # %% 9 | rec.record() 10 | # %% 11 | -------------------------------------------------------------------------------- /scripts/main_schipol.py: -------------------------------------------------------------------------------- 1 | """ 2 | Authors: Giovanni Franzese 3 | Email: g.franzese@tudelft.nl 4 | Cognitive Robotics, TU Delft 5 | This code is part of TERI (TEaching Robots Interactively) project 6 | """ 7 | #%% 8 | from SIMPLe_bimanual.dual_panda import DualPanda 9 | import time 10 | #%% 11 | if __name__ == '__main__': 12 | BiManualTeaching=DualPanda() 13 | time.sleep(1) 14 | #%% 15 | BiManualTeaching.Panda_right.load() 16 | BiManualTeaching.Panda_left.load() 17 | # %% 18 | BiManualTeaching.Panda_left.home() 19 | BiManualTeaching.Panda_right.home() 20 | #%% 21 | BiManualTeaching.Kinesthetic_Demonstration_BiManual() 22 | # %% 23 | BiManualTeaching.Panda_left.home() 24 | BiManualTeaching.Panda_right.home() 25 | # EXECUTE DEMONSTRATION AT THE SAME TIME BUT GIVE CORRECTIONS 26 | #%% 27 | BiManualTeaching.execute_dual() 28 | # %% 29 | BiManualTeaching.Panda_left.home() 30 | BiManualTeaching.Panda_right.home() 31 | # %% 32 | BiManualTeaching.Panda_left.home() 33 | BiManualTeaching.Panda_right.home() 34 | # %% HERE WE MOVE THE BOX 35 | BiManualTeaching.correction_execute_dual() 36 | # %% 37 | BiManualTeaching.Panda_left.home() 38 | BiManualTeaching.Panda_right.home() 39 | #%% 40 | BiManualTeaching.execute_dual() 41 | 42 | # %% 43 | -------------------------------------------------------------------------------- /scripts/main_small_box.py: -------------------------------------------------------------------------------- 1 | """ 2 | Authors: Giovanni Franzese 3 | Email: g.franzese@tudelft.nl 4 | Cognitive Robotics, TU Delft 5 | This code is part of TERI (TEaching Robots Interactively) project 6 | """ 7 | #%% 8 | from SIMPLe_bimanual.dual_panda import DualPanda 9 | import time 10 | 11 | from mpl_toolkits import mplot3d 12 | import matplotlib.pyplot as plt 13 | #%% 14 | if __name__ == '__main__': 15 | BiManualTeaching=DualPanda() 16 | #ILoSA.connect_ROS() 17 | time.sleep(1) 18 | BiManualTeaching.Panda_left.home_gripper() 19 | BiManualTeaching.Panda_right.home_gripper() 20 | time.sleep(1) 21 | # %% 22 | BiManualTeaching.Panda_left.home() 23 | BiManualTeaching.Panda_right.home() 24 | # %% 25 | BiManualTeaching.Kinesthetic_Demonstration_BiManual() 26 | # %% 27 | BiManualTeaching.Panda_left.home() 28 | BiManualTeaching.Panda_right.home() 29 | #%% 30 | BiManualTeaching.execute_dual() 31 | # %% 32 | BiManualTeaching.Panda_left.home() 33 | BiManualTeaching.Panda_right.home() 34 | #%% 35 | BiManualTeaching.execute_dual() 36 | # %% 37 | BiManualTeaching.Panda_left.home() 38 | BiManualTeaching.Panda_right.home() 39 | #%% 40 | #%% -------------------------------------------------------------------------------- /scripts/main_user_study.py: -------------------------------------------------------------------------------- 1 | """ 2 | Authors: Giovanni Franzese 3 | Email: g.franzese@tudelft.nl 4 | Cognitive Robotics, TU Delft 5 | This code is part of TERI (TEaching Robots Interactively) project 6 | """ 7 | #%% 8 | import matplotlib 9 | from SIMPLe_bimanual.dual_panda import DualPanda 10 | import time 11 | 12 | from mpl_toolkits import mplot3d 13 | import matplotlib.pyplot as plt 14 | #%% 15 | if __name__ == '__main__': 16 | BiManualTeaching=DualPanda() 17 | #ILoSA.connect_ROS() 18 | time.sleep(1) 19 | BiManualTeaching.Panda_left.home_gripper() 20 | BiManualTeaching.Panda_right.home_gripper() 21 | time.sleep(1) 22 | 23 | #%% KINESTHETIC TEACHING# %% 24 | BiManualTeaching.Kinesthetic_Demonstration_BiManual() 25 | # %% 26 | BiManualTeaching.Panda_left.home() 27 | BiManualTeaching.Panda_right.home() 28 | #%% 29 | BiManualTeaching.save() 30 | # %% 31 | BiManualTeaching.load() 32 | # %%e 33 | BiManualTeaching.Panda_right.go_to_start() 34 | BiManualTeaching.Panda_left.go_to_start() 35 | #%% 36 | BiManualTeaching.execute_dual() 37 | # %% 38 | BiManualTeaching.correction_execute_dual() 39 | # %% 40 | BiManualTeaching.enable_correction = False 41 | # %% 42 | BiManualTeaching.Kinesthetic_Demonstration_BiManual() 43 | #%% 44 | BiManualTeaching.go_to_start() 45 | #%% 46 | BiManualTeaching.execute_dual() -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup, find_packages 2 | 3 | setup( 4 | name='panda_ros', 5 | version='0.1.0', 6 | description='Panda function in python for ros', 7 | author='Giovanni Franzese', 8 | author_email='g.franzese@tudelft.nl', 9 | packages=find_packages(), 10 | # Add other dependencies here 11 | classifiers=[ 12 | 'Development Status :: 5 - Production/Stable', 13 | 'Intended Audience :: Developers', 14 | 'License :: OSI Approved :: MIT License', 15 | 'Programming Language :: Python :: 3', 16 | 'Programming Language :: Python :: 3.6', 17 | 'Programming Language :: Python :: 3.7', 18 | 'Programming Language :: Python :: 3.8', 19 | 'Programming Language :: Python :: 3.9', 20 | ], 21 | ) 22 | --------------------------------------------------------------------------------