Skip to content

Library made for processing EMG data and sending torque commands to an exoskeleton. Intended for the Technaid H3 Exoskeleton and Muovi+Pro EMG system but is compatible with a variety of devices.

Notifications You must be signed in to change notification settings

daviddorf2023/mobile_hdemg_exo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mobile hdEMG Controller for the Technaid H3 Exoskeleton

Easy Setup

  • Clone this repository into a ROS workspace
  • Run catkin_make in the root of the workspace
  • Source the workspace with source devel/setup.bash
  • Launch the minimal EMG system with roslaunch mobile_hdemg_exo emg_minimal.launch and select the File option in the GUI pop-up to use a prerecorded dataset
  • Launch the full exoskeleton system with roslaunch mobile_hdemg_exo h3_launch.launch if the exoskeleton is connected to the device

Overview

This software is intended to allow for high density EMG control of the Technaid H3 exoskeleton for rehabilitation at Shirley Ryan AbilityLab. The package is designed to run on the Jetson Orin Nano Developer Kit, but can also work on any Ubuntu 20.04 system. However, the latency analyzer system only runs on systems with GPIO pins with PWM capability. The Jetson Orin Nano launches the EMG and ankle exoskeleton ROS nodes. The EMG package, mobile_hdemg_exo connects to and reads data from an OTB Quattrocento or OTB Muovi+Pro EMG device, as well as the ability to process prerecorded datasets. The package processes the raw EMG data with either a root-mean-squared method or a cumulative spike train neural network approach. It then calibrates the EMG data to the torque sensor data on the exoskeleton, and the EMG coefficients are used to convert the patient's EMG to accurate predicted torque commands to the exoskeleton. The H3 nodes control and read/write torque data from the exoskeleton.

More information about the H3 exoskeleton is in a documentation PDF within this repository. This package provides an interface that speaks and displays instructions to the patient for them to move, in order to calibrate the EMG to their intended torque.

This package also includes a latency analyzer to measure system processing time across each individual physical component, as well as each system process running on the exoskeleton and Orin Nano. The Orin Nano generates a 3.3V PWM output on GPIO pin 33 into an input on the EMG device. The processed signal is sent back over ethernet to the Orin Nano. The inverse of the difference in frequency between the PWM input and EMG output is the EMG device's latency. The delay of the EMG processing, calibration, and exoskeleton torque command is determined by using rostopic delay on their respective topics.

Software Architecture

latencychart

Latency Analyzer Architecture

latency_analyzer

Power Architecture

power

Hardware Setup

hardware

Software Setup

Dependencies

  • Ubuntu 20.04
  • ROS Noetic
  • Git
  • Pip
  • Python 3
  • TensorFlow 2.13.0
  • SciPy 1.7.0
  • NumPy 1.22.4
  • Pandas
  • Pyttsx3 and espeak [Text to speech]
  • Tkinter, PyQt [GUI]

Jetson Orin Nano

ROS Noetic

PCAN

The Technaid H3 Exoskeleton uses PEAK CAN as its CAN interface. The PEAK CAN driver package and the PCAN Basic API must be installed on the device with the following steps:

GPIO Pin Configuration

Note: This approach works for the Jetson Orin Nano, but other devices with GPIO/PWM pins will likely have a different pin number than 33, which can be obtained from the product's datasheet. In order to use PWM and other additional GPIO modifications, the steps below must be taken:

  • Download the NVIDIA GPIO interface library with git clone https://github.com/NVIDIA/jetson-gpio.git
  • In the root of the cloned directory, run sudo python3 setup.py install
  • Run the following commands to add permissions to access the GPIO user group:
    • sudo groupadd -f -r gpio
    • sudo usermod -a -G gpio your_user_name and replace your_user_name with the one in your command line interface
    • sudo cp lib/python/Jetson/GPIO/99-gpio.rules /etc/udev/rules.d/
    • sudo udevadm control --reload-rules && sudo udevadm trigger
    • sudo /opt/nvidia/jetson-io/jetson-io.py and change Pin 33 in the pinmux configuration to enable PWM on Pin 33. Save and reboot when prompted for the hardware changes to properly initiate.

Device Connections

Quattrocento

Muovi+Pro

Repository

  • Create a directory with a subdirectory called src
  • Navigate into src and clone the GitHub repository with git clone https://github.com/Technaid-S-L/technaid_h3_ankle_ros_python
  • Switch the Git branch to MSR_Project_2023 with git checkout MSR_Project_2023

Build

  • Go back to the directory containing src and run catkin_make

Launch

  • Source a ROS workspace with source devel/setup.bash
  • Launch the system with roslaunch mobile_hdemg_exo h3_launch.launch. The system can be further configured by the user in the startup screen.

About

Library made for processing EMG data and sending torque commands to an exoskeleton. Intended for the Technaid H3 Exoskeleton and Muovi+Pro EMG system but is compatible with a variety of devices.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published