Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ARSControl/DELSYS-sensor---UNIMORE-framework-ROS2

Open more actions menu

Repository files navigation

DELSYS Sensors in ROS2 Framework for Drone Control Demo

Overview

This project demonstrates the integration of Delsys Trigno sensors within a ROS2-based robotic control framework through an interactive drone game.

The demo showcases how wearable biosignal sensors can be used to control a virtual drone in real time:

  • IMU sensor → controls the drone direction and movement.
  • EMG sensor → controls speed boosts through real-time muscle activation.
  • ROS2 handles the complete data acquisition and processing pipeline.
  • Godot Engine provides the visualization and gameplay environment.

The goal is to provide a complete example of a Human-Machine Interface (HMI) based on physiological signals and ROS2 communication.


System Architecture

Delsys Trigno Sensors
          │
          ▼
delsys_connector_socket_ros.py
          │
          ├── TCP 9001 → imu_processing_node
          ├── TCP 9002 → emg_processing_node
          └── TCP 9003 → drone_controller_node
                          │
                          ▼
                     cmd_vel
                          │
                          ▼
                 ROSBridge WebSocket
                          │
                          ▼
                      Godot Game

Communication Logic

The system uses three dedicated TCP ports:

Port Purpose
9001 IMU data stream
9002 EMG data stream
9003 Control messages, recording commands, calibration commands

Required ROS nodes:

Port ROS Node
9001 imu_processing_node
9002 emg_processing_node
9003 drone_controller_node

The Delsys bridge communicates through sockets with the ROS nodes:

  • imu_processing_node
  • emg_processing_node

These nodes publish ROS topics.

The drone_controller_node subscribes to those topics, processes the information, and generates a cmd_vel command.

The command is sent through ROSBridge and consumed by Godot to control the virtual drone.


Requirements

Operating System

Linux PC:

  • Ubuntu 22.04

ROS

  • ROS2 Humble

Python

  • Python 3.10.12

Required Dependencies

Install the following packages:

sudo apt-get update

sudo apt-get install -y wmctrl xdotool

sudo apt install -y ros-humble-rosbridge-server

pip install PyQt5

Godot Version

This project was developed and tested with:

Godot_v4.3-stable_linux.x86_64

The executable must be placed inside:

delsys_bridge/

Example:

delsys_bridge/
├── Godot_v4.3-stable_linux.x86_64
├── AeroPy/
├── delsys_connector_socket_ros.py
└── ...

Delsys License Configuration

Before running the project, you must insert your Delsys license information.

Edit:

delsys_bridge/AeroPy/TrignoBase.py

and add your:

  • License Key
  • License Information

To obtain a valid license contact Delsys:

Europe:

https://delsyseurope.com/

USA:

https://delsys.com/


Sensor GUID Configuration

Before using your own Trigno sensors, you must update the hardware mapping.

Edit:

delsys_bridge/delsys_connector_socket_ros.py

Locate the mapping dictionary near the beginning of the file.

The mapping associates:

Hardware GUID  -> Logical Sticker ID

Example:

sensor_map = {
    "GUID_SENSOR_A": 1,
    "GUID_SENSOR_B": 2,
}

Update the GUIDs with your own sensors.

This mapping is fundamental because the entire ROS pipeline identifies sensors using the logical sticker numbers.


Launching the Demo

The entire system can be launched through:

python3 drone_launcher.py

The launcher automatically:

  1. Builds the ROS workspace.
  2. Starts ROSBridge.
  3. Starts EMG processing.
  4. Starts IMU processing.
  5. Starts the Drone Controller.
  6. Starts the Delsys bridge.
  7. Opens the Godot simulation.
  8. Displays the integrated monitoring GUI.

Sensor Assignment Logic

The demo follows a simple convention:

Sticker Number Function
Odd Number IMU Sensor
Even Number EMG Sensor

Example:

Sticker Usage
1 IMU
2 EMG
3 IMU
4 EMG

Sensor Configuration

Sensors should be configured as:

EMG RMS (148 Hz, 100 ms window)
Skin Check (74 Hz)
Accelerometer ±2g (296 Hz)
Gyroscope ±250 dps (296 Hz)
EMG Range ±11 mV
Bandpass 20–450 Hz

Why RMS EMG?

EMG RMS (148 Hz, 100 ms window)

provides several advantages:

  • RMS already computed onboard by the sensor.
  • Direct measurement of muscle activation intensity.
  • No software downsampling required.
  • Reduced CPU load.
  • Smooth signal ready for real-time control.

This makes it ideal for mapping muscle contraction intensity to drone speed.


EMG Range Selection

±11 mV RMS

Advantages:

  • More robust.

  • Handles strong contractions without saturation.

  • Easier MVC calibration.

  • Recommended for:

    • Biceps
    • Quadriceps
    • Forearm muscles

Disadvantages:

  • Lower sensitivity for weak contractions.

Accelerometer Configuration

The accelerometer range is expressed in multiples of gravity:

1g = 9.81 m/s²

±2g

Maximum measurable acceleration:

±19.6 m/s²

Advantages:

  • Highest resolution.
  • Ideal for normal arm movements.

Gyroscope Configuration

The gyroscope range is expressed in:

Degrees Per Second (dps)

±250 dps

Advantages:

  • Highest angular resolution.
  • Best for controlled arm movements.

Manual Startup Procedure

If needed, the system can also be started manually.


1. Build ROS Workspace

From:

ros2_ws

run:

colcon build

source install/setup.bash

2. Start EMG Node

source /opt/ros/humble/setup.bash
source install/setup.bash

ros2 run emg_processing emg_processing_node

3. Start IMU Node

Open a second terminal:

source /opt/ros/humble/setup.bash
source install/setup.bash

ros2 run imu_processing imu_processing_node

4. Start Drone Controller

Open a third terminal:

source /opt/ros/humble/setup.bash
source install/setup.bash

ros2 run drone_controller drone_controller_node

5. Start the Monitoring GUI

Inside:

delsys_bridge

run:

source /opt/ros/humble/setup.bash

source ~/delsys-unimore/ros2_ws/install/setup.bash

python3 hud.py

6. Start Delsys Sensor Acquisition

Inside:

delsys_bridge

become root:

sudo su

then run:

python3 delsys_connector_socket_ros.py

The bridge will:

  • Scan sensors.
  • Assign IMU and EMG roles.
  • Perform IMU calibration.
  • Perform EMG calibration.
  • Start/stop recording sessions.

7. Start ROSBridge

From:

ros2_ws

run:

source /opt/ros/humble/setup.bash

source install/setup.bash

ros2 launch rosbridge_server rosbridge_websocket_launch.xml

8. Start Godot

Inside:

delsys_bridge

run:

./Godot_v4.3-stable_linux.x86_64

Godot–ROS Integration

The project uses:

godot_ros

to subscribe to ROS topics.

The drone receives movement commands generated from:

IMU → ROS2 → drone_controller → cmd_vel → Godot

while EMG activity is used to modulate speed and boost behaviour.


Main Components

Component Purpose
delsys_connector_socket_ros.py Delsys sensor acquisition
imu_processing_node IMU processing
emg_processing_node EMG processing
drone_controller_node Drone control logic
rosbridge_server ROS ↔ Godot communication
drone_launcher.py Complete system launcher
Godot Visualization and gameplay

Authors

University of Modena and Reggio Emilia (UNIMORE) - Alessandra Fava

Human–Machine Interaction Demo using Delsys Trigno Sensors, ROS2 Humble and Godot Engine.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.