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.
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
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_nodeemg_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.
Linux PC:
- Ubuntu 22.04
- ROS2 Humble
- Python 3.10.12
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 PyQt5This project was developed and tested with:
Godot_v4.3-stable_linux.x86_64The executable must be placed inside:
delsys_bridge/
Example:
delsys_bridge/
├── Godot_v4.3-stable_linux.x86_64
├── AeroPy/
├── delsys_connector_socket_ros.py
└── ...
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:
USA:
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 IDExample:
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.
The entire system can be launched through:
python3 drone_launcher.pyThe launcher automatically:
- Builds the ROS workspace.
- Starts ROSBridge.
- Starts EMG processing.
- Starts IMU processing.
- Starts the Drone Controller.
- Starts the Delsys bridge.
- Opens the Godot simulation.
- Displays the integrated monitoring GUI.
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 |
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
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.
Advantages:
-
More robust.
-
Handles strong contractions without saturation.
-
Easier MVC calibration.
-
Recommended for:
- Biceps
- Quadriceps
- Forearm muscles
Disadvantages:
- Lower sensitivity for weak contractions.
The accelerometer range is expressed in multiples of gravity:
1g = 9.81 m/s²
Maximum measurable acceleration:
±19.6 m/s²
Advantages:
- Highest resolution.
- Ideal for normal arm movements.
The gyroscope range is expressed in:
Degrees Per Second (dps)
Advantages:
- Highest angular resolution.
- Best for controlled arm movements.
If needed, the system can also be started manually.
From:
ros2_ws
run:
colcon build
source install/setup.bashsource /opt/ros/humble/setup.bash
source install/setup.bash
ros2 run emg_processing emg_processing_nodeOpen a second terminal:
source /opt/ros/humble/setup.bash
source install/setup.bash
ros2 run imu_processing imu_processing_nodeOpen a third terminal:
source /opt/ros/humble/setup.bash
source install/setup.bash
ros2 run drone_controller drone_controller_nodeInside:
delsys_bridge
run:
source /opt/ros/humble/setup.bash
source ~/delsys-unimore/ros2_ws/install/setup.bash
python3 hud.pyInside:
delsys_bridge
become root:
sudo suthen run:
python3 delsys_connector_socket_ros.pyThe bridge will:
- Scan sensors.
- Assign IMU and EMG roles.
- Perform IMU calibration.
- Perform EMG calibration.
- Start/stop recording sessions.
From:
ros2_ws
run:
source /opt/ros/humble/setup.bash
source install/setup.bash
ros2 launch rosbridge_server rosbridge_websocket_launch.xmlInside:
delsys_bridge
run:
./Godot_v4.3-stable_linux.x86_64The 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.
| 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 |
University of Modena and Reggio Emilia (UNIMORE) - Alessandra Fava
Human–Machine Interaction Demo using Delsys Trigno Sensors, ROS2 Humble and Godot Engine.