= Piano Playing Demo = This is a kinect demo found in the [[mit-ros-pkg]] repository. For more MIT kinect demos check out the [[mit-ros-pkg/KinectDemos| MIT Kinect Demos]] page. <> <> == How to Run this Demo == <> {{{{#!wiki version cturtle === Installation === 1. Like all MIT kinect demos, you must first perform the [[mit-ros-pkg/KinectDemos#General_Installation| General Installation ]] 1. Once your environment is setup, run: {{{ rosmake piano }}} === Execution === {{{ roslaunch piano pianist.launch }}} }}}} {{{{#!wiki version diamondback === Installation === 1. Like all MIT kinect demos, you must first perform the [[mit-ros-pkg/KinectDemos#General_Installation| General Installation ]] 1. Once your environment is setup, run: {{{ rosmake piano }}} === Execution === {{{ roslaunch piano pianist.launch }}} * '''Note:''' if this instruction doesn't work, try the instruction of electric. }}}} {{{{#!wiki version electric === Installation === 1. Like all MIT kinect demos, you must first perform the [[mit-ros-pkg/KinectDemos#General_Installation| General Installation ]] 1. in file kinect_utils/rosdep.yaml, add below to the bottom of the file: ''' lucid: libsfml-dev libsfml-audio1.5 maverick: libsfml-dev libsfml-audio1.6 natty: libsfml-dev libsfml-audio1.6 oneiric: libsfml-dev libsfml-audio1.6 ''' {{{ roscd kinect_utils gedit rosdep.yaml }}} 1. install dependencies. {{{ rosdep install piano }}} 1. in file piano/CMakeLists.txt, replace ''target_link_libraries(testsound sfml-audio)'' with target_link_libraries(testsound sfml-audio '''sfml-system''') {{{ rosed piano CMakeLists.txt }}} 1. Once your environment is setup, run: {{{ rosmake piano }}} === Execution === {{{ roslaunch piano pianist.launch }}} }}}} == Tips == * see the [[mit-ros-pkg/KinectDemos/FingerDetection| finger detection demo ]] for tips on how to have reliable finger detections * it may be helpful to see your fingers in rviz. see the [[mit-ros-pkg/KinectDemos/FingerDetection| finger detection demo ]] for the rviz configuration to do so. * when it detect five fingers, it will first say: "Hold still" indicating that it is waiting for your hand to remain at a fixed position, so it can set up a baseline. * When it says: fingers: you are ready to go! * if you dip your finger too much, the kinect will lose sight of it, and the Piano program will do nothing if it does not see five fingers. * The distance threshold is set low, so you should not have to move much. == Development Info == === Nodes Involved === * [[openni_camera|openni_camera/openni_node]] * [[hand_interaction|hand_interaction/detectskelhands]] * [[hand_interaction|hand_interaction/analyzehands]] * [[piano|piano/pianist]] * [[skeletal_tracker|skeletal_tracker/tracker]] === Dependencies === ==== External ==== This package depends on the [[http://www.sfml-dev.org/|Simple Fast Media Library]] to play sounds. you can install the dependencies using rosdep: {{{ rosdep install piano }}} ==== ROS Packages ==== * ni * pcl * hand_interaction * skeletal_tracker * piano