Skip to content

TeamSOBITS/hand_gesture_recognition

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JA | EN

Contributors Forks Stargazers Issues License

Hand Gesture Recognition

目次
  1. 概要
  2. 環境構築
  3.  実行・操作方法
  4. マイルストーン
  5. 参考文献

概要

本レポジトリは,手の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

MediaPipe Hand landmark

(上に戻る)

セットアップ

ここで,本レポジトリのセットアップ方法について説明する.

(上に戻る)

環境条件

まず,以下の環境を整えてから,次のインストール段階に進んでください.

System Version
Ubuntu 20.04 (Focal Fossa)
ROS Noetic Ninjemys
OpenCV 4.9.0 (Tested)
Python 3.9*

Note

UbuntuROSのインストール方法に関しては,SOBITS Manualに参照してください.

Warning

install.shを実行することによって,Python 3.9が自動的にインストールされる. よって,ローカル環境の場合は注意を払うことが求められる.

(上に戻る)

インストール方法

  1. ROSのsrcフォルダに移動します.
    $ roscd
    # もしくは,"cd ~/catkin_ws/"へ移動.
    $ cd src/
  2. 本レポジトリをcloneします.
    $ git clone https://github.com/TeamSOBITS/hand_gesture_recognition
  3. レポジトリの中へ移動します.
    $ cd hand_gesture_recognition/
  4. 依存パッケージをインストールします.
    $ bash install.sh
  5. パッケージをコンパイルします.
    $ roscd
    # もしくは,"cd ~/catkin_ws/"へ移動.
    $ catkin_make

(上に戻る)

実行・操作方法

TBD

  1. 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

使用したい機能に応じて,truefalseかに書き換えてください.

  1. hand_sign.launchというlaunchファイルを実行します.
    $ roslaunch hand_gesture_recognition hand_sign.launch

(上に戻る)

Subscribers & Publishers

  • 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 ジェスチャー結果

Services

Service Type Meaning
/hand_gesture_recognition/run_ctr sobits_msgs/RunCtrl 2次元検出の切り替え(ON:true, OFF:false)

マイルストーン

  • 手を2つ以上検出ができるようにする
  • ハンドの識別機能を追加する
  • OSS
    • ドキュメンテーションの充実
    • コーディングスタイルの統一

現時点のバッグや新規機能の依頼を確認するためにIssueページ をご覧ください.

(上に戻る)

参考文献

(上に戻る)

About

A ROS package for estimating hand pose using Mediapipe (and Python)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 83.0%
  • Python 15.9%
  • Other 1.1%