Skip to content

Commit

Permalink
Add FeLT data & fix ml examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Skylark0924 committed Aug 18, 2023
1 parent bc83d09 commit c2312aa
Show file tree
Hide file tree
Showing 132 changed files with 331,693 additions and 6 deletions.
24 changes: 24 additions & 0 deletions examples/data/felt/Readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Data (csv format) is organized in folders first by task then by trial. Three trial folders are included for each of the following tasks:
- raster: wiping the surface of a bamboo cutting board side to side as the hand travels from the bottom ot the top or top to bottom
- circle: wiping the surface of a bamboo cutting board in small counterclockwise circles as the hand covers travels around different parts in a general counterclockwise trajectory.
- spiral: wiping the surface of a bamboo cutting board starting in its center and spiraling ountward, then spiraling inwards once coming closer to the edge (without reaching it)
- edgeC: following the edge of a round plastic bowl, with half the sensor making contact
- edgeR: following the edge of a rectangular bamboo cutting board, with half the sensor making contact
Each trial is a recording of approximately 55 continuous seconds.

Each trial folder contains data files corresponding to the following tasks:
- wipe_{task}_mocap_hand: motion capture (mocap) data for the hand that’s holding the sensor (3D coordinates of 8 markers = 16 columns). Columns are grouped by threes (i.e. x-y-z, x-y-z,...)
- wipe_{task}_mocap_object: mocap data for the object (16 columns as above)
- wipe_{task}_sensor: comprehensive tactile sensor data (4 deflection directions of 9 taxels = 36 columns)
- wipe_{task}_sensor_comb: tactile sensor data grouped along different directions  (4 cardinal directions, 2 rotational (clockwise and counterclockwise), and overall pressure = 7 columns)
- wipe_{task}_sensor_partial_comb: portions of the taxels are combined, to differentiate between differentiate partial contacts/interactions

Each data file includes column labels (first row) and data (rest of the rows). Each row is a frame (sample) of data, sampled at 60Hz.

Columns headings for the sensor data are defined as follows:
- wipe_{task}_sensor: taxel_#_left,taxel_#_up,taxel_#_right,taxel_#_down, where # ranges from 1 to 9. Taxels are numbered with 1 being the bottom left, 2 is bottom center, 3 is bottom right, moving up to 9 being top right.
- wipe_{task}_sensor_comb: [taxels_up,taxels_down,taxels_right,taxels_left,taxels_clockwise,taxels_counterclockwise,taxels_pressure]. See Fig. 5 in https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=8990001 for a visual explanation of how the taxels are summed for the linear and rotational columns.
- wipe_{task}_sensor_partial_comb: [taxel_left_up] corresponds to measuring the upward deflection of the left three taxels. Another example, [taxel_down_right] corresponds to measuring rightward deflection of the bottom three taxels. [taxels_{side}_pressure] corresponds to the overall pressure (sum of all deflection directions) of the corresponding sensor portion (defined by side: up/down/left/right).

Columni headings for the mocap data is in the following order:
- [marker_#_x,marker_#_y,marker_#_z,marker_#_x,...] where # ranges from 1 to 8 (markers).
Binary file added examples/data/felt/desktop.ini
Binary file not shown.
Binary file added examples/data/felt/wipe_circle/desktop.ini
Binary file not shown.
Binary file added examples/data/felt/wipe_circle/trial_01/desktop.ini
Binary file not shown.
2,914 changes: 2,914 additions & 0 deletions examples/data/felt/wipe_circle/trial_01/wipe_raster_mocap_hand.csv

Large diffs are not rendered by default.

2,914 changes: 2,914 additions & 0 deletions examples/data/felt/wipe_circle/trial_01/wipe_raster_mocap_hand_rigid.csv

Large diffs are not rendered by default.

2,914 changes: 2,914 additions & 0 deletions examples/data/felt/wipe_circle/trial_01/wipe_raster_mocap_object.csv

Large diffs are not rendered by default.

2,914 changes: 2,914 additions & 0 deletions examples/data/felt/wipe_circle/trial_01/wipe_raster_mocap_object_rigid.csv

Large diffs are not rendered by default.

2,914 changes: 2,914 additions & 0 deletions examples/data/felt/wipe_circle/trial_01/wipe_raster_sensor.csv

Large diffs are not rendered by default.

2,914 changes: 2,914 additions & 0 deletions examples/data/felt/wipe_circle/trial_01/wipe_raster_sensor_comb.csv

Large diffs are not rendered by default.

2,914 changes: 2,914 additions & 0 deletions examples/data/felt/wipe_circle/trial_01/wipe_raster_sensor_partial_comb.csv

Large diffs are not rendered by default.

Binary file added examples/data/felt/wipe_circle/trial_02/desktop.ini
Binary file not shown.
3,262 changes: 3,262 additions & 0 deletions examples/data/felt/wipe_circle/trial_02/wipe_raster_mocap_hand.csv

Large diffs are not rendered by default.

3,262 changes: 3,262 additions & 0 deletions examples/data/felt/wipe_circle/trial_02/wipe_raster_mocap_hand_rigid.csv

Large diffs are not rendered by default.

3,262 changes: 3,262 additions & 0 deletions examples/data/felt/wipe_circle/trial_02/wipe_raster_mocap_object.csv

Large diffs are not rendered by default.

3,262 changes: 3,262 additions & 0 deletions examples/data/felt/wipe_circle/trial_02/wipe_raster_mocap_object_rigid.csv

Large diffs are not rendered by default.

3,262 changes: 3,262 additions & 0 deletions examples/data/felt/wipe_circle/trial_02/wipe_raster_sensor.csv

Large diffs are not rendered by default.

3,262 changes: 3,262 additions & 0 deletions examples/data/felt/wipe_circle/trial_02/wipe_raster_sensor_comb.csv

Large diffs are not rendered by default.

3,262 changes: 3,262 additions & 0 deletions examples/data/felt/wipe_circle/trial_02/wipe_raster_sensor_partial_comb.csv

Large diffs are not rendered by default.

Binary file added examples/data/felt/wipe_circle/trial_03/desktop.ini
Binary file not shown.
3,177 changes: 3,177 additions & 0 deletions examples/data/felt/wipe_circle/trial_03/wipe_raster_mocap_hand.csv

Large diffs are not rendered by default.

3,177 changes: 3,177 additions & 0 deletions examples/data/felt/wipe_circle/trial_03/wipe_raster_mocap_hand_rigid.csv

Large diffs are not rendered by default.

3,177 changes: 3,177 additions & 0 deletions examples/data/felt/wipe_circle/trial_03/wipe_raster_mocap_object.csv

Large diffs are not rendered by default.

3,177 changes: 3,177 additions & 0 deletions examples/data/felt/wipe_circle/trial_03/wipe_raster_mocap_object_rigid.csv

Large diffs are not rendered by default.

3,177 changes: 3,177 additions & 0 deletions examples/data/felt/wipe_circle/trial_03/wipe_raster_sensor.csv

Large diffs are not rendered by default.

3,177 changes: 3,177 additions & 0 deletions examples/data/felt/wipe_circle/trial_03/wipe_raster_sensor_comb.csv

Large diffs are not rendered by default.

3,177 changes: 3,177 additions & 0 deletions examples/data/felt/wipe_circle/trial_03/wipe_raster_sensor_partial_comb.csv

Large diffs are not rendered by default.

Binary file added examples/data/felt/wipe_edgeC/desktop.ini
Binary file not shown.
Binary file added examples/data/felt/wipe_edgeC/trial_01/desktop.ini
Binary file not shown.
3,290 changes: 3,290 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_01/wipe_edgeC_mocap_hand.csv

Large diffs are not rendered by default.

3,290 changes: 3,290 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_01/wipe_edgeC_mocap_hand_rigid.csv

Large diffs are not rendered by default.

3,290 changes: 3,290 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_01/wipe_edgeC_mocap_object.csv

Large diffs are not rendered by default.

3,290 changes: 3,290 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_01/wipe_edgeC_mocap_object_rigid.csv

Large diffs are not rendered by default.

3,290 changes: 3,290 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_01/wipe_edgeC_sensor.csv

Large diffs are not rendered by default.

3,290 changes: 3,290 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_01/wipe_edgeC_sensor_comb.csv

Large diffs are not rendered by default.

3,290 changes: 3,290 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_01/wipe_edgeC_sensor_partial_comb.csv

Large diffs are not rendered by default.

Binary file added examples/data/felt/wipe_edgeC/trial_02/desktop.ini
Binary file not shown.
3,359 changes: 3,359 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_02/wipe_edgeC_mocap_hand.csv

Large diffs are not rendered by default.

3,359 changes: 3,359 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_02/wipe_edgeC_mocap_hand_rigid.csv

Large diffs are not rendered by default.

3,359 changes: 3,359 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_02/wipe_edgeC_mocap_object.csv

Large diffs are not rendered by default.

3,359 changes: 3,359 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_02/wipe_edgeC_mocap_object_rigid.csv

Large diffs are not rendered by default.

3,359 changes: 3,359 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_02/wipe_edgeC_sensor.csv

Large diffs are not rendered by default.

3,359 changes: 3,359 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_02/wipe_edgeC_sensor_comb.csv

Large diffs are not rendered by default.

3,359 changes: 3,359 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_02/wipe_edgeC_sensor_partial_comb.csv

Large diffs are not rendered by default.

Binary file added examples/data/felt/wipe_edgeC/trial_03/desktop.ini
Binary file not shown.
3,356 changes: 3,356 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_03/wipe_edgeC_mocap_hand.csv

Large diffs are not rendered by default.

3,356 changes: 3,356 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_03/wipe_edgeC_mocap_hand_rigid.csv

Large diffs are not rendered by default.

3,356 changes: 3,356 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_03/wipe_edgeC_mocap_object.csv

Large diffs are not rendered by default.

3,356 changes: 3,356 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_03/wipe_edgeC_mocap_object_rigid.csv

Large diffs are not rendered by default.

3,356 changes: 3,356 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_03/wipe_edgeC_sensor.csv

Large diffs are not rendered by default.

3,356 changes: 3,356 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_03/wipe_edgeC_sensor_comb.csv

Large diffs are not rendered by default.

3,356 changes: 3,356 additions & 0 deletions examples/data/felt/wipe_edgeC/trial_03/wipe_edgeC_sensor_partial_comb.csv

Large diffs are not rendered by default.

Binary file added examples/data/felt/wipe_edgeR/desktop.ini
Binary file not shown.
Binary file added examples/data/felt/wipe_edgeR/trial_01/desktop.ini
Binary file not shown.
2,873 changes: 2,873 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_01/wipe_edgeR_mocap_hand.csv

Large diffs are not rendered by default.

2,873 changes: 2,873 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_01/wipe_edgeR_mocap_hand_rigid.csv

Large diffs are not rendered by default.

2,873 changes: 2,873 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_01/wipe_edgeR_mocap_object.csv

Large diffs are not rendered by default.

2,873 changes: 2,873 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_01/wipe_edgeR_mocap_object_rigid.csv

Large diffs are not rendered by default.

2,873 changes: 2,873 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_01/wipe_edgeR_sensor.csv

Large diffs are not rendered by default.

2,873 changes: 2,873 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_01/wipe_edgeR_sensor_comb.csv

Large diffs are not rendered by default.

2,873 changes: 2,873 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_01/wipe_edgeR_sensor_partial_comb.csv

Large diffs are not rendered by default.

Binary file added examples/data/felt/wipe_edgeR/trial_02/desktop.ini
Binary file not shown.
3,039 changes: 3,039 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_02/wipe_edgeR_mocap_hand.csv

Large diffs are not rendered by default.

3,039 changes: 3,039 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_02/wipe_edgeR_mocap_hand_rigid.csv

Large diffs are not rendered by default.

3,039 changes: 3,039 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_02/wipe_edgeR_mocap_object.csv

Large diffs are not rendered by default.

3,039 changes: 3,039 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_02/wipe_edgeR_mocap_object_rigid.csv

Large diffs are not rendered by default.

3,039 changes: 3,039 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_02/wipe_edgeR_sensor.csv

Large diffs are not rendered by default.

3,039 changes: 3,039 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_02/wipe_edgeR_sensor_comb.csv

Large diffs are not rendered by default.

3,039 changes: 3,039 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_02/wipe_edgeR_sensor_partial_comb.csv

Large diffs are not rendered by default.

Binary file added examples/data/felt/wipe_edgeR/trial_03/desktop.ini
Binary file not shown.
2,785 changes: 2,785 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_03/wipe_edgeR_mocap_hand.csv

Large diffs are not rendered by default.

2,785 changes: 2,785 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_03/wipe_edgeR_mocap_hand_rigid.csv

Large diffs are not rendered by default.

2,785 changes: 2,785 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_03/wipe_edgeR_mocap_object.csv

Large diffs are not rendered by default.

2,785 changes: 2,785 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_03/wipe_edgeR_mocap_object_rigid.csv

Large diffs are not rendered by default.

2,785 changes: 2,785 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_03/wipe_edgeR_sensor.csv

Large diffs are not rendered by default.

2,785 changes: 2,785 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_03/wipe_edgeR_sensor_comb.csv

Large diffs are not rendered by default.

2,785 changes: 2,785 additions & 0 deletions examples/data/felt/wipe_edgeR/trial_03/wipe_edgeR_sensor_partial_comb.csv

Large diffs are not rendered by default.

Binary file added examples/data/felt/wipe_raster/desktop.ini
Binary file not shown.
Binary file added examples/data/felt/wipe_raster/trial_01/desktop.ini
Binary file not shown.
3,221 changes: 3,221 additions & 0 deletions examples/data/felt/wipe_raster/trial_01/wipe_raster_mocap_hand.csv

Large diffs are not rendered by default.

3,221 changes: 3,221 additions & 0 deletions examples/data/felt/wipe_raster/trial_01/wipe_raster_mocap_hand_rigid.csv

Large diffs are not rendered by default.

3,221 changes: 3,221 additions & 0 deletions examples/data/felt/wipe_raster/trial_01/wipe_raster_mocap_object.csv

Large diffs are not rendered by default.

3,221 changes: 3,221 additions & 0 deletions examples/data/felt/wipe_raster/trial_01/wipe_raster_mocap_object_rigid.csv

Large diffs are not rendered by default.

3,221 changes: 3,221 additions & 0 deletions examples/data/felt/wipe_raster/trial_01/wipe_raster_sensor.csv

Large diffs are not rendered by default.

3,221 changes: 3,221 additions & 0 deletions examples/data/felt/wipe_raster/trial_01/wipe_raster_sensor_comb.csv

Large diffs are not rendered by default.

3,221 changes: 3,221 additions & 0 deletions examples/data/felt/wipe_raster/trial_01/wipe_raster_sensor_partial_comb.csv

Large diffs are not rendered by default.

Binary file added examples/data/felt/wipe_raster/trial_02/desktop.ini
Binary file not shown.
3,306 changes: 3,306 additions & 0 deletions examples/data/felt/wipe_raster/trial_02/wipe_raster_mocap_hand.csv

Large diffs are not rendered by default.

3,306 changes: 3,306 additions & 0 deletions examples/data/felt/wipe_raster/trial_02/wipe_raster_mocap_hand_rigid.csv

Large diffs are not rendered by default.

3,306 changes: 3,306 additions & 0 deletions examples/data/felt/wipe_raster/trial_02/wipe_raster_mocap_object.csv

Large diffs are not rendered by default.

3,306 changes: 3,306 additions & 0 deletions examples/data/felt/wipe_raster/trial_02/wipe_raster_mocap_object_rigid.csv

Large diffs are not rendered by default.

3,306 changes: 3,306 additions & 0 deletions examples/data/felt/wipe_raster/trial_02/wipe_raster_sensor.csv

Large diffs are not rendered by default.

3,306 changes: 3,306 additions & 0 deletions examples/data/felt/wipe_raster/trial_02/wipe_raster_sensor_comb.csv

Large diffs are not rendered by default.

3,306 changes: 3,306 additions & 0 deletions examples/data/felt/wipe_raster/trial_02/wipe_raster_sensor_partial_comb.csv

Large diffs are not rendered by default.

Binary file added examples/data/felt/wipe_raster/trial_03/desktop.ini
Binary file not shown.
3,169 changes: 3,169 additions & 0 deletions examples/data/felt/wipe_raster/trial_03/wipe_raster_mocap_hand.csv

Large diffs are not rendered by default.

3,169 changes: 3,169 additions & 0 deletions examples/data/felt/wipe_raster/trial_03/wipe_raster_mocap_hand_rigid.csv

Large diffs are not rendered by default.

3,169 changes: 3,169 additions & 0 deletions examples/data/felt/wipe_raster/trial_03/wipe_raster_mocap_object.csv

Large diffs are not rendered by default.

3,169 changes: 3,169 additions & 0 deletions examples/data/felt/wipe_raster/trial_03/wipe_raster_mocap_object_rigid.csv

Large diffs are not rendered by default.

3,169 changes: 3,169 additions & 0 deletions examples/data/felt/wipe_raster/trial_03/wipe_raster_sensor.csv

Large diffs are not rendered by default.

3,169 changes: 3,169 additions & 0 deletions examples/data/felt/wipe_raster/trial_03/wipe_raster_sensor_comb.csv

Large diffs are not rendered by default.

3,169 changes: 3,169 additions & 0 deletions examples/data/felt/wipe_raster/trial_03/wipe_raster_sensor_partial_comb.csv

Large diffs are not rendered by default.

Binary file added examples/data/felt/wipe_spiral/desktop.ini
Binary file not shown.
Binary file added examples/data/felt/wipe_spiral/trial_01/desktop.ini
Binary file not shown.
3,114 changes: 3,114 additions & 0 deletions examples/data/felt/wipe_spiral/trial_01/wiping_spiral_mocap_hand.csv

Large diffs are not rendered by default.

3,114 changes: 3,114 additions & 0 deletions examples/data/felt/wipe_spiral/trial_01/wiping_spiral_mocap_hand_rigid.csv

Large diffs are not rendered by default.

3,114 changes: 3,114 additions & 0 deletions examples/data/felt/wipe_spiral/trial_01/wiping_spiral_mocap_object.csv

Large diffs are not rendered by default.

3,114 changes: 3,114 additions & 0 deletions examples/data/felt/wipe_spiral/trial_01/wiping_spiral_mocap_object_rigid.csv

Large diffs are not rendered by default.

3,114 changes: 3,114 additions & 0 deletions examples/data/felt/wipe_spiral/trial_01/wiping_spiral_sensor.csv

Large diffs are not rendered by default.

3,114 changes: 3,114 additions & 0 deletions examples/data/felt/wipe_spiral/trial_01/wiping_spiral_sensor_comb.csv

Large diffs are not rendered by default.

3,114 changes: 3,114 additions & 0 deletions examples/data/felt/wipe_spiral/trial_01/wiping_spiral_sensor_partial_comb.csv

Large diffs are not rendered by default.

Binary file added examples/data/felt/wipe_spiral/trial_02/desktop.ini
Binary file not shown.
3,249 changes: 3,249 additions & 0 deletions examples/data/felt/wipe_spiral/trial_02/wiping_spiral_mocap_hand.csv

Large diffs are not rendered by default.

3,249 changes: 3,249 additions & 0 deletions examples/data/felt/wipe_spiral/trial_02/wiping_spiral_mocap_hand_rigid.csv

Large diffs are not rendered by default.

3,249 changes: 3,249 additions & 0 deletions examples/data/felt/wipe_spiral/trial_02/wiping_spiral_mocap_object.csv

Large diffs are not rendered by default.

3,249 changes: 3,249 additions & 0 deletions examples/data/felt/wipe_spiral/trial_02/wiping_spiral_mocap_object_rigid.csv

Large diffs are not rendered by default.

3,249 changes: 3,249 additions & 0 deletions examples/data/felt/wipe_spiral/trial_02/wiping_spiral_sensor.csv

Large diffs are not rendered by default.

3,249 changes: 3,249 additions & 0 deletions examples/data/felt/wipe_spiral/trial_02/wiping_spiral_sensor_comb.csv

Large diffs are not rendered by default.

3,249 changes: 3,249 additions & 0 deletions examples/data/felt/wipe_spiral/trial_02/wiping_spiral_sensor_partial_comb.csv

Large diffs are not rendered by default.

Binary file added examples/data/felt/wipe_spiral/trial_03/desktop.ini
Binary file not shown.
3,261 changes: 3,261 additions & 0 deletions examples/data/felt/wipe_spiral/trial_03/wiping_spiral_mocap_hand.csv

Large diffs are not rendered by default.

3,261 changes: 3,261 additions & 0 deletions examples/data/felt/wipe_spiral/trial_03/wiping_spiral_mocap_hand_rigid.csv

Large diffs are not rendered by default.

3,261 changes: 3,261 additions & 0 deletions examples/data/felt/wipe_spiral/trial_03/wiping_spiral_mocap_object.csv

Large diffs are not rendered by default.

3,261 changes: 3,261 additions & 0 deletions examples/data/felt/wipe_spiral/trial_03/wiping_spiral_mocap_object_rigid.csv

Large diffs are not rendered by default.

3,261 changes: 3,261 additions & 0 deletions examples/data/felt/wipe_spiral/trial_03/wiping_spiral_sensor.csv

Large diffs are not rendered by default.

3,261 changes: 3,261 additions & 0 deletions examples/data/felt/wipe_spiral/trial_03/wiping_spiral_sensor_comb.csv

Large diffs are not rendered by default.

3,261 changes: 3,261 additions & 0 deletions examples/data/felt/wipe_spiral/trial_03/wiping_spiral_sensor_partial_comb.csv

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"""
TP-GMM learning from real human demonstration data
BiRP
=================================================
This example shows how to learn a TP-GMM from real human demonstration data.
The code for the paper "BiRP: BiRP: Learning Robot Generalized Bimanual Coordination using Relative Parameterization
Method on Human Demonstration" by Junjia LIU, et al. (https://arxiv.org/abs/2307.05933)
"""

from isaacgym import gymutil
Expand Down
37 changes: 37 additions & 0 deletions examples/learning_ml/example_felt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
"""
FeLT
=================
The coder for the paper "FeLT: Fully Tactile-driven Robot Plate Cleaning Skill Learning from Human Demonstration
with Tactile Sensor" by Junjia LIU, et al.
"""
import numpy as np

import rofunc as rf


# --- Data processing ---
def data_process(dat_path):
raw_demo = np.load('../../data/LFD_ML/LeftHand.npy')


demos_x = data_process('../data/LFD_ML/LeftHand.npy')

# --- TP-GMM ---
# Define the task parameters
start_xdx = [demos_x[i][0] for i in range(len(demos_x))] # TODO: change to xdx
end_xdx = [demos_x[i][-1] for i in range(len(demos_x))]
task_params = {'frame_origins': [start_xdx, end_xdx], 'frame_names': ['start', 'end']}
# Fit the model
Repr = rf.ml.TPGMM(demos_x, task_params, plot=True)
model = Repr.fit()

# Reproductions for the same situations
traj, _ = Repr.reproduce(model, show_demo_idx=2)

# Reproductions for new situations: set the endpoint as the start point to make a cycled motion
ref_demo_idx = 2
start_xdx = [Repr.demos_xdx[ref_demo_idx][0]]
end_xdx = [Repr.demos_xdx[ref_demo_idx][0]]
Repr.task_params = {'frame_origins': [start_xdx, end_xdx], 'frame_names': ['start', 'end']}
traj, _ = Repr.generate(model, ref_demo_idx)
2 changes: 1 addition & 1 deletion examples/learning_ml/example_tpgmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import rofunc as rf

raw_demo = np.load('../../data/LFD_ML/LeftHand.npy')
raw_demo = np.load('../data/LFD_ML/LeftHand.npy')
demos_x = [raw_demo[500:635, :], raw_demo[635:770, :], raw_demo[770:905, :]]

# --- TP-GMM ---
Expand Down
4 changes: 2 additions & 2 deletions examples/learning_ml/example_tpgmmbi.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import numpy as np
import rofunc as rf

left_raw_demo = np.load('../../data/LFD_ML/LeftHand.npy')
right_raw_demo = np.load('../../data/LFD_ML/RightHand.npy')
left_raw_demo = np.load('../data/LFD_ML/LeftHand.npy')
right_raw_demo = np.load('../data/LFD_ML/RightHand.npy')
demos_left_x = [left_raw_demo[500:635, :], left_raw_demo[635:770, :], left_raw_demo[770:905, :]]
demos_right_x = [right_raw_demo[500:635, :], right_raw_demo[635:770, :], right_raw_demo[770:905, :]]

Expand Down
2 changes: 1 addition & 1 deletion examples/learning_ml/example_tpgmr.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import rofunc as rf

raw_demo = np.load('../../data/LFD_ML/LeftHand.npy')
raw_demo = np.load('../data/LFD_ML/LeftHand.npy')
demos_x = [raw_demo[500:635, :], raw_demo[635:770, :], raw_demo[770:905, :]]

# --- TP-GMR ---
Expand Down

0 comments on commit c2312aa

Please sign in to comment.