Haply - gkgkgk1215/else GitHub Wiki
Reference
Overview
-
Haply์ ์ ๊ทผํ ์ ์๋ ๋ฐฉ๋ฒ์ ๋ ๊ฐ์ง๊ฐ ์์: SDK Service, HardwareAPI
-
SDK Service๋ background์์ ์๋ฆฌ์ผ ํต์ ์ ํตํด ๋ฐ์ดํฐ๋ฅผ ์ฃผ๊ณ ๋ฐ์. ์น์์ผ์ ์ด์ฉํ์ฌ ์๋น์ค๋ฅผ ์ ๊ณตํ๋ ํํ
-
HaplyHardwareAPI๋ Python ๋ชจ๋๋ก์จ, ์ง์ ์ ์ผ๋ก ์๋ฆฌ์ผ ํต์ ์ผ๋ก ํฌํธ์ ์ ๊ทผํ์ฌ ์ ๋ณด๋ฅผ ์ก์์
-
Hub๋ ๋๋ฐ์ด์ค์ ์ํ๋ฅผ ์ฒดํฌํ ์ ์๋ GUI tool์ด๋ฉฐ, Service๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ํจ. Calibration์ ํ์ํจ.
-
Service์ HardwareAPI๋ ๋์์ ์ฌ์ฉํ ์ ์์. ์๋ฆฌ์ผ ํฌํธ๋ฅผ ์ ๊ทผํ๋ ๋ฐ ์์ด์ ์ถฉ๋์ด ๋ฐ์ํจ.
-
Service๋ฅผ ์ฌ์ฉํ๋ฉด ์๋ฆฌ์ผ ํต์ ์ ์ ์ ํ๊ณ ์์ด์, ๋ค๋ฅธ ์๋ฆฌ์ผ ํต์ ์ ์ฌ์ฉํ๋ Geomagic Touch Device๋ฅผ ๋์์ ์ฌ์ฉํ ์ ์์.
udev rules
- Add a udev rule to create a symlink for the device
sudo gedit /etc/udev/rules.d/99-inverse.rules
# /etc/udev/rules.d/99-inverse.rules
# Inverse3 (Left)
SUBSYSTEM=="tty", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0483", ATTRS{serial}=="18091350", MODE:="0666", SYMLINK+="Inverse_L"
# Inverse3 (Right)
SUBSYSTEM=="tty", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0483", ATTRS{serial}=="18091430", MODE:="0666", SYMLINK+="Inverse_R"
# VerseGrip Stylus (Left)
SUBSYSTEM=="tty", ATTRS{idVendor}=="2fe3", ATTRS{idProduct}=="0100", ATTRS{serial}=="861E8EE5F9FB9832", MODE:="0666", GROUP="plugdev", SYMLINK+="Versegrip_L"
# VerseGrip Stylus (Right)
SUBSYSTEM=="tty", ATTRS{idVendor}=="2fe3", ATTRS{idProduct}=="0100", ATTRS{serial}=="B8E4ACC522B3A02F", MODE:="0666", GROUP="plugdev", SYMLINK+="Versegrip_R"
- Reload udev rules and apply the changes
sudo udevadm control --reload-rules
sudo udevadm trigger
Haply Python Module
pip install HaplyHardwareAPI
Haply SDK Service
-
Download the service installer file from the website: https://develop.haply.co/releases/installer
-
Install
sudo dpkg -i haply-inverse-service-ubuntu2404-amd64-3.4.17.deb
- Start Service
# start
systemctl start haply-inverse-service.service
# stop
systemctl stop haply-inverse-service.service
# enable
systemctl enable haply-inverse-service.service
# disable
systemctl disable haply-inverse-service.service
Channel
Haply ์ธ๋ฒ์ค ์๋น์ค์๋ ๋ ๊ฐ์ ๋์ ํต์ ์ฑ๋์ด ์๋๋ฐ, ํ๋๋ ๋๋ฐ์ด์ค์ ์ค์๊ฐ ์ํ ๋ฐ ๋์์ ์ํ ์ฑ๋์ด๊ณ ( ์๋ฎฌ๋ ์ด์ ์ฑ๋ ์ฐธ์กฐ)์ ์ฃผ์ ์ด๋ฒคํธ ๋ฐ ๊ด๋ จ ์ ๋ณด๋ฅผ ๋ณด๊ณ ํ๋ ์์คํ ์ ์ด๋ฒคํธ๋ฅผ ์ํ ๋จ๋ฐฉํฅ ์ฑ๋( ์ด๋ฒคํธ ์ฑ๋ ์ฐธ์กฐ).
Haply Hub (Optional)
-
Install Hub: https://develop.haply.co/releases/manager
-
This is a standalone program, utilizing Haply Service SDK. Be cautious to run if you are using other serial port such as Geomagic Touch Device.
Right click -- Option -- Execute as a program
Double click to execute
Coordinate
Haply ์ค๋ฅธ์ ์ขํ๊ณ๋ฅผ ์ฌ์ฉํ๋ฏ๋ก X๋ ์ค๋ฅธ์ชฝ์, Y๋ ์์ชฝ์, Z๋ ์์ชฝ์ ๊ฐ๋ฆฌํต๋๋ค.
ํ์ฌ ์ขํ๊ณ๋ฅผ ์ง์ ํ ์ ์๋ ์๋ ๋ณํ ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ฉฐ(์ฌ๊ธฐ๋ฅผ ์ฐธ์กฐํ์ธ์), ํด๋น ์ขํ๊ณ์์๋ ์๋น์ค๋ ํด๋น ์์คํ ์์ ์๋ํฉ๋๋ค. ์ฆ, ์ ์ขํ๊ณ๋ฅผ ์ง์ ํ๋ฉด ๋ชจ๋ ์ถ๋ ฅ์ด ์ ์ขํ๊ณ์์ ์ด๋ฃจ์ด์ง๋๋ค, ๋ชจ๋ ์ ๋ ฅ๋ ๊ทธ ์ขํ๊ณ์์ ์ด๋ฃจ์ด์ง ๊ฒ์ผ๋ก ์์ํฉ๋๋ค. ์ด ์๋น์ค๋ ๋ด๋ถ์ ์ผ๋ก ์ค๋ฅธ์ชฝ์ Z-Up ์์คํ ๊ณผ์ ๋ณํ์ ๋ด๋ถ์ ์ผ๋ก ์ฒ๋ฆฌํฉ๋๋ค.
์์
-
์๋น์ค๋ฅผ ์์
-
Calibration ์ํ (grip์ด ์๋ ์ํ์์ calibration์ ํ๋ฉด ๋ ์ ํํจ)
-
์๋น์ค stop
-
GTD(๋๋ ๋ค๋ฅธ ํ ํฑ ์ฅ์น) USB ์ฐ๊ฒฐ ๋ฐ ์ธํ
-
ํ๋ก๊ทธ๋จ ์คํ (detect_inverse3s์ ๊ฐ์ ํจ์๋ฅผ ์ฌ์ฉํ์ง ๋ง๊ฒ. ํฌํธ ๊ฐ์ญ/์ถฉ๋ ์ ์)
Trouble Shooting
- ์์ ํ๋ก๊ทธ๋จ์์ reading position์์ ํฌํธ๊ฐ ์ด๋ ธ๋ค๊ฐ ๊ฐ์๊ธฐ ๋ซํ๋ฉด์ ๋ช ๋ น์ด ์๋จนํ๋ ๋ฌธ์ . Service๋ฅผ ์ข ๋ฃ ํ HardwareAPI๋ฅผ ์คํ์์ผ์ผ ํจ.
dmesg -w
- Service ์ฌ์ฉ์ Geomagic Touch ๋ถ๋ฅ. HardwareAPI ์์์์ ํฌํธ ์๋ํ์ ๊ธ์ง (์ถฉ๋ ๋ฐ์)