JokerESC commited on
Commit
7f77dd7
·
verified ·
1 Parent(s): 7e2ea4a

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +150 -0
README.md ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ task_categories:
4
+ - robotics
5
+ tags:
6
+ - robotics
7
+ - manipulation
8
+ - force-torque
9
+ - imitation-learning
10
+ - flow-matching
11
+ - zarr
12
+ pretty_name: ForceFlow Dataset
13
+ size_categories:
14
+ - 10G<n<100G
15
+ ---
16
+
17
+ # ForceFlow Dataset
18
+
19
+ **ForceFlow: Learning to Feel and Act via Contact-Driven Flow Matching**
20
+
21
+ [[Project Page](https://jokeresc.github.io/ForceFlow-page)] | [[Code](https://github.com/JokerESC/ForceFlow)]
22
+
23
+ ![motivation](https://huggingface.co/datasets/JokerESC/ForceFlow/resolve/main/motivation-1.png)
24
+
25
+ This dataset accompanies the ForceFlow framework — a force-aware reactive policy for contact-rich robot manipulation. It contains 7 real-robot demonstration tasks collected on a UFACTORY xArm6 with a 6-axis F/T sensor and dual Intel RealSense cameras.
26
+
27
+ ---
28
+
29
+ ## Tasks
30
+
31
+ | Task | Episodes | Total Steps | Description |
32
+ |---|---|---|---|
33
+ | `plug` | 100 | 50,107 | Insert an electrical plug into a socket |
34
+ | `stamp` | 100 | 45,867 | Press a rubber stamp onto a surface |
35
+ | `clean_whiteboard` | 100 | 56,810 | Wipe a whiteboard with an eraser |
36
+ | `clean_vase` | 50 | 85,478 | Wipe the surface of a vase |
37
+ | `peel` | 50 | 38,564 | Peel adhesive tape from a surface |
38
+ | `insert` | 50 | 25,032 | Insert a peg into a hole |
39
+ | `press_button` | 50 | 23,396 | Press a button with precise force |
40
+
41
+ ---
42
+
43
+ ## Data Format
44
+
45
+ Each task is provided in two formats:
46
+
47
+ - **`<task>.zarr/`** — Zarr v2 directory store, ready for direct training use
48
+ - **`<task>.zip`** — Zipped archive of the same zarr store
49
+ - **`<task>_normalizer.json`** — Pre-computed normalizer statistics (mean/std) for all fields
50
+
51
+ ### Zarr Structure
52
+
53
+ ```
54
+ <task>.zarr/
55
+ ├── data/
56
+ │ ├── action (N, 6) float32 — end-effector delta pose (6-DOF)
57
+ │ ├── pos (N, 6) float32 — end-effector absolute pose
58
+ │ ├── force (N, 6) float32 — raw F/T sensor readings
59
+ │ ├── delta_force (N, 6) float32 — force delta (not in `peel`)
60
+ │ ├── gripper_action (N, 1) float32 — gripper command (0=open, 1=close)
61
+ │ ├── gripper_state (N, 1) float32 — gripper current state
62
+ │ ├── rgb_arm (N, 3, 240, 320) uint8 — wrist camera (JPEG-compressed)
63
+ │ └── rgb_fix (N, 3, 240, 320) uint8 — fixed camera (JPEG-compressed)
64
+ └── meta/
65
+ └── episode_ends (E,) uint32 — cumulative step index at each episode end
66
+ ```
67
+
68
+ > **Note:** The `peel` task does not contain the `delta_force` field.
69
+
70
+ RGB arrays are stored with a custom JPEG codec. To read them, install [image_codecs](https://github.com/JokerESC/ForceFlow/tree/main/CleanDiffuser/image_codecs) from the ForceFlow repo and register the codec before opening the zarr store.
71
+
72
+ ---
73
+
74
+ ## Usage
75
+
76
+ ### Prerequisites
77
+
78
+ ```bash
79
+ git clone --recurse-submodules https://github.com/JokerESC/ForceFlow.git
80
+ cd ForceFlow
81
+ pip install -r requirements.txt
82
+ pip install -e CleanDiffuser/
83
+ ```
84
+
85
+ ### Load a dataset
86
+
87
+ ```python
88
+ import sys
89
+ sys.path.insert(0, 'path/to/ForceFlow/CleanDiffuser')
90
+
91
+ import numcodecs
92
+ import image_codecs
93
+ numcodecs.register_codec(image_codecs.jpeg)
94
+
95
+ import zarr
96
+ import numpy as np
97
+
98
+ z = zarr.open('plug.zarr', 'r')
99
+
100
+ episode_ends = z['meta/episode_ends'][:] # shape (100,)
101
+ actions = z['data/action'][:] # shape (50107, 6)
102
+ forces = z['data/force'][:] # shape (50107, 6)
103
+ rgb_arm = z['data/rgb_arm'][:] # shape (50107, 3, 240, 320)
104
+
105
+ # Reconstruct per-episode slices
106
+ starts = np.concatenate([[0], episode_ends[:-1]])
107
+ for ep_idx, (s, e) in enumerate(zip(starts, episode_ends)):
108
+ ep_actions = actions[s:e] # (T, 6)
109
+ ep_forces = forces[s:e] # (T, 6)
110
+ ```
111
+
112
+ ### Training with ForceFlow
113
+
114
+ ```bash
115
+ # Edit configs/xarm.yaml to point to the downloaded data
116
+ python -m pipeline.train --config configs/xarm.yaml
117
+ ```
118
+
119
+ ---
120
+
121
+ ## Hardware
122
+
123
+ | Component | Details |
124
+ |---|---|
125
+ | Robot arm | UFACTORY xArm6 |
126
+ | F/T sensor | 6-axis wrist force/torque sensor |
127
+ | Wrist camera | Intel RealSense D435 |
128
+ | Fixed camera | Intel RealSense L515 |
129
+ | Teleoperation | 3Dconnexion SpaceMouse |
130
+
131
+ ---
132
+
133
+ ## License
134
+
135
+ MIT — see [LICENSE](https://github.com/JokerESC/ForceFlow/blob/main/LICENSE).
136
+
137
+ ---
138
+
139
+ ## Citation
140
+
141
+ If you use this dataset, please cite:
142
+
143
+ ```bibtex
144
+ @misc{forceflow2025,
145
+ title = {ForceFlow: Learning to Feel and Act via Contact-Driven Flow Matching},
146
+ author = {JokerESC},
147
+ year = {2025},
148
+ url = {https://github.com/JokerESC/ForceFlow}
149
+ }
150
+ ```