yuncheol-ncdtech commited on
Commit
58f3fec
ยท
verified ยท
1 Parent(s): 99f6a88

Upload 5 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ assets/02_real_robot.jpg filter=lfs diff=lfs merge=lfs -text
37
+ assets/03_robot_in_action.png filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,106 @@
1
  ---
2
  license: cc-by-4.0
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-4.0
3
+ tags:
4
+ - robotics
5
+ - mlp
6
+ - numpy
7
+ - obstacle-avoidance
8
+ - real-robot
9
+ pretty_name: Real-Robot Driving MLP (NumPy)
10
  ---
11
+
12
+ # Real-Robot Driving MLP โ€” the 116-parameter policy that drove our robot on video
13
+
14
+ This is the smaller, older sibling of
15
+ [NCDTech/sim-driving-mlp-numpy](https://huggingface.co/NCDTech/sim-driving-mlp-numpy):
16
+ a 116-parameter MLP trained not in simulation but on **real driving sessions** of our
17
+ tracked test robot, collected on the test floor through our desktop studio.
18
+
19
+ **This exact file is the one loaded and driving in the video below.** We traced it
20
+ frame by frame: the load dialog in the recording shows this very filename.
21
+
22
+ โ–ถ **[Watch it drive (3:18, Korean)](https://youtu.be/6DJX0T6qrtM)** โ€” synthetic data
23
+ check, analysis, training, weight transfer to the robot, and neural-network driving,
24
+ end to end.
25
+
26
+ ## Architecture
27
+
28
+ ![Architecture: 6 โ†’ 8 โ†’ 5](assets/01_architecture.png)
29
+
30
+ | part | meaning |
31
+ |------|---------|
32
+ | input (6) | ultrasonic distances **F**ront / **L**eft / **R**ight, plus their frame-to-frame **deltas** (ฮ”F, ฮ”L, ฮ”R) โ€” distance tells "how far", delta tells "getting closer or not" |
33
+ | hidden (8) | one dense layer, leaky ReLU (ฮฑ = 0.01) |
34
+ | output (5) | command logits: `FWD / LEFT / RIGHT / STOP / BACK` |
35
+
36
+ Normalization statistics (`norm_center`, `norm_scale`) are included in the file.
37
+
38
+ ## Metrics โ€” an honest early scorecard
39
+
40
+ | command | accuracy |
41
+ |---------|----------|
42
+ | FORWARD | 76 % |
43
+ | LEFT | 85 % |
44
+ | RIGHT | 83 % |
45
+ | STOP / BACK | **0 %** |
46
+ | overall | 49 % |
47
+
48
+ We publish these numbers as they are. The driving commands (F/L/R) worked well
49
+ enough to drive the robot in the video; STOP and BACK scored zero because the
50
+ training sessions barely contained those actions (class imbalance in a few minutes
51
+ of real driving data). Fixing exactly this kind of gap is why our current systems
52
+ run self QA/QC on every stage โ€” the class-distribution check that would have
53
+ flagged this dataset is now built in.
54
+
55
+ ## Load and run (NumPy only)
56
+
57
+ ```python
58
+ import numpy as np
59
+
60
+ d = np.load("real_robot_mlp.npz")
61
+ x = np.array([[300.0, 150.0, 400.0, -5.0, -20.0, 0.0]]) # F, L, R, dF, dL, dR
62
+ x = (x - d["norm_center"]) / d["norm_scale"]
63
+
64
+ h = x @ d["W0"] + d["b0"]
65
+ h = np.where(h > 0, h, 0.01 * h) # leaky ReLU
66
+ y = h @ d["W1"] + d["b1"]
67
+
68
+ print(["FWD", "LEFT", "RIGHT", "STOP", "BACK"][int(np.argmax(y))])
69
+ ```
70
+
71
+ The whole file is 2.4 KB. It runs on anything that runs NumPy, and the original
72
+ target was an MCU-class robot controller.
73
+
74
+ ## The robot it drove
75
+
76
+ ![Tracked test robot with hand-mounted ultrasonic sensors](assets/02_real_robot.jpg)
77
+
78
+ ![The robot driving on the test floor, monitored live by our control dashboard](assets/03_robot_in_action.png)
79
+
80
+ ## Sim and real, side by side
81
+
82
+ | | this model | [sim-driving-mlp-numpy](https://huggingface.co/NCDTech/sim-driving-mlp-numpy) |
83
+ |---|---|---|
84
+ | trained on | real driving sessions (test floor) | virtual-map simulation |
85
+ | inputs | 3 distances + 3 deltas | 4 distances (F/L/R/B) |
86
+ | size | 6โ†’8โ†’5, 116 params | 4โ†’16โ†’8โ†’6, 279 params |
87
+ | extra head | none | turning-angle regression |
88
+ | date | 2026-04 | 2026-05 |
89
+
90
+ Together they show the path we actually took: drive the real robot first, feel the
91
+ data problems, then build the simulation studio with self QA/QC wired into every
92
+ stage.
93
+
94
+ ## ํ•œ๊ตญ์–ด
95
+
96
+ **์˜์ƒ ์†์—์„œ ์‹ค์ œ๋กœ ๋กœ๋ด‡์„ ๋ชฐ๋˜ ๋ฐ”๋กœ ๊ทธ ๊ฐ€์ค‘์น˜ ํŒŒ์ผ**์ž…๋‹ˆ๋‹ค (์˜์ƒ์˜ ํŒŒ์ผ ์—ด๊ธฐ
97
+ ์žฅ๋ฉด์—์„œ ํŒŒ์ผ๋ช…์„ ์ถ”์ ํ•ด ํ™•์ธ). ์‹œ๋ฎฌ ๋ชจ๋ธ์˜ ํ˜•๋ป˜๋กœ, ๊ฐ€์ƒ ๋งต์ด ์•„๋‹ˆ๋ผ **์‹ค์ œ ์ฃผํ–‰
98
+ ๋ฐ์ดํ„ฐ**๋กœ ํ•™์Šตํ–ˆ์Šต๋‹ˆ๋‹ค: ์ดˆ์ŒํŒŒ 3๋ฐฉ ๊ฑฐ๋ฆฌ + ๋ณ€ํ™”๋Ÿ‰ 3๊ฐœ๋ฅผ ๋„ฃ์œผ๋ฉด ์ฃผํ–‰ ๋ช…๋ น 5์ข…์ด
99
+ ๋‚˜์˜ค๋Š” 116 ํŒŒ๋ผ๋ฏธํ„ฐ ์‹ ๊ฒฝ๋ง(2.4 KB)์ž…๋‹ˆ๋‹ค.
100
+
101
+ ์„ฑ์ ํ‘œ๋Š” ์žˆ๋Š” ๊ทธ๋Œ€๋กœ ๊ณต๊ฐœํ•ฉ๋‹ˆ๋‹ค: ์ฃผํ–‰ ๋ช…๋ น(์ „์ง„ 76%ยท์ขŒ 85%ยท์šฐ 83%)์€ ์˜์ƒ์ฒ˜๋Ÿผ
102
+ ์‹ค์ฃผํ–‰์ด ๋์ง€๋งŒ, **์ •์ง€/ํ›„์ง„์€ 0%** โ€” ๋ช‡ ๋ถ„์งœ๋ฆฌ ์‹ค์ฃผํ–‰ ๋ฐ์ดํ„ฐ์— ๊ทธ ๋™์ž‘์ด ๊ฑฐ์˜
103
+ ์—†์—ˆ๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค(ํด๋ž˜์Šค ๋ถˆ๊ท ํ˜•). ๋ฐ”๋กœ ์ด๋Ÿฐ ๊ตฌ๋ฉ์„ ์žก์œผ๋ ค๊ณ  ์ง€๊ธˆ์˜ ์ €ํฌ ์‹œ์Šคํ…œ์€
104
+ ๋ชจ๋“  ๋‹จ๊ณ„์— ์…€ํ”„ QA/QC(ํด๋ž˜์Šค ๋ถ„ํฌ ๊ฒ€์‚ฌ ํฌํ•จ)๋ฅผ ์‹ฌ์—ˆ์Šต๋‹ˆ๋‹ค.
105
+
106
+ Learn more: https://huggingface.co/NCDTech ยท https://www.ncdtech.org ยท ์ฃผํ–‰ ์˜์ƒ: https://youtu.be/6DJX0T6qrtM
assets/01_architecture.png ADDED
assets/02_real_robot.jpg ADDED

Git LFS Details

  • SHA256: 67a6a5dbae3d3d2f49f83dfc331fcced54284a78461aa4d3d0ec63512bd2406c
  • Pointer size: 131 Bytes
  • Size of remote file: 908 kB
assets/03_robot_in_action.png ADDED

Git LFS Details

  • SHA256: 1013d3bc9486da51392edeae22ed6043046ce652b2abaec8ac8edeee0cb836c9
  • Pointer size: 132 Bytes
  • Size of remote file: 1.11 MB
real_robot_mlp.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:697a394419f2cbb4e98de4edfa1c2c902efa94c4a3aa4cf7e4413a57807c5305
3
+ size 2448