├── .gitignore ├── CHANGELOG.rst ├── msg ├── Vibration.msg ├── Gesture.msg └── Status.msg ├── package.xml ├── README.md ├── LICENSE └── CMakeLists.txt /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | -------------------------------------------------------------------------------- /CHANGELOG.rst: -------------------------------------------------------------------------------- 1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2 | Changelog for package myo_ros 3 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 | 5 | 0.1.1 (2015-01-07) 6 | ------------------ 7 | * Initial release 8 | * Contributors: Ryan Gariepy 9 | -------------------------------------------------------------------------------- /msg/Vibration.msg: -------------------------------------------------------------------------------- 1 | # This message represents a vibration pattern for the Myo 2 | 3 | # Vibration, as of Alpha 5 version of SDK 4 | int8 VIBRATION_SHORT=0 5 | int8 VIBRATION_MEDIUM=1 6 | int8 VIBRATION_LONG=2 7 | int8 vibration 8 | -------------------------------------------------------------------------------- /msg/Gesture.msg: -------------------------------------------------------------------------------- 1 | # This message represents a gesture detected by the Myo 2 | 3 | # Detected gesture, as of Alpha 5 version of SDK 4 | int8 GESTURE_NONE=0 5 | int8 GESTURE_FIST=1 6 | int8 GESTURE_WAVE_IN=2 7 | int8 GESTURE_WAVE_OUT=3 8 | int8 GESTURE_FINGERS_SPREAD=4 9 | int8 GESTURE_TWIST_IN=5 10 | int8 gesture 11 | -------------------------------------------------------------------------------- /msg/Status.msg: -------------------------------------------------------------------------------- 1 | # If the unit is synced 2 | bool sync 3 | 4 | # If the unlock gesture has been seen 5 | bool unlock 6 | 7 | # Which arm the Myo is on 8 | int8 ARM_RIGHT=0 9 | int8 ARM_LEFT=1 10 | int8 ARM_UNKNOWN=2 11 | int8 arm 12 | 13 | # Which direction the Myo is facing on one's arm (defined by USB port) 14 | int8 DIR_WRIST=0 15 | int8 DIR_ELBOW=1 16 | int8 DIR_UNKNOWN=2 17 | int8 direction 18 | -------------------------------------------------------------------------------- /package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | myo_ros 4 | 0.1.2 5 | The myo_ros package 6 | 7 | Ryan Gariepy 8 | BSD 9 | http://wiki.ros.org/myo_ros 10 | Ryan Gariepy --> 11 | 12 | catkin 13 | message_generation 14 | roscpp 15 | std_msgs 16 | message_runtime 17 | roscpp 18 | std_msgs 19 | 20 | 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # myo_ros 2 | 3 | This serves as the ROS-side portion of what is required to get Myo to work on a ROS network. It currently only contains a few custom message definitions to keep the data coming into ROS as raw as possible, but some basic examples should be added to demonstrate how it can be used. The Windows-side portion is myo_ros_windows 4 | 5 | ## Installing Dependencies (Indigo) 6 | sudo apt-get install ros-indigo-rosserial-server 7 | 8 | ## Installing Dependencies (Hydro) 9 | As of this writing, it has been untested in Hydro, but I see no reason why it wouldn't work. 10 | 11 | sudo apt-get install ros-hydro-rosserial-server 12 | 13 | ## Dependencies 14 | Base ROS 15 | 16 | ## Compiling 17 | Clone the source into your workspace and make your workspace. That's it. 18 | 19 | ## Running 20 | As in the usual rosserial-based bridges, simply launch rosserial on this end: 21 | 22 | roslaunch rosserial_server socket.launch 23 | You'll need to run the Windows side separately, consult the documentation for that package for those instructions. 24 | 25 | ## TODO: 26 | Port previous example nodes to the new format to show Myo->ROS commands (ex. Twist) 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Clearpath Robotics 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of myo_ros nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(myo_ros) 3 | 4 | # I've left the boilerplate here for reference when I put an example node in 5 | 6 | ## Find catkin macros and libraries 7 | ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) 8 | ## is used, also find other catkin packages 9 | find_package(catkin REQUIRED COMPONENTS message_generation std_msgs) 10 | 11 | ## System dependencies are found with CMake's conventions 12 | # find_package(Boost REQUIRED COMPONENTS system) 13 | 14 | ################################################ 15 | ## Declare ROS messages, services and actions ## 16 | ################################################ 17 | 18 | ## To declare and build messages, services or actions from within this 19 | ## package, follow these steps: 20 | ## * Let MSG_DEP_SET be the set of packages whose message types you use in 21 | ## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). 22 | ## * In the file package.xml: 23 | ## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET 24 | ## * If MSG_DEP_SET isn't empty the following dependencies might have been 25 | ## pulled in transitively but can be declared for certainty nonetheless: 26 | ## * add a build_depend tag for "message_generation" 27 | ## * add a run_depend tag for "message_runtime" 28 | ## * In this file (CMakeLists.txt): 29 | ## * add "message_generation" and every package in MSG_DEP_SET to 30 | ## find_package(catkin REQUIRED COMPONENTS ...) 31 | ## * add "message_runtime" and every package in MSG_DEP_SET to 32 | ## catkin_package(CATKIN_DEPENDS ...) 33 | ## * uncomment the add_*_files sections below as needed 34 | ## and list every .msg/.srv/.action file to be processed 35 | ## * uncomment the generate_messages entry below 36 | ## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) 37 | 38 | ## Generate messages in the 'msg' folder 39 | add_message_files( 40 | FILES 41 | Gesture.msg 42 | Vibration.msg 43 | Status.msg 44 | ) 45 | 46 | ## Generate added messages and services with any dependencies listed here 47 | generate_messages( 48 | DEPENDENCIES 49 | std_msgs 50 | ) 51 | 52 | ################################### 53 | ## catkin specific configuration ## 54 | ################################### 55 | ## The catkin_package macro generates cmake config files for your package 56 | ## Declare things to be passed to dependent projects 57 | ## INCLUDE_DIRS: uncomment this if you package contains header files 58 | ## LIBRARIES: libraries you create in this project that dependent projects also need 59 | ## CATKIN_DEPENDS: catkin_packages dependent projects also need 60 | ## DEPENDS: system dependencies of this project that dependent projects also need 61 | catkin_package( 62 | # INCLUDE_DIRS include 63 | CATKIN_DEPENDS message_runtime std_msgs 64 | ) 65 | 66 | ########### 67 | ## Build ## 68 | ########### 69 | 70 | ## Specify additional locations of header files 71 | ## Your package locations should be listed before other locations 72 | # include_directories(include) 73 | 74 | ## Declare a cpp library 75 | # add_library(myo_ros 76 | # src/${PROJECT_NAME}/myo_ros.cpp 77 | # ) 78 | 79 | ## Declare a cpp executable 80 | # add_executable(myo_ros_node src/myo_ros_node.cpp) 81 | 82 | ## Add cmake target dependencies of the executable/library 83 | ## as an example, message headers may need to be generated before nodes 84 | # add_dependencies(myo_ros_node myo_ros_generate_messages_cpp) 85 | 86 | ## Specify libraries to link a library or executable target against 87 | # target_link_libraries(myo_ros_node 88 | # ${catkin_LIBRARIES} 89 | # ) 90 | 91 | ############# 92 | ## Install ## 93 | ############# 94 | 95 | # all install targets should use catkin DESTINATION variables 96 | # See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html 97 | 98 | ## Mark executables and/or libraries for installation 99 | # install(TARGETS myo_ros myo_ros_node 100 | # ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 101 | # LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 102 | # RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 103 | # ) 104 | 105 | ## Mark cpp header files for installation 106 | # install(DIRECTORY include/${PROJECT_NAME}/ 107 | # DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} 108 | # FILES_MATCHING PATTERN "*.h" 109 | # PATTERN ".svn" EXCLUDE 110 | # ) 111 | 112 | ## Mark other files for installation (e.g. launch and bag files, etc.) 113 | # install(FILES 114 | # # myfile1 115 | # # myfile2 116 | # DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 117 | # ) 118 | 119 | ############# 120 | ## Testing ## 121 | ############# 122 | 123 | ## Add gtest based cpp test target and link libraries 124 | # catkin_add_gtest(${PROJECT_NAME}-test test/test_myo_ros.cpp) 125 | # if(TARGET ${PROJECT_NAME}-test) 126 | # target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) 127 | # endif() 128 | --------------------------------------------------------------------------------