本レポジトリは,手の2次元の骨格を検出し,ROS上でその結果をpublishすることを可能とする.
Warning
現段階では,手や人追従の機能が導入されていないため,手の検出を2つに限られている.
手の検出可能な骨格一覧
| ID | Varible | Hand Part |
|---|---|---|
| 0 | wrist | wrist |
| 1 | thumb_cmc | thumb carpometacarpal |
| 2 | thumb_mcp | thumb metacarpophalangeal |
| 3 | thumb_ip | thumb interphalangeal |
| 4 | thumb_tip | thumb tip |
| 5 | index_finger_mcp | index finger metacarpophalangeal |
| 6 | index_finger_pip | index finger proximal inter-phalangeal |
| 7 | index_finger_dip | index finger distal interphalangeal |
| 8 | index_finger_tip | index finger tip |
| 9 | middle_finger_mcp | middle finger metacarpophalangeal |
| 10 | middle_finger_pip | middle finger proximal inter-phalangeal |
| 11 | middle_finger_dip | middle finger distal interphalangeal |
| 12 | middle_finger_tip | middle finger tip |
| 13 | ring_finger_mcp | ring finger metacarpophalangeal |
| 14 | ring_finger_pip | ring finger proximal inter-phalangeal |
| 15 | ring_finger_dip | ring finger distal interphalangeal |
| 16 | ring_finger_tip | ring finger tip |
| 17 | pinky_mcp | pinky metacarpophalangeal |
| 18 | pinky_pip | pinky proximal inter-phalangeal |
| 19 | pinky_dip | pinky distal interphalangeal |
| 20 | pinky_tip | pinky tip |
(上に戻る)
ここで,本レポジトリのセットアップ方法について説明する.
(上に戻る)
まず,以下の環境を整えてから,次のインストール段階に進んでください.
| System | Version |
|---|---|
| Ubuntu | 20.04 (Focal Fossa) |
| ROS | Noetic Ninjemys |
| OpenCV | 4.9.0 (Tested) |
| Python | 3.9* |
Note
UbuntuやROSのインストール方法に関しては,SOBITS Manualに参照してください.
Warning
install.shを実行することによって,Python 3.9が自動的にインストールされる.
よって,ローカル環境の場合は注意を払うことが求められる.
(上に戻る)
- ROSの
srcフォルダに移動します.$ roscd # もしくは,"cd ~/catkin_ws/"へ移動. $ cd src/
- 本レポジトリをcloneします.
$ git clone https://github.com/TeamSOBITS/hand_gesture_recognition
- レポジトリの中へ移動します.
$ cd hand_gesture_recognition/ - 依存パッケージをインストールします.
$ bash install.sh
- パッケージをコンパイルします.
$ roscd # もしくは,"cd ~/catkin_ws/"へ移動. $ catkin_make
(上に戻る)
TBD
- hand_gesture_recognitionの起動する機能をパラメタとしてhand_sign.launchに設定します.
<!-- Allow 2D pose detection (true) --> <arg name="pose_2d_detect" default="true"/> <!-- Show 2D pose detection result as a log (true) --> <arg name="pose_2d_log_show" default="true"/> <!-- Show 2D pose detection result as an image (true) --> <arg name="pose_2d_img_show" default="true"/> <!-- Publish 2D pose detection result as an image (true) --> <arg name="pose_2d_img_pub" default="true"/> <!-- Subscribe to camera topic --> <arg name="sub_img_topic_name" default="/camera/rgb/image_raw"/>
Note
使用したい機能に応じて,trueかfalseかに書き換えてください.
- hand_sign.launchというlaunchファイルを実行します.
$ roslaunch hand_gesture_recognition hand_sign.launch
(上に戻る)
- Subscribers:
| Topic | Type | Meaning |
|---|---|---|
| /camera/rgb/image_raw | sensor_msgs/Image | センサの画像 |
- Publishers:
| Topic | Type | Meaning |
|---|---|---|
| /hand_gesture_recognition/pose_array | hand_gesture_recognition/KeyPoint2DArray | 2次元の骨格情報 |
| /hand_gesture_recognition/pose_img | sensor_msgs/Image | 2次元の骨格画像 |
| /hand_gesture_recognition/gesture | string | ジェスチャー結果 |
| Service | Type | Meaning |
|---|---|---|
| /hand_gesture_recognition/run_ctr | sobits_msgs/RunCtrl | 2次元検出の切り替え(ON:true, OFF:false) |
- 手を2つ以上検出ができるようにする
- ハンドの識別機能を追加する
- OSS
- ドキュメンテーションの充実
- コーディングスタイルの統一
現時点のバッグや新規機能の依頼を確認するためにIssueページ をご覧ください.
(上に戻る)
(上に戻る)
